Move tests/ui/abi/riscv32e-registers.rs to tests/ui/asm/riscv
This also adds comments explaining the difference to bad-reg.rs.
This commit is contained in:
parent
a7520adc29
commit
b07232d95d
@ -1,191 +1,191 @@
|
||||
error: invalid register `s1`: s1 is used internally by LLVM and cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:31:18
|
||||
--> $DIR/bad-reg.rs:34:18
|
||||
|
|
||||
LL | asm!("", out("s1") _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: invalid register `fp`: the frame pointer cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:33:18
|
||||
--> $DIR/bad-reg.rs:36:18
|
||||
|
|
||||
LL | asm!("", out("fp") _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: invalid register `sp`: the stack pointer cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:35:18
|
||||
--> $DIR/bad-reg.rs:38:18
|
||||
|
|
||||
LL | asm!("", out("sp") _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: invalid register `gp`: the global pointer cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:37:18
|
||||
--> $DIR/bad-reg.rs:40:18
|
||||
|
|
||||
LL | asm!("", out("gp") _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: invalid register `gp`: the global pointer cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:39:18
|
||||
--> $DIR/bad-reg.rs:42:18
|
||||
|
|
||||
LL | asm!("", out("gp") _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: invalid register `tp`: the thread pointer cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:41:18
|
||||
--> $DIR/bad-reg.rs:44:18
|
||||
|
|
||||
LL | asm!("", out("tp") _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: invalid register `zero`: the zero register cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:43:18
|
||||
--> $DIR/bad-reg.rs:46:18
|
||||
|
|
||||
LL | asm!("", out("zero") _);
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error: register class `vreg` can only be used as a clobber, not as an input or output
|
||||
--> $DIR/bad-reg.rs:94:18
|
||||
--> $DIR/bad-reg.rs:97:18
|
||||
|
|
||||
LL | asm!("", in("v0") x);
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: register class `vreg` can only be used as a clobber, not as an input or output
|
||||
--> $DIR/bad-reg.rs:97:18
|
||||
--> $DIR/bad-reg.rs:100:18
|
||||
|
|
||||
LL | asm!("", out("v0") x);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: register class `vreg` can only be used as a clobber, not as an input or output
|
||||
--> $DIR/bad-reg.rs:100:26
|
||||
--> $DIR/bad-reg.rs:103:26
|
||||
|
|
||||
LL | asm!("/* {} */", in(vreg) x);
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: register class `vreg` can only be used as a clobber, not as an input or output
|
||||
--> $DIR/bad-reg.rs:103:26
|
||||
--> $DIR/bad-reg.rs:106:26
|
||||
|
|
||||
LL | asm!("/* {} */", out(vreg) _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: cannot use register `x16`: register can't be used with the `e` target feature
|
||||
--> $DIR/bad-reg.rs:46:18
|
||||
--> $DIR/bad-reg.rs:49:18
|
||||
|
|
||||
LL | asm!("", out("x16") _);
|
||||
| ^^^^^^^^^^^^
|
||||
|
||||
error: cannot use register `x17`: register can't be used with the `e` target feature
|
||||
--> $DIR/bad-reg.rs:48:18
|
||||
--> $DIR/bad-reg.rs:51:18
|
||||
|
|
||||
LL | asm!("", out("x17") _);
|
||||
| ^^^^^^^^^^^^
|
||||
|
||||
error: cannot use register `x18`: register can't be used with the `e` target feature
|
||||
--> $DIR/bad-reg.rs:50:18
|
||||
--> $DIR/bad-reg.rs:53:18
|
||||
|
|
||||
LL | asm!("", out("x18") _);
|
||||
| ^^^^^^^^^^^^
|
||||
|
||||
error: cannot use register `x19`: register can't be used with the `e` target feature
|
||||
--> $DIR/bad-reg.rs:52:18
|
||||
--> $DIR/bad-reg.rs:55:18
|
||||
|
|
||||
LL | asm!("", out("x19") _);
|
||||
| ^^^^^^^^^^^^
|
||||
|
||||
error: cannot use register `x20`: register can't be used with the `e` target feature
|
||||
--> $DIR/bad-reg.rs:54:18
|
||||
--> $DIR/bad-reg.rs:57:18
|
||||
|
|
||||
LL | asm!("", out("x20") _);
|
||||
| ^^^^^^^^^^^^
|
||||
|
||||
error: cannot use register `x21`: register can't be used with the `e` target feature
|
||||
--> $DIR/bad-reg.rs:56:18
|
||||
--> $DIR/bad-reg.rs:59:18
|
||||
|
|
||||
LL | asm!("", out("x21") _);
|
||||
| ^^^^^^^^^^^^
|
||||
|
||||
error: cannot use register `x22`: register can't be used with the `e` target feature
|
||||
--> $DIR/bad-reg.rs:58:18
|
||||
--> $DIR/bad-reg.rs:61:18
|
||||
|
|
||||
LL | asm!("", out("x22") _);
|
||||
| ^^^^^^^^^^^^
|
||||
|
||||
error: cannot use register `x23`: register can't be used with the `e` target feature
|
||||
--> $DIR/bad-reg.rs:60:18
|
||||
--> $DIR/bad-reg.rs:63:18
|
||||
|
|
||||
LL | asm!("", out("x23") _);
|
||||
| ^^^^^^^^^^^^
|
||||
|
||||
error: cannot use register `x24`: register can't be used with the `e` target feature
|
||||
--> $DIR/bad-reg.rs:62:18
|
||||
--> $DIR/bad-reg.rs:65:18
|
||||
|
|
||||
LL | asm!("", out("x24") _);
|
||||
| ^^^^^^^^^^^^
|
||||
|
||||
error: cannot use register `x25`: register can't be used with the `e` target feature
|
||||
--> $DIR/bad-reg.rs:64:18
|
||||
--> $DIR/bad-reg.rs:67:18
|
||||
|
|
||||
LL | asm!("", out("x25") _);
|
||||
| ^^^^^^^^^^^^
|
||||
|
||||
error: cannot use register `x26`: register can't be used with the `e` target feature
|
||||
--> $DIR/bad-reg.rs:66:18
|
||||
--> $DIR/bad-reg.rs:69:18
|
||||
|
|
||||
LL | asm!("", out("x26") _);
|
||||
| ^^^^^^^^^^^^
|
||||
|
||||
error: cannot use register `x27`: register can't be used with the `e` target feature
|
||||
--> $DIR/bad-reg.rs:68:18
|
||||
--> $DIR/bad-reg.rs:71:18
|
||||
|
|
||||
LL | asm!("", out("x27") _);
|
||||
| ^^^^^^^^^^^^
|
||||
|
||||
error: cannot use register `x28`: register can't be used with the `e` target feature
|
||||
--> $DIR/bad-reg.rs:70:18
|
||||
--> $DIR/bad-reg.rs:73:18
|
||||
|
|
||||
LL | asm!("", out("x28") _);
|
||||
| ^^^^^^^^^^^^
|
||||
|
||||
error: cannot use register `x29`: register can't be used with the `e` target feature
|
||||
--> $DIR/bad-reg.rs:72:18
|
||||
--> $DIR/bad-reg.rs:75:18
|
||||
|
|
||||
LL | asm!("", out("x29") _);
|
||||
| ^^^^^^^^^^^^
|
||||
|
||||
error: cannot use register `x30`: register can't be used with the `e` target feature
|
||||
--> $DIR/bad-reg.rs:74:18
|
||||
--> $DIR/bad-reg.rs:77:18
|
||||
|
|
||||
LL | asm!("", out("x30") _);
|
||||
| ^^^^^^^^^^^^
|
||||
|
||||
error: cannot use register `x31`: register can't be used with the `e` target feature
|
||||
--> $DIR/bad-reg.rs:76:18
|
||||
--> $DIR/bad-reg.rs:79:18
|
||||
|
|
||||
LL | asm!("", out("x31") _);
|
||||
| ^^^^^^^^^^^^
|
||||
|
||||
error: register class `freg` requires at least one of the following target features: d, f
|
||||
--> $DIR/bad-reg.rs:80:26
|
||||
--> $DIR/bad-reg.rs:83:26
|
||||
|
|
||||
LL | asm!("/* {} */", in(freg) f);
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: register class `freg` requires at least one of the following target features: d, f
|
||||
--> $DIR/bad-reg.rs:82:26
|
||||
--> $DIR/bad-reg.rs:85:26
|
||||
|
|
||||
LL | asm!("/* {} */", out(freg) _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: register class `freg` requires at least one of the following target features: d, f
|
||||
--> $DIR/bad-reg.rs:84:26
|
||||
--> $DIR/bad-reg.rs:87:26
|
||||
|
|
||||
LL | asm!("/* {} */", in(freg) d);
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: register class `freg` requires at least one of the following target features: d, f
|
||||
--> $DIR/bad-reg.rs:87:26
|
||||
--> $DIR/bad-reg.rs:90:26
|
||||
|
|
||||
LL | asm!("/* {} */", out(freg) d);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: type `i32` cannot be used with this register class
|
||||
--> $DIR/bad-reg.rs:94:27
|
||||
--> $DIR/bad-reg.rs:97:27
|
||||
|
|
||||
LL | asm!("", in("v0") x);
|
||||
| ^
|
||||
@ -193,7 +193,7 @@ LL | asm!("", in("v0") x);
|
||||
= note: register class `vreg` supports these types:
|
||||
|
||||
error: type `i32` cannot be used with this register class
|
||||
--> $DIR/bad-reg.rs:97:28
|
||||
--> $DIR/bad-reg.rs:100:28
|
||||
|
|
||||
LL | asm!("", out("v0") x);
|
||||
| ^
|
||||
@ -201,7 +201,7 @@ LL | asm!("", out("v0") x);
|
||||
= note: register class `vreg` supports these types:
|
||||
|
||||
error: type `i32` cannot be used with this register class
|
||||
--> $DIR/bad-reg.rs:100:35
|
||||
--> $DIR/bad-reg.rs:103:35
|
||||
|
|
||||
LL | asm!("/* {} */", in(vreg) x);
|
||||
| ^
|
||||
|
@ -1,71 +1,71 @@
|
||||
error: invalid register `s1`: s1 is used internally by LLVM and cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:31:18
|
||||
--> $DIR/bad-reg.rs:34:18
|
||||
|
|
||||
LL | asm!("", out("s1") _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: invalid register `fp`: the frame pointer cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:33:18
|
||||
--> $DIR/bad-reg.rs:36:18
|
||||
|
|
||||
LL | asm!("", out("fp") _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: invalid register `sp`: the stack pointer cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:35:18
|
||||
--> $DIR/bad-reg.rs:38:18
|
||||
|
|
||||
LL | asm!("", out("sp") _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: invalid register `gp`: the global pointer cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:37:18
|
||||
--> $DIR/bad-reg.rs:40:18
|
||||
|
|
||||
LL | asm!("", out("gp") _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: invalid register `gp`: the global pointer cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:39:18
|
||||
--> $DIR/bad-reg.rs:42:18
|
||||
|
|
||||
LL | asm!("", out("gp") _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: invalid register `tp`: the thread pointer cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:41:18
|
||||
--> $DIR/bad-reg.rs:44:18
|
||||
|
|
||||
LL | asm!("", out("tp") _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: invalid register `zero`: the zero register cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:43:18
|
||||
--> $DIR/bad-reg.rs:46:18
|
||||
|
|
||||
LL | asm!("", out("zero") _);
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error: register class `vreg` can only be used as a clobber, not as an input or output
|
||||
--> $DIR/bad-reg.rs:94:18
|
||||
--> $DIR/bad-reg.rs:97:18
|
||||
|
|
||||
LL | asm!("", in("v0") x);
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: register class `vreg` can only be used as a clobber, not as an input or output
|
||||
--> $DIR/bad-reg.rs:97:18
|
||||
--> $DIR/bad-reg.rs:100:18
|
||||
|
|
||||
LL | asm!("", out("v0") x);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: register class `vreg` can only be used as a clobber, not as an input or output
|
||||
--> $DIR/bad-reg.rs:100:26
|
||||
--> $DIR/bad-reg.rs:103:26
|
||||
|
|
||||
LL | asm!("/* {} */", in(vreg) x);
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: register class `vreg` can only be used as a clobber, not as an input or output
|
||||
--> $DIR/bad-reg.rs:103:26
|
||||
--> $DIR/bad-reg.rs:106:26
|
||||
|
|
||||
LL | asm!("/* {} */", out(vreg) _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: type `i32` cannot be used with this register class
|
||||
--> $DIR/bad-reg.rs:94:27
|
||||
--> $DIR/bad-reg.rs:97:27
|
||||
|
|
||||
LL | asm!("", in("v0") x);
|
||||
| ^
|
||||
@ -73,7 +73,7 @@ LL | asm!("", in("v0") x);
|
||||
= note: register class `vreg` supports these types:
|
||||
|
||||
error: type `i32` cannot be used with this register class
|
||||
--> $DIR/bad-reg.rs:97:28
|
||||
--> $DIR/bad-reg.rs:100:28
|
||||
|
|
||||
LL | asm!("", out("v0") x);
|
||||
| ^
|
||||
@ -81,7 +81,7 @@ LL | asm!("", out("v0") x);
|
||||
= note: register class `vreg` supports these types:
|
||||
|
||||
error: type `i32` cannot be used with this register class
|
||||
--> $DIR/bad-reg.rs:100:35
|
||||
--> $DIR/bad-reg.rs:103:35
|
||||
|
|
||||
LL | asm!("/* {} */", in(vreg) x);
|
||||
| ^
|
||||
|
@ -1,95 +1,95 @@
|
||||
error: invalid register `s1`: s1 is used internally by LLVM and cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:31:18
|
||||
--> $DIR/bad-reg.rs:34:18
|
||||
|
|
||||
LL | asm!("", out("s1") _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: invalid register `fp`: the frame pointer cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:33:18
|
||||
--> $DIR/bad-reg.rs:36:18
|
||||
|
|
||||
LL | asm!("", out("fp") _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: invalid register `sp`: the stack pointer cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:35:18
|
||||
--> $DIR/bad-reg.rs:38:18
|
||||
|
|
||||
LL | asm!("", out("sp") _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: invalid register `gp`: the global pointer cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:37:18
|
||||
--> $DIR/bad-reg.rs:40:18
|
||||
|
|
||||
LL | asm!("", out("gp") _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: invalid register `gp`: the global pointer cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:39:18
|
||||
--> $DIR/bad-reg.rs:42:18
|
||||
|
|
||||
LL | asm!("", out("gp") _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: invalid register `tp`: the thread pointer cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:41:18
|
||||
--> $DIR/bad-reg.rs:44:18
|
||||
|
|
||||
LL | asm!("", out("tp") _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: invalid register `zero`: the zero register cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:43:18
|
||||
--> $DIR/bad-reg.rs:46:18
|
||||
|
|
||||
LL | asm!("", out("zero") _);
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error: register class `vreg` can only be used as a clobber, not as an input or output
|
||||
--> $DIR/bad-reg.rs:94:18
|
||||
--> $DIR/bad-reg.rs:97:18
|
||||
|
|
||||
LL | asm!("", in("v0") x);
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: register class `vreg` can only be used as a clobber, not as an input or output
|
||||
--> $DIR/bad-reg.rs:97:18
|
||||
--> $DIR/bad-reg.rs:100:18
|
||||
|
|
||||
LL | asm!("", out("v0") x);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: register class `vreg` can only be used as a clobber, not as an input or output
|
||||
--> $DIR/bad-reg.rs:100:26
|
||||
--> $DIR/bad-reg.rs:103:26
|
||||
|
|
||||
LL | asm!("/* {} */", in(vreg) x);
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: register class `vreg` can only be used as a clobber, not as an input or output
|
||||
--> $DIR/bad-reg.rs:103:26
|
||||
--> $DIR/bad-reg.rs:106:26
|
||||
|
|
||||
LL | asm!("/* {} */", out(vreg) _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: register class `freg` requires at least one of the following target features: d, f
|
||||
--> $DIR/bad-reg.rs:80:26
|
||||
--> $DIR/bad-reg.rs:83:26
|
||||
|
|
||||
LL | asm!("/* {} */", in(freg) f);
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: register class `freg` requires at least one of the following target features: d, f
|
||||
--> $DIR/bad-reg.rs:82:26
|
||||
--> $DIR/bad-reg.rs:85:26
|
||||
|
|
||||
LL | asm!("/* {} */", out(freg) _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: register class `freg` requires at least one of the following target features: d, f
|
||||
--> $DIR/bad-reg.rs:84:26
|
||||
--> $DIR/bad-reg.rs:87:26
|
||||
|
|
||||
LL | asm!("/* {} */", in(freg) d);
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: register class `freg` requires at least one of the following target features: d, f
|
||||
--> $DIR/bad-reg.rs:87:26
|
||||
--> $DIR/bad-reg.rs:90:26
|
||||
|
|
||||
LL | asm!("/* {} */", out(freg) d);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: type `i32` cannot be used with this register class
|
||||
--> $DIR/bad-reg.rs:94:27
|
||||
--> $DIR/bad-reg.rs:97:27
|
||||
|
|
||||
LL | asm!("", in("v0") x);
|
||||
| ^
|
||||
@ -97,7 +97,7 @@ LL | asm!("", in("v0") x);
|
||||
= note: register class `vreg` supports these types:
|
||||
|
||||
error: type `i32` cannot be used with this register class
|
||||
--> $DIR/bad-reg.rs:97:28
|
||||
--> $DIR/bad-reg.rs:100:28
|
||||
|
|
||||
LL | asm!("", out("v0") x);
|
||||
| ^
|
||||
@ -105,7 +105,7 @@ LL | asm!("", out("v0") x);
|
||||
= note: register class `vreg` supports these types:
|
||||
|
||||
error: type `i32` cannot be used with this register class
|
||||
--> $DIR/bad-reg.rs:100:35
|
||||
--> $DIR/bad-reg.rs:103:35
|
||||
|
|
||||
LL | asm!("/* {} */", in(vreg) x);
|
||||
| ^
|
||||
|
@ -1,71 +1,71 @@
|
||||
error: invalid register `s1`: s1 is used internally by LLVM and cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:31:18
|
||||
--> $DIR/bad-reg.rs:34:18
|
||||
|
|
||||
LL | asm!("", out("s1") _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: invalid register `fp`: the frame pointer cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:33:18
|
||||
--> $DIR/bad-reg.rs:36:18
|
||||
|
|
||||
LL | asm!("", out("fp") _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: invalid register `sp`: the stack pointer cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:35:18
|
||||
--> $DIR/bad-reg.rs:38:18
|
||||
|
|
||||
LL | asm!("", out("sp") _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: invalid register `gp`: the global pointer cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:37:18
|
||||
--> $DIR/bad-reg.rs:40:18
|
||||
|
|
||||
LL | asm!("", out("gp") _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: invalid register `gp`: the global pointer cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:39:18
|
||||
--> $DIR/bad-reg.rs:42:18
|
||||
|
|
||||
LL | asm!("", out("gp") _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: invalid register `tp`: the thread pointer cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:41:18
|
||||
--> $DIR/bad-reg.rs:44:18
|
||||
|
|
||||
LL | asm!("", out("tp") _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: invalid register `zero`: the zero register cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:43:18
|
||||
--> $DIR/bad-reg.rs:46:18
|
||||
|
|
||||
LL | asm!("", out("zero") _);
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error: register class `vreg` can only be used as a clobber, not as an input or output
|
||||
--> $DIR/bad-reg.rs:94:18
|
||||
--> $DIR/bad-reg.rs:97:18
|
||||
|
|
||||
LL | asm!("", in("v0") x);
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: register class `vreg` can only be used as a clobber, not as an input or output
|
||||
--> $DIR/bad-reg.rs:97:18
|
||||
--> $DIR/bad-reg.rs:100:18
|
||||
|
|
||||
LL | asm!("", out("v0") x);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: register class `vreg` can only be used as a clobber, not as an input or output
|
||||
--> $DIR/bad-reg.rs:100:26
|
||||
--> $DIR/bad-reg.rs:103:26
|
||||
|
|
||||
LL | asm!("/* {} */", in(vreg) x);
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: register class `vreg` can only be used as a clobber, not as an input or output
|
||||
--> $DIR/bad-reg.rs:103:26
|
||||
--> $DIR/bad-reg.rs:106:26
|
||||
|
|
||||
LL | asm!("/* {} */", out(vreg) _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: `d` target feature is not enabled
|
||||
--> $DIR/bad-reg.rs:84:35
|
||||
--> $DIR/bad-reg.rs:87:35
|
||||
|
|
||||
LL | asm!("/* {} */", in(freg) d);
|
||||
| ^
|
||||
@ -73,7 +73,7 @@ LL | asm!("/* {} */", in(freg) d);
|
||||
= note: this is required to use type `f64` with register class `freg`
|
||||
|
||||
error: `d` target feature is not enabled
|
||||
--> $DIR/bad-reg.rs:87:36
|
||||
--> $DIR/bad-reg.rs:90:36
|
||||
|
|
||||
LL | asm!("/* {} */", out(freg) d);
|
||||
| ^
|
||||
@ -81,7 +81,7 @@ LL | asm!("/* {} */", out(freg) d);
|
||||
= note: this is required to use type `f64` with register class `freg`
|
||||
|
||||
error: type `i32` cannot be used with this register class
|
||||
--> $DIR/bad-reg.rs:94:27
|
||||
--> $DIR/bad-reg.rs:97:27
|
||||
|
|
||||
LL | asm!("", in("v0") x);
|
||||
| ^
|
||||
@ -89,7 +89,7 @@ LL | asm!("", in("v0") x);
|
||||
= note: register class `vreg` supports these types:
|
||||
|
||||
error: type `i32` cannot be used with this register class
|
||||
--> $DIR/bad-reg.rs:97:28
|
||||
--> $DIR/bad-reg.rs:100:28
|
||||
|
|
||||
LL | asm!("", out("v0") x);
|
||||
| ^
|
||||
@ -97,7 +97,7 @@ LL | asm!("", out("v0") x);
|
||||
= note: register class `vreg` supports these types:
|
||||
|
||||
error: type `i32` cannot be used with this register class
|
||||
--> $DIR/bad-reg.rs:100:35
|
||||
--> $DIR/bad-reg.rs:103:35
|
||||
|
|
||||
LL | asm!("/* {} */", in(vreg) x);
|
||||
| ^
|
||||
|
@ -1,71 +1,71 @@
|
||||
error: invalid register `s1`: s1 is used internally by LLVM and cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:31:18
|
||||
--> $DIR/bad-reg.rs:34:18
|
||||
|
|
||||
LL | asm!("", out("s1") _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: invalid register `fp`: the frame pointer cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:33:18
|
||||
--> $DIR/bad-reg.rs:36:18
|
||||
|
|
||||
LL | asm!("", out("fp") _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: invalid register `sp`: the stack pointer cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:35:18
|
||||
--> $DIR/bad-reg.rs:38:18
|
||||
|
|
||||
LL | asm!("", out("sp") _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: invalid register `gp`: the global pointer cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:37:18
|
||||
--> $DIR/bad-reg.rs:40:18
|
||||
|
|
||||
LL | asm!("", out("gp") _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: invalid register `gp`: the global pointer cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:39:18
|
||||
--> $DIR/bad-reg.rs:42:18
|
||||
|
|
||||
LL | asm!("", out("gp") _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: invalid register `tp`: the thread pointer cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:41:18
|
||||
--> $DIR/bad-reg.rs:44:18
|
||||
|
|
||||
LL | asm!("", out("tp") _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: invalid register `zero`: the zero register cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:43:18
|
||||
--> $DIR/bad-reg.rs:46:18
|
||||
|
|
||||
LL | asm!("", out("zero") _);
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error: register class `vreg` can only be used as a clobber, not as an input or output
|
||||
--> $DIR/bad-reg.rs:94:18
|
||||
--> $DIR/bad-reg.rs:97:18
|
||||
|
|
||||
LL | asm!("", in("v0") x);
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: register class `vreg` can only be used as a clobber, not as an input or output
|
||||
--> $DIR/bad-reg.rs:97:18
|
||||
--> $DIR/bad-reg.rs:100:18
|
||||
|
|
||||
LL | asm!("", out("v0") x);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: register class `vreg` can only be used as a clobber, not as an input or output
|
||||
--> $DIR/bad-reg.rs:100:26
|
||||
--> $DIR/bad-reg.rs:103:26
|
||||
|
|
||||
LL | asm!("/* {} */", in(vreg) x);
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: register class `vreg` can only be used as a clobber, not as an input or output
|
||||
--> $DIR/bad-reg.rs:103:26
|
||||
--> $DIR/bad-reg.rs:106:26
|
||||
|
|
||||
LL | asm!("/* {} */", out(vreg) _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: type `i32` cannot be used with this register class
|
||||
--> $DIR/bad-reg.rs:94:27
|
||||
--> $DIR/bad-reg.rs:97:27
|
||||
|
|
||||
LL | asm!("", in("v0") x);
|
||||
| ^
|
||||
@ -73,7 +73,7 @@ LL | asm!("", in("v0") x);
|
||||
= note: register class `vreg` supports these types:
|
||||
|
||||
error: type `i32` cannot be used with this register class
|
||||
--> $DIR/bad-reg.rs:97:28
|
||||
--> $DIR/bad-reg.rs:100:28
|
||||
|
|
||||
LL | asm!("", out("v0") x);
|
||||
| ^
|
||||
@ -81,7 +81,7 @@ LL | asm!("", out("v0") x);
|
||||
= note: register class `vreg` supports these types:
|
||||
|
||||
error: type `i32` cannot be used with this register class
|
||||
--> $DIR/bad-reg.rs:100:35
|
||||
--> $DIR/bad-reg.rs:103:35
|
||||
|
|
||||
LL | asm!("/* {} */", in(vreg) x);
|
||||
| ^
|
||||
|
@ -1,95 +1,95 @@
|
||||
error: invalid register `s1`: s1 is used internally by LLVM and cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:31:18
|
||||
--> $DIR/bad-reg.rs:34:18
|
||||
|
|
||||
LL | asm!("", out("s1") _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: invalid register `fp`: the frame pointer cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:33:18
|
||||
--> $DIR/bad-reg.rs:36:18
|
||||
|
|
||||
LL | asm!("", out("fp") _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: invalid register `sp`: the stack pointer cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:35:18
|
||||
--> $DIR/bad-reg.rs:38:18
|
||||
|
|
||||
LL | asm!("", out("sp") _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: invalid register `gp`: the global pointer cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:37:18
|
||||
--> $DIR/bad-reg.rs:40:18
|
||||
|
|
||||
LL | asm!("", out("gp") _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: invalid register `gp`: the global pointer cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:39:18
|
||||
--> $DIR/bad-reg.rs:42:18
|
||||
|
|
||||
LL | asm!("", out("gp") _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: invalid register `tp`: the thread pointer cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:41:18
|
||||
--> $DIR/bad-reg.rs:44:18
|
||||
|
|
||||
LL | asm!("", out("tp") _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: invalid register `zero`: the zero register cannot be used as an operand for inline asm
|
||||
--> $DIR/bad-reg.rs:43:18
|
||||
--> $DIR/bad-reg.rs:46:18
|
||||
|
|
||||
LL | asm!("", out("zero") _);
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error: register class `vreg` can only be used as a clobber, not as an input or output
|
||||
--> $DIR/bad-reg.rs:94:18
|
||||
--> $DIR/bad-reg.rs:97:18
|
||||
|
|
||||
LL | asm!("", in("v0") x);
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: register class `vreg` can only be used as a clobber, not as an input or output
|
||||
--> $DIR/bad-reg.rs:97:18
|
||||
--> $DIR/bad-reg.rs:100:18
|
||||
|
|
||||
LL | asm!("", out("v0") x);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: register class `vreg` can only be used as a clobber, not as an input or output
|
||||
--> $DIR/bad-reg.rs:100:26
|
||||
--> $DIR/bad-reg.rs:103:26
|
||||
|
|
||||
LL | asm!("/* {} */", in(vreg) x);
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: register class `vreg` can only be used as a clobber, not as an input or output
|
||||
--> $DIR/bad-reg.rs:103:26
|
||||
--> $DIR/bad-reg.rs:106:26
|
||||
|
|
||||
LL | asm!("/* {} */", out(vreg) _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: register class `freg` requires at least one of the following target features: d, f
|
||||
--> $DIR/bad-reg.rs:80:26
|
||||
--> $DIR/bad-reg.rs:83:26
|
||||
|
|
||||
LL | asm!("/* {} */", in(freg) f);
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: register class `freg` requires at least one of the following target features: d, f
|
||||
--> $DIR/bad-reg.rs:82:26
|
||||
--> $DIR/bad-reg.rs:85:26
|
||||
|
|
||||
LL | asm!("/* {} */", out(freg) _);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: register class `freg` requires at least one of the following target features: d, f
|
||||
--> $DIR/bad-reg.rs:84:26
|
||||
--> $DIR/bad-reg.rs:87:26
|
||||
|
|
||||
LL | asm!("/* {} */", in(freg) d);
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: register class `freg` requires at least one of the following target features: d, f
|
||||
--> $DIR/bad-reg.rs:87:26
|
||||
--> $DIR/bad-reg.rs:90:26
|
||||
|
|
||||
LL | asm!("/* {} */", out(freg) d);
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: type `i32` cannot be used with this register class
|
||||
--> $DIR/bad-reg.rs:94:27
|
||||
--> $DIR/bad-reg.rs:97:27
|
||||
|
|
||||
LL | asm!("", in("v0") x);
|
||||
| ^
|
||||
@ -97,7 +97,7 @@ LL | asm!("", in("v0") x);
|
||||
= note: register class `vreg` supports these types:
|
||||
|
||||
error: type `i32` cannot be used with this register class
|
||||
--> $DIR/bad-reg.rs:97:28
|
||||
--> $DIR/bad-reg.rs:100:28
|
||||
|
|
||||
LL | asm!("", out("v0") x);
|
||||
| ^
|
||||
@ -105,7 +105,7 @@ LL | asm!("", out("v0") x);
|
||||
= note: register class `vreg` supports these types:
|
||||
|
||||
error: type `i32` cannot be used with this register class
|
||||
--> $DIR/bad-reg.rs:100:35
|
||||
--> $DIR/bad-reg.rs:103:35
|
||||
|
|
||||
LL | asm!("/* {} */", in(vreg) x);
|
||||
| ^
|
||||
|
@ -14,6 +14,9 @@
|
||||
//@[riscv64gc] compile-flags: --target riscv64gc-unknown-linux-gnu
|
||||
//@[riscv64gc] needs-llvm-components: riscv
|
||||
|
||||
// Unlike riscv32e-registers.rs, this tests if the rustc can reject invalid registers
|
||||
// usage in the asm! API (in, out, inout, etc.).
|
||||
|
||||
#![crate_type = "lib"]
|
||||
#![feature(no_core, rustc_attrs)]
|
||||
#![feature(asm_experimental_arch)]
|
||||
|
@ -1,5 +1,5 @@
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:43:11
|
||||
--> $DIR/riscv32e-registers.rs:46:11
|
||||
|
|
||||
LL | asm!("li x16, 0");
|
||||
| ^
|
||||
@ -11,7 +11,7 @@ LL | li x16, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:46:11
|
||||
--> $DIR/riscv32e-registers.rs:49:11
|
||||
|
|
||||
LL | asm!("li x17, 0");
|
||||
| ^
|
||||
@ -23,7 +23,7 @@ LL | li x17, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:49:11
|
||||
--> $DIR/riscv32e-registers.rs:52:11
|
||||
|
|
||||
LL | asm!("li x18, 0");
|
||||
| ^
|
||||
@ -35,7 +35,7 @@ LL | li x18, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:52:11
|
||||
--> $DIR/riscv32e-registers.rs:55:11
|
||||
|
|
||||
LL | asm!("li x19, 0");
|
||||
| ^
|
||||
@ -47,7 +47,7 @@ LL | li x19, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:55:11
|
||||
--> $DIR/riscv32e-registers.rs:58:11
|
||||
|
|
||||
LL | asm!("li x20, 0");
|
||||
| ^
|
||||
@ -59,7 +59,7 @@ LL | li x20, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:58:11
|
||||
--> $DIR/riscv32e-registers.rs:61:11
|
||||
|
|
||||
LL | asm!("li x21, 0");
|
||||
| ^
|
||||
@ -71,7 +71,7 @@ LL | li x21, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:61:11
|
||||
--> $DIR/riscv32e-registers.rs:64:11
|
||||
|
|
||||
LL | asm!("li x22, 0");
|
||||
| ^
|
||||
@ -83,7 +83,7 @@ LL | li x22, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:64:11
|
||||
--> $DIR/riscv32e-registers.rs:67:11
|
||||
|
|
||||
LL | asm!("li x23, 0");
|
||||
| ^
|
||||
@ -95,7 +95,7 @@ LL | li x23, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:67:11
|
||||
--> $DIR/riscv32e-registers.rs:70:11
|
||||
|
|
||||
LL | asm!("li x24, 0");
|
||||
| ^
|
||||
@ -107,7 +107,7 @@ LL | li x24, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:70:11
|
||||
--> $DIR/riscv32e-registers.rs:73:11
|
||||
|
|
||||
LL | asm!("li x25, 0");
|
||||
| ^
|
||||
@ -119,7 +119,7 @@ LL | li x25, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:73:11
|
||||
--> $DIR/riscv32e-registers.rs:76:11
|
||||
|
|
||||
LL | asm!("li x26, 0");
|
||||
| ^
|
||||
@ -131,7 +131,7 @@ LL | li x26, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:76:11
|
||||
--> $DIR/riscv32e-registers.rs:79:11
|
||||
|
|
||||
LL | asm!("li x27, 0");
|
||||
| ^
|
||||
@ -143,7 +143,7 @@ LL | li x27, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:79:11
|
||||
--> $DIR/riscv32e-registers.rs:82:11
|
||||
|
|
||||
LL | asm!("li x28, 0");
|
||||
| ^
|
||||
@ -155,7 +155,7 @@ LL | li x28, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:82:11
|
||||
--> $DIR/riscv32e-registers.rs:85:11
|
||||
|
|
||||
LL | asm!("li x29, 0");
|
||||
| ^
|
||||
@ -167,7 +167,7 @@ LL | li x29, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:85:11
|
||||
--> $DIR/riscv32e-registers.rs:88:11
|
||||
|
|
||||
LL | asm!("li x30, 0");
|
||||
| ^
|
||||
@ -179,7 +179,7 @@ LL | li x30, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:88:11
|
||||
--> $DIR/riscv32e-registers.rs:91:11
|
||||
|
|
||||
LL | asm!("li x31, 0");
|
||||
| ^
|
@ -1,5 +1,5 @@
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:43:11
|
||||
--> $DIR/riscv32e-registers.rs:46:11
|
||||
|
|
||||
LL | asm!("li x16, 0");
|
||||
| ^
|
||||
@ -11,7 +11,7 @@ LL | li x16, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:46:11
|
||||
--> $DIR/riscv32e-registers.rs:49:11
|
||||
|
|
||||
LL | asm!("li x17, 0");
|
||||
| ^
|
||||
@ -23,7 +23,7 @@ LL | li x17, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:49:11
|
||||
--> $DIR/riscv32e-registers.rs:52:11
|
||||
|
|
||||
LL | asm!("li x18, 0");
|
||||
| ^
|
||||
@ -35,7 +35,7 @@ LL | li x18, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:52:11
|
||||
--> $DIR/riscv32e-registers.rs:55:11
|
||||
|
|
||||
LL | asm!("li x19, 0");
|
||||
| ^
|
||||
@ -47,7 +47,7 @@ LL | li x19, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:55:11
|
||||
--> $DIR/riscv32e-registers.rs:58:11
|
||||
|
|
||||
LL | asm!("li x20, 0");
|
||||
| ^
|
||||
@ -59,7 +59,7 @@ LL | li x20, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:58:11
|
||||
--> $DIR/riscv32e-registers.rs:61:11
|
||||
|
|
||||
LL | asm!("li x21, 0");
|
||||
| ^
|
||||
@ -71,7 +71,7 @@ LL | li x21, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:61:11
|
||||
--> $DIR/riscv32e-registers.rs:64:11
|
||||
|
|
||||
LL | asm!("li x22, 0");
|
||||
| ^
|
||||
@ -83,7 +83,7 @@ LL | li x22, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:64:11
|
||||
--> $DIR/riscv32e-registers.rs:67:11
|
||||
|
|
||||
LL | asm!("li x23, 0");
|
||||
| ^
|
||||
@ -95,7 +95,7 @@ LL | li x23, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:67:11
|
||||
--> $DIR/riscv32e-registers.rs:70:11
|
||||
|
|
||||
LL | asm!("li x24, 0");
|
||||
| ^
|
||||
@ -107,7 +107,7 @@ LL | li x24, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:70:11
|
||||
--> $DIR/riscv32e-registers.rs:73:11
|
||||
|
|
||||
LL | asm!("li x25, 0");
|
||||
| ^
|
||||
@ -119,7 +119,7 @@ LL | li x25, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:73:11
|
||||
--> $DIR/riscv32e-registers.rs:76:11
|
||||
|
|
||||
LL | asm!("li x26, 0");
|
||||
| ^
|
||||
@ -131,7 +131,7 @@ LL | li x26, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:76:11
|
||||
--> $DIR/riscv32e-registers.rs:79:11
|
||||
|
|
||||
LL | asm!("li x27, 0");
|
||||
| ^
|
||||
@ -143,7 +143,7 @@ LL | li x27, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:79:11
|
||||
--> $DIR/riscv32e-registers.rs:82:11
|
||||
|
|
||||
LL | asm!("li x28, 0");
|
||||
| ^
|
||||
@ -155,7 +155,7 @@ LL | li x28, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:82:11
|
||||
--> $DIR/riscv32e-registers.rs:85:11
|
||||
|
|
||||
LL | asm!("li x29, 0");
|
||||
| ^
|
||||
@ -167,7 +167,7 @@ LL | li x29, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:85:11
|
||||
--> $DIR/riscv32e-registers.rs:88:11
|
||||
|
|
||||
LL | asm!("li x30, 0");
|
||||
| ^
|
||||
@ -179,7 +179,7 @@ LL | li x30, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:88:11
|
||||
--> $DIR/riscv32e-registers.rs:91:11
|
||||
|
|
||||
LL | asm!("li x31, 0");
|
||||
| ^
|
@ -1,5 +1,5 @@
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:43:11
|
||||
--> $DIR/riscv32e-registers.rs:46:11
|
||||
|
|
||||
LL | asm!("li x16, 0");
|
||||
| ^
|
||||
@ -11,7 +11,7 @@ LL | li x16, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:46:11
|
||||
--> $DIR/riscv32e-registers.rs:49:11
|
||||
|
|
||||
LL | asm!("li x17, 0");
|
||||
| ^
|
||||
@ -23,7 +23,7 @@ LL | li x17, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:49:11
|
||||
--> $DIR/riscv32e-registers.rs:52:11
|
||||
|
|
||||
LL | asm!("li x18, 0");
|
||||
| ^
|
||||
@ -35,7 +35,7 @@ LL | li x18, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:52:11
|
||||
--> $DIR/riscv32e-registers.rs:55:11
|
||||
|
|
||||
LL | asm!("li x19, 0");
|
||||
| ^
|
||||
@ -47,7 +47,7 @@ LL | li x19, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:55:11
|
||||
--> $DIR/riscv32e-registers.rs:58:11
|
||||
|
|
||||
LL | asm!("li x20, 0");
|
||||
| ^
|
||||
@ -59,7 +59,7 @@ LL | li x20, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:58:11
|
||||
--> $DIR/riscv32e-registers.rs:61:11
|
||||
|
|
||||
LL | asm!("li x21, 0");
|
||||
| ^
|
||||
@ -71,7 +71,7 @@ LL | li x21, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:61:11
|
||||
--> $DIR/riscv32e-registers.rs:64:11
|
||||
|
|
||||
LL | asm!("li x22, 0");
|
||||
| ^
|
||||
@ -83,7 +83,7 @@ LL | li x22, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:64:11
|
||||
--> $DIR/riscv32e-registers.rs:67:11
|
||||
|
|
||||
LL | asm!("li x23, 0");
|
||||
| ^
|
||||
@ -95,7 +95,7 @@ LL | li x23, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:67:11
|
||||
--> $DIR/riscv32e-registers.rs:70:11
|
||||
|
|
||||
LL | asm!("li x24, 0");
|
||||
| ^
|
||||
@ -107,7 +107,7 @@ LL | li x24, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:70:11
|
||||
--> $DIR/riscv32e-registers.rs:73:11
|
||||
|
|
||||
LL | asm!("li x25, 0");
|
||||
| ^
|
||||
@ -119,7 +119,7 @@ LL | li x25, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:73:11
|
||||
--> $DIR/riscv32e-registers.rs:76:11
|
||||
|
|
||||
LL | asm!("li x26, 0");
|
||||
| ^
|
||||
@ -131,7 +131,7 @@ LL | li x26, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:76:11
|
||||
--> $DIR/riscv32e-registers.rs:79:11
|
||||
|
|
||||
LL | asm!("li x27, 0");
|
||||
| ^
|
||||
@ -143,7 +143,7 @@ LL | li x27, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:79:11
|
||||
--> $DIR/riscv32e-registers.rs:82:11
|
||||
|
|
||||
LL | asm!("li x28, 0");
|
||||
| ^
|
||||
@ -155,7 +155,7 @@ LL | li x28, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:82:11
|
||||
--> $DIR/riscv32e-registers.rs:85:11
|
||||
|
|
||||
LL | asm!("li x29, 0");
|
||||
| ^
|
||||
@ -167,7 +167,7 @@ LL | li x29, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:85:11
|
||||
--> $DIR/riscv32e-registers.rs:88:11
|
||||
|
|
||||
LL | asm!("li x30, 0");
|
||||
| ^
|
||||
@ -179,7 +179,7 @@ LL | li x30, 0
|
||||
| ^
|
||||
|
||||
error: invalid operand for instruction
|
||||
--> $DIR/riscv32e-registers.rs:88:11
|
||||
--> $DIR/riscv32e-registers.rs:91:11
|
||||
|
|
||||
LL | asm!("li x31, 0");
|
||||
| ^
|
@ -11,6 +11,9 @@
|
||||
//@ [riscv32emc] needs-llvm-components: riscv
|
||||
//@ [riscv32emc] compile-flags: --target=riscv32emc-unknown-none-elf
|
||||
|
||||
// Unlike bad-reg.rs, this tests if the assembler can reject invalid registers
|
||||
// usage in assembly code.
|
||||
|
||||
#![no_core]
|
||||
#![feature(no_core, lang_items, rustc_attrs)]
|
||||
|
Loading…
x
Reference in New Issue
Block a user