let mut indirect_outputs = vec![];
for (i, (out, &place)) in ia.outputs.iter().zip(&outputs).enumerate() {
if out.is_rw {
- inputs.push(self.load_operand(place).immediate());
+ let operand = self.load_operand(place);
+ if let OperandValue::Immediate(_) = operand.val {
+ inputs.push(operand.immediate());
+ }
ext_constraints.push(i.to_string());
}
if out.is_indirect {
- indirect_outputs.push(self.load_operand(place).immediate());
+ let operand = self.load_operand(place);
+ if let OperandValue::Immediate(_) = operand.val {
+ indirect_outputs.push(operand.immediate());
+ }
} else {
output_types.push(place.layout.llvm_type(self.cx()));
}
--- /dev/null
+// build-fail
+// ignore-emscripten no asm! support
+
+#![feature(asm)]
+
+fn main() {
+ unsafe {
+ asm!("nop" : "+r"("r15"));
+ //~^ malformed inline assembly
+ }
+}
--- /dev/null
+error[E0668]: malformed inline assembly
+ --> $DIR/issue-62046.rs:8:9
+ |
+LL | asm!("nop" : "+r"("r15"));
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0668`.