Skip to content

Commit c255d9c

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 1099f08 commit c255d9c

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
@@ -24,8 +24,8 @@
2424
shallow = true
2525
[submodule "src/llvm-project"]
2626
path = src/llvm-project
27-
url = https://github.com/rust-lang/llvm-project.git
28-
branch = rustc/20.1-2025-02-13
27+
url = https://github.com/zkMIPS/llvm-project.git
28+
branch = zkm-rustc/20.1-2025-02-13
2929
shallow = true
3030
[submodule "src/doc/embedded-book"]
3131
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,+zkm,+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,+zkm,+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
@@ -46,7 +46,7 @@ name = "bootstrap"
4646
version = "0.0.0"
4747
dependencies = [
4848
"build_helper",
49-
"cc",
49+
"cc 1.2.23+1",
5050
"clap",
5151
"clap_complete",
5252
"cmake",
@@ -106,6 +106,14 @@ dependencies = [
106106
"shlex",
107107
]
108108

109+
[[package]]
110+
name = "cc"
111+
version = "1.2.23+1"
112+
source = "git+https://github.com/zkMIPS/cc-rs.git?branch=Triple_mips-zkm-zkvm-elf#22ef49e75e2b348e666781d43f67b7648e4bd50b"
113+
dependencies = [
114+
"shlex",
115+
]
116+
109117
[[package]]
110118
name = "cfg-if"
111119
version = "1.0.0"
@@ -165,7 +173,7 @@ version = "0.1.54"
165173
source = "registry+https://github.com/rust-lang/crates.io-index"
166174
checksum = "e7caa3f9de89ddbe2c607f4101924c5abec803763ae9534e4f4d7d8f84aa81f0"
167175
dependencies = [
168-
"cc",
176+
"cc 1.2.23",
169177
]
170178

171179
[[package]]
@@ -419,7 +427,7 @@ version = "0.1.20"
419427
source = "registry+https://github.com/rust-lang/crates.io-index"
420428
checksum = "5fda04ab3764e6cde78b9974eec4f779acaba7c4e84b36eca3cf77c581b85d27"
421429
dependencies = [
422-
"cc",
430+
"cc 1.2.23",
423431
"libc",
424432
"pkg-config",
425433
]

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)