Use Value instead of CValue in CInlineAsmOperand · rust-lang/rust@909513e (original) (raw)
`@@ -13,7 +13,7 @@ use crate::prelude::*;
`
13
13
`enum CInlineAsmOperand<'tcx> {
`
14
14
`In {
`
15
15
`reg: InlineAsmRegOrRegClass,
`
16
``
`-
value: CValue<'tcx>,
`
``
16
`+
value: Value,
`
17
17
`},
`
18
18
`Out {
`
19
19
`reg: InlineAsmRegOrRegClass,
`
`@@ -23,7 +23,7 @@ enum CInlineAsmOperand<'tcx> {
`
23
23
`InOut {
`
24
24
`reg: InlineAsmRegOrRegClass,
`
25
25
`_late: bool,
`
26
``
`-
in_value: CValue<'tcx>,
`
``
26
`+
in_value: Value,
`
27
27
`out_place: Option<CPlace<'tcx>>,
`
28
28
`},
`
29
29
`Const {
`
`@@ -57,9 +57,10 @@ pub(crate) fn codegen_inline_asm<'tcx>(
`
57
57
`let operands = operands
`
58
58
`.into_iter()
`
59
59
`.map(|operand| match *operand {
`
60
``
`-
InlineAsmOperand::In { reg, ref value } => {
`
61
``
`-
CInlineAsmOperand::In { reg, value: crate::base::codegen_operand(fx, value) }
`
62
``
`-
}
`
``
60
`+
InlineAsmOperand::In { reg, ref value } => CInlineAsmOperand::In {
`
``
61
`+
reg,
`
``
62
`+
value: crate::base::codegen_operand(fx, value).load_scalar(fx),
`
``
63
`+
},
`
63
64
`InlineAsmOperand::Out { reg, late, ref place } => CInlineAsmOperand::Out {
`
64
65
` reg,
`
65
66
` late,
`
`@@ -69,7 +70,7 @@ pub(crate) fn codegen_inline_asm<'tcx>(
`
69
70
`CInlineAsmOperand::InOut {
`
70
71
` reg,
`
71
72
`_late: late,
`
72
``
`-
in_value: crate::base::codegen_operand(fx, in_value),
`
``
73
`+
in_value: crate::base::codegen_operand(fx, in_value).load_scalar(fx),
`
73
74
`out_place: out_place.map(|place| crate::base::codegen_place(fx, place)),
`
74
75
`}
`
75
76
`}
`
`@@ -167,15 +168,15 @@ pub(crate) fn codegen_inline_asm<'tcx>(
`
167
168
`for (i, operand) in operands.iter().enumerate() {
`
168
169
`match operand {
`
169
170
`CInlineAsmOperand::In { reg: _, value } => {
`
170
``
`-
inputs.push((asm_gen.stack_slots_input[i].unwrap(), value.load_scalar(fx)));
`
``
171
`+
inputs.push((asm_gen.stack_slots_input[i].unwrap(), *value));
`
171
172
`}
`
172
173
`CInlineAsmOperand::Out { reg: _, late: _, place } => {
`
173
174
`if let Some(place) = place {
`
174
175
` outputs.push((asm_gen.stack_slots_output[i].unwrap(), *place));
`
175
176
`}
`
176
177
`}
`
177
178
`CInlineAsmOperand::InOut { reg: _, _late: _, in_value, out_place } => {
`
178
``
`-
inputs.push((asm_gen.stack_slots_input[i].unwrap(), in_value.load_scalar(fx)));
`
``
179
`+
inputs.push((asm_gen.stack_slots_input[i].unwrap(), *in_value));
`
179
180
`if let Some(out_place) = out_place {
`
180
181
` outputs.push((asm_gen.stack_slots_output[i].unwrap(), *out_place));
`
181
182
`}
`