rustc_target: Add target features for LoongArch v1.1
This commit is contained in:
parent
4559163ccb
commit
d989bf5bbe
6 changed files with 28 additions and 16 deletions
|
@ -603,13 +603,18 @@ static CSKY_FEATURES: &[(&str, Stability, ImpliedFeatures)] = &[
|
||||||
static LOONGARCH_FEATURES: &[(&str, Stability, ImpliedFeatures)] = &[
|
static LOONGARCH_FEATURES: &[(&str, Stability, ImpliedFeatures)] = &[
|
||||||
// tidy-alphabetical-start
|
// tidy-alphabetical-start
|
||||||
("d", Unstable(sym::loongarch_target_feature), &["f"]),
|
("d", Unstable(sym::loongarch_target_feature), &["f"]),
|
||||||
|
("div32", Unstable(sym::loongarch_target_feature), &[]),
|
||||||
("f", Unstable(sym::loongarch_target_feature), &[]),
|
("f", Unstable(sym::loongarch_target_feature), &[]),
|
||||||
("frecipe", Unstable(sym::loongarch_target_feature), &[]),
|
("frecipe", Unstable(sym::loongarch_target_feature), &[]),
|
||||||
|
("lam-bh", Unstable(sym::loongarch_target_feature), &[]),
|
||||||
|
("lamcas", Unstable(sym::loongarch_target_feature), &[]),
|
||||||
("lasx", Unstable(sym::loongarch_target_feature), &["lsx"]),
|
("lasx", Unstable(sym::loongarch_target_feature), &["lsx"]),
|
||||||
("lbt", Unstable(sym::loongarch_target_feature), &[]),
|
("lbt", Unstable(sym::loongarch_target_feature), &[]),
|
||||||
|
("ld-seq-sa", Unstable(sym::loongarch_target_feature), &[]),
|
||||||
("lsx", Unstable(sym::loongarch_target_feature), &["d"]),
|
("lsx", Unstable(sym::loongarch_target_feature), &["d"]),
|
||||||
("lvz", Unstable(sym::loongarch_target_feature), &[]),
|
("lvz", Unstable(sym::loongarch_target_feature), &[]),
|
||||||
("relax", Unstable(sym::loongarch_target_feature), &[]),
|
("relax", Unstable(sym::loongarch_target_feature), &[]),
|
||||||
|
("scq", Unstable(sym::loongarch_target_feature), &[]),
|
||||||
("ual", Unstable(sym::loongarch_target_feature), &[]),
|
("ual", Unstable(sym::loongarch_target_feature), &[]),
|
||||||
// tidy-alphabetical-end
|
// tidy-alphabetical-end
|
||||||
];
|
];
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
//@ revisions: loongarch64
|
//@ revisions: loongarch64
|
||||||
//@[loongarch64] compile-flags: --target loongarch64-unknown-linux-gnu
|
//@[loongarch64] compile-flags: --target loongarch64-unknown-linux-gnu
|
||||||
//@[loongarch64] needs-llvm-components: loongarch
|
//@[loongarch64] needs-llvm-components: loongarch
|
||||||
|
//@[loongarch64] min-llvm-version: 20
|
||||||
//FIXME: wasm is disabled due to <https://github.com/rust-lang/rust/issues/115666>.
|
//FIXME: wasm is disabled due to <https://github.com/rust-lang/rust/issues/115666>.
|
||||||
//FIXME @ revisions: wasm
|
//FIXME @ revisions: wasm
|
||||||
//FIXME @[wasm] compile-flags: --target wasm32-unknown-unknown
|
//FIXME @[wasm] compile-flags: --target wasm32-unknown-unknown
|
||||||
|
|
|
@ -1,35 +1,35 @@
|
||||||
error: invalid register `$r0`: constant zero cannot be used as an operand for inline asm
|
error: invalid register `$r0`: constant zero cannot be used as an operand for inline asm
|
||||||
--> $DIR/bad-reg.rs:22:18
|
--> $DIR/bad-reg.rs:23:18
|
||||||
|
|
|
|
||||||
LL | asm!("", out("$r0") _);
|
LL | asm!("", out("$r0") _);
|
||||||
| ^^^^^^^^^^^^
|
| ^^^^^^^^^^^^
|
||||||
|
|
||||||
error: invalid register `$tp`: reserved for TLS
|
error: invalid register `$tp`: reserved for TLS
|
||||||
--> $DIR/bad-reg.rs:24:18
|
--> $DIR/bad-reg.rs:25:18
|
||||||
|
|
|
|
||||||
LL | asm!("", out("$tp") _);
|
LL | asm!("", out("$tp") _);
|
||||||
| ^^^^^^^^^^^^
|
| ^^^^^^^^^^^^
|
||||||
|
|
||||||
error: invalid register `$sp`: the stack pointer cannot be used as an operand for inline asm
|
error: invalid register `$sp`: the stack pointer cannot be used as an operand for inline asm
|
||||||
--> $DIR/bad-reg.rs:26:18
|
--> $DIR/bad-reg.rs:27:18
|
||||||
|
|
|
|
||||||
LL | asm!("", out("$sp") _);
|
LL | asm!("", out("$sp") _);
|
||||||
| ^^^^^^^^^^^^
|
| ^^^^^^^^^^^^
|
||||||
|
|
||||||
error: invalid register `$r21`: reserved by the ABI
|
error: invalid register `$r21`: reserved by the ABI
|
||||||
--> $DIR/bad-reg.rs:28:18
|
--> $DIR/bad-reg.rs:29:18
|
||||||
|
|
|
|
||||||
LL | asm!("", out("$r21") _);
|
LL | asm!("", out("$r21") _);
|
||||||
| ^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: invalid register `$fp`: the frame pointer cannot be used as an operand for inline asm
|
error: invalid register `$fp`: the frame pointer cannot be used as an operand for inline asm
|
||||||
--> $DIR/bad-reg.rs:30:18
|
--> $DIR/bad-reg.rs:31:18
|
||||||
|
|
|
|
||||||
LL | asm!("", out("$fp") _);
|
LL | asm!("", out("$fp") _);
|
||||||
| ^^^^^^^^^^^^
|
| ^^^^^^^^^^^^
|
||||||
|
|
||||||
error: invalid register `$r31`: $r31 is used internally by LLVM and cannot be used as an operand for inline asm
|
error: invalid register `$r31`: $r31 is used internally by LLVM and cannot be used as an operand for inline asm
|
||||||
--> $DIR/bad-reg.rs:32:18
|
--> $DIR/bad-reg.rs:33:18
|
||||||
|
|
|
|
||||||
LL | asm!("", out("$r31") _);
|
LL | asm!("", out("$r31") _);
|
||||||
| ^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^
|
||||||
|
|
|
@ -1,59 +1,59 @@
|
||||||
error: invalid register `$r0`: constant zero cannot be used as an operand for inline asm
|
error: invalid register `$r0`: constant zero cannot be used as an operand for inline asm
|
||||||
--> $DIR/bad-reg.rs:22:18
|
--> $DIR/bad-reg.rs:23:18
|
||||||
|
|
|
|
||||||
LL | asm!("", out("$r0") _);
|
LL | asm!("", out("$r0") _);
|
||||||
| ^^^^^^^^^^^^
|
| ^^^^^^^^^^^^
|
||||||
|
|
||||||
error: invalid register `$tp`: reserved for TLS
|
error: invalid register `$tp`: reserved for TLS
|
||||||
--> $DIR/bad-reg.rs:24:18
|
--> $DIR/bad-reg.rs:25:18
|
||||||
|
|
|
|
||||||
LL | asm!("", out("$tp") _);
|
LL | asm!("", out("$tp") _);
|
||||||
| ^^^^^^^^^^^^
|
| ^^^^^^^^^^^^
|
||||||
|
|
||||||
error: invalid register `$sp`: the stack pointer cannot be used as an operand for inline asm
|
error: invalid register `$sp`: the stack pointer cannot be used as an operand for inline asm
|
||||||
--> $DIR/bad-reg.rs:26:18
|
--> $DIR/bad-reg.rs:27:18
|
||||||
|
|
|
|
||||||
LL | asm!("", out("$sp") _);
|
LL | asm!("", out("$sp") _);
|
||||||
| ^^^^^^^^^^^^
|
| ^^^^^^^^^^^^
|
||||||
|
|
||||||
error: invalid register `$r21`: reserved by the ABI
|
error: invalid register `$r21`: reserved by the ABI
|
||||||
--> $DIR/bad-reg.rs:28:18
|
--> $DIR/bad-reg.rs:29:18
|
||||||
|
|
|
|
||||||
LL | asm!("", out("$r21") _);
|
LL | asm!("", out("$r21") _);
|
||||||
| ^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: invalid register `$fp`: the frame pointer cannot be used as an operand for inline asm
|
error: invalid register `$fp`: the frame pointer cannot be used as an operand for inline asm
|
||||||
--> $DIR/bad-reg.rs:30:18
|
--> $DIR/bad-reg.rs:31:18
|
||||||
|
|
|
|
||||||
LL | asm!("", out("$fp") _);
|
LL | asm!("", out("$fp") _);
|
||||||
| ^^^^^^^^^^^^
|
| ^^^^^^^^^^^^
|
||||||
|
|
||||||
error: invalid register `$r31`: $r31 is used internally by LLVM and cannot be used as an operand for inline asm
|
error: invalid register `$r31`: $r31 is used internally by LLVM and cannot be used as an operand for inline asm
|
||||||
--> $DIR/bad-reg.rs:32:18
|
--> $DIR/bad-reg.rs:33:18
|
||||||
|
|
|
|
||||||
LL | asm!("", out("$r31") _);
|
LL | asm!("", out("$r31") _);
|
||||||
| ^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: register class `freg` requires at least one of the following target features: d, f
|
error: register class `freg` requires at least one of the following target features: d, f
|
||||||
--> $DIR/bad-reg.rs:36:26
|
--> $DIR/bad-reg.rs:37:26
|
||||||
|
|
|
|
||||||
LL | asm!("/* {} */", in(freg) f);
|
LL | asm!("/* {} */", in(freg) f);
|
||||||
| ^^^^^^^^^^
|
| ^^^^^^^^^^
|
||||||
|
|
||||||
error: register class `freg` requires at least one of the following target features: d, f
|
error: register class `freg` requires at least one of the following target features: d, f
|
||||||
--> $DIR/bad-reg.rs:38:26
|
--> $DIR/bad-reg.rs:39:26
|
||||||
|
|
|
|
||||||
LL | asm!("/* {} */", out(freg) _);
|
LL | asm!("/* {} */", out(freg) _);
|
||||||
| ^^^^^^^^^^^
|
| ^^^^^^^^^^^
|
||||||
|
|
||||||
error: register class `freg` requires at least one of the following target features: d, f
|
error: register class `freg` requires at least one of the following target features: d, f
|
||||||
--> $DIR/bad-reg.rs:40:26
|
--> $DIR/bad-reg.rs:41:26
|
||||||
|
|
|
|
||||||
LL | asm!("/* {} */", in(freg) d);
|
LL | asm!("/* {} */", in(freg) d);
|
||||||
| ^^^^^^^^^^
|
| ^^^^^^^^^^
|
||||||
|
|
||||||
error: register class `freg` requires at least one of the following target features: d, f
|
error: register class `freg` requires at least one of the following target features: d, f
|
||||||
--> $DIR/bad-reg.rs:42:26
|
--> $DIR/bad-reg.rs:43:26
|
||||||
|
|
|
|
||||||
LL | asm!("/* {} */", out(freg) d);
|
LL | asm!("/* {} */", out(freg) d);
|
||||||
| ^^^^^^^^^^^
|
| ^^^^^^^^^^^
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
//@ add-core-stubs
|
//@ add-core-stubs
|
||||||
//@ needs-asm-support
|
//@ needs-asm-support
|
||||||
//@ revisions: loongarch64_lp64d loongarch64_lp64s
|
//@ revisions: loongarch64_lp64d loongarch64_lp64s
|
||||||
|
//@ min-llvm-version: 20
|
||||||
//@[loongarch64_lp64d] compile-flags: --target loongarch64-unknown-linux-gnu
|
//@[loongarch64_lp64d] compile-flags: --target loongarch64-unknown-linux-gnu
|
||||||
//@[loongarch64_lp64d] needs-llvm-components: loongarch
|
//@[loongarch64_lp64d] needs-llvm-components: loongarch
|
||||||
//@[loongarch64_lp64s] compile-flags: --target loongarch64-unknown-none-softfloat
|
//@[loongarch64_lp64s] compile-flags: --target loongarch64-unknown-none-softfloat
|
||||||
|
|
|
@ -60,6 +60,7 @@ LL | cfg!(target_feature = "_UNEXPECTED_VALUE");
|
||||||
`d32`
|
`d32`
|
||||||
`deflate-conversion`
|
`deflate-conversion`
|
||||||
`dit`
|
`dit`
|
||||||
|
`div32`
|
||||||
`doloop`
|
`doloop`
|
||||||
`dotprod`
|
`dotprod`
|
||||||
`dpb`
|
`dpb`
|
||||||
|
@ -133,8 +134,11 @@ LL | cfg!(target_feature = "_UNEXPECTED_VALUE");
|
||||||
`jsconv`
|
`jsconv`
|
||||||
`kl`
|
`kl`
|
||||||
`lahfsahf`
|
`lahfsahf`
|
||||||
|
`lam-bh`
|
||||||
|
`lamcas`
|
||||||
`lasx`
|
`lasx`
|
||||||
`lbt`
|
`lbt`
|
||||||
|
`ld-seq-sa`
|
||||||
`leoncasa`
|
`leoncasa`
|
||||||
`lor`
|
`lor`
|
||||||
`lse`
|
`lse`
|
||||||
|
@ -190,6 +194,7 @@ LL | cfg!(target_feature = "_UNEXPECTED_VALUE");
|
||||||
`reserve-x18`
|
`reserve-x18`
|
||||||
`rtm`
|
`rtm`
|
||||||
`sb`
|
`sb`
|
||||||
|
`scq`
|
||||||
`sha`
|
`sha`
|
||||||
`sha2`
|
`sha2`
|
||||||
`sha3`
|
`sha3`
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue