Skip to content

Commit 2634aef

Browse files
committed
Use patched LLVM
https://github.com/zkMIPS/llvm-project.git#zkm-rustc/20.1-2025-02-13 Add zkm CPU test EnableLoopTermFold Do not emit instruction teq if divisor is non-zero immediate value in FastISel implementation (rust-lang#135768) Add MipsLoopReduceHiLo MIPSr6: don't emit teq for div/mod if Divisor is not zero
1 parent 06a4946 commit 2634aef

File tree

6 files changed

+17
-9
lines changed

6 files changed

+17
-9
lines changed

.gitmodules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
shallow = true
2929
[submodule "src/llvm-project"]
3030
path = src/llvm-project
31-
url = https://github.com/rust-lang/llvm-project.git
32-
branch = rustc/20.1-2025-02-13
31+
url = https://github.com/zkMIPS/llvm-project.git
32+
branch = zkm-rustc/20.1-2025-02-13
3333
shallow = true
3434
[submodule "src/doc/embedded-book"]
3535
path = src/doc/embedded-book

compiler/rustc_target/src/spec/targets/mips_zkm_zkvm_elf.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub(crate) fn target() -> Target {
2525
max_atomic_width: Some(32),
2626
atomic_cas: true,
2727

28-
features: "+mips32r2,+soft-float,+noabicalls".into(),
28+
features: "+mips32r2,+inst-same-cost,+soft-float,+noabicalls".into(),
2929
executables: true,
3030
panic_strategy: PanicStrategy::Abort,
3131
relocation_model: RelocModel::Static,

compiler/rustc_target/src/spec/targets/mipsel_zkm_zkvm_elf.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub(crate) fn target() -> Target {
2525
max_atomic_width: Some(32),
2626
atomic_cas: true,
2727

28-
features: "+mips32r2,+soft-float,+noabicalls".into(),
28+
features: "+mips32r2,+inst-same-cost,+soft-float,+noabicalls".into(),
2929
executables: true,
3030
panic_strategy: PanicStrategy::Abort,
3131
relocation_model: RelocModel::Static,

src/bootstrap/Cargo.lock

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ name = "bootstrap"
3737
version = "0.0.0"
3838
dependencies = [
3939
"build_helper",
40-
"cc",
40+
"cc 1.2.23+1",
4141
"clap",
4242
"clap_complete",
4343
"cmake",
@@ -97,6 +97,14 @@ dependencies = [
9797
"shlex",
9898
]
9999

100+
[[package]]
101+
name = "cc"
102+
version = "1.2.23+1"
103+
source = "git+https://github.com/zkMIPS/cc-rs.git?branch=Triple_mips-zkm-zkvm-elf#22ef49e75e2b348e666781d43f67b7648e4bd50b"
104+
dependencies = [
105+
"shlex",
106+
]
107+
100108
[[package]]
101109
name = "cfg-if"
102110
version = "1.0.0"
@@ -156,7 +164,7 @@ version = "0.1.54"
156164
source = "registry+https://github.com/rust-lang/crates.io-index"
157165
checksum = "e7caa3f9de89ddbe2c607f4101924c5abec803763ae9534e4f4d7d8f84aa81f0"
158166
dependencies = [
159-
"cc",
167+
"cc 1.2.23",
160168
]
161169

162170
[[package]]
@@ -410,7 +418,7 @@ version = "0.1.20"
410418
source = "registry+https://github.com/rust-lang/crates.io-index"
411419
checksum = "5fda04ab3764e6cde78b9974eec4f779acaba7c4e84b36eca3cf77c581b85d27"
412420
dependencies = [
413-
"cc",
421+
"cc 1.2.23",
414422
"libc",
415423
"pkg-config",
416424
]

src/bootstrap/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ test = false
3232
# Most of the time updating these dependencies requires modifications to the
3333
# bootstrap codebase(e.g., https://github.com/rust-lang/rust/issues/124565);
3434
# otherwise, some targets will fail. That's why these dependencies are explicitly pinned.
35-
cc = "=1.2.23"
35+
cc = { git = "https://github.com/zkMIPS/cc-rs.git", branch = "Triple_mips-zkm-zkvm-elf" }
3636
cmake = "=0.1.54"
3737

3838
build_helper = { path = "../build_helper" }

src/llvm-project

0 commit comments

Comments
 (0)