@@ -27,7 +27,7 @@ pub(crate) fn codegen_inline_asm<'tcx>(
27
27
}
28
28
29
29
// Used by stdarch
30
- if template[ 0 ] == InlineAsmTemplatePiece :: String ( "movq %rbx, " . to_string ( ) )
30
+ if template[ 0 ] == InlineAsmTemplatePiece :: String ( "mov " . to_string ( ) )
31
31
&& matches ! (
32
32
template[ 1 ] ,
33
33
InlineAsmTemplatePiece :: Placeholder {
@@ -36,24 +36,26 @@ pub(crate) fn codegen_inline_asm<'tcx>(
36
36
span: _
37
37
}
38
38
)
39
- && template[ 2 ] == InlineAsmTemplatePiece :: String ( "\n " . to_string ( ) )
40
- && template[ 3 ] == InlineAsmTemplatePiece :: String ( "cpuid" . to_string ( ) )
41
- && template[ 4 ] == InlineAsmTemplatePiece :: String ( "\n " . to_string ( ) )
42
- && template[ 5 ] == InlineAsmTemplatePiece :: String ( "xchgq %rbx, " . to_string ( ) )
39
+ && template[ 2 ] == InlineAsmTemplatePiece :: String ( ", rbx" . to_string ( ) )
40
+ && template[ 3 ] == InlineAsmTemplatePiece :: String ( "\n " . to_string ( ) )
41
+ && template[ 4 ] == InlineAsmTemplatePiece :: String ( "cpuid" . to_string ( ) )
42
+ && template[ 5 ] == InlineAsmTemplatePiece :: String ( "\n " . to_string ( ) )
43
+ && template[ 6 ] == InlineAsmTemplatePiece :: String ( "xchg " . to_string ( ) )
43
44
&& matches ! (
44
- template[ 6 ] ,
45
+ template[ 7 ] ,
45
46
InlineAsmTemplatePiece :: Placeholder {
46
47
operand_idx: 0 ,
47
48
modifier: Some ( 'r' ) ,
48
49
span: _
49
50
}
50
51
)
52
+ && template[ 8 ] == InlineAsmTemplatePiece :: String ( ", rbx" . to_string ( ) )
51
53
{
52
54
assert_eq ! ( operands. len( ) , 4 ) ;
53
55
let ( leaf, eax_place) = match operands[ 1 ] {
54
56
InlineAsmOperand :: InOut {
55
57
reg : InlineAsmRegOrRegClass :: Reg ( InlineAsmReg :: X86 ( X86InlineAsmReg :: ax) ) ,
56
- late : true ,
58
+ late : _ ,
57
59
ref in_value,
58
60
out_place : Some ( out_place) ,
59
61
} => (
@@ -68,15 +70,15 @@ pub(crate) fn codegen_inline_asm<'tcx>(
68
70
InlineAsmRegOrRegClass :: RegClass ( InlineAsmRegClass :: X86 (
69
71
X86InlineAsmRegClass :: reg,
70
72
) ) ,
71
- late : true ,
73
+ late : _ ,
72
74
place : Some ( place) ,
73
75
} => crate :: base:: codegen_place ( fx, place) ,
74
76
_ => unreachable ! ( ) ,
75
77
} ;
76
78
let ( sub_leaf, ecx_place) = match operands[ 2 ] {
77
79
InlineAsmOperand :: InOut {
78
80
reg : InlineAsmRegOrRegClass :: Reg ( InlineAsmReg :: X86 ( X86InlineAsmReg :: cx) ) ,
79
- late : true ,
81
+ late : _ ,
80
82
ref in_value,
81
83
out_place : Some ( out_place) ,
82
84
} => (
@@ -88,7 +90,7 @@ pub(crate) fn codegen_inline_asm<'tcx>(
88
90
let edx_place = match operands[ 3 ] {
89
91
InlineAsmOperand :: Out {
90
92
reg : InlineAsmRegOrRegClass :: Reg ( InlineAsmReg :: X86 ( X86InlineAsmReg :: dx) ) ,
91
- late : true ,
93
+ late : _ ,
92
94
place : Some ( place) ,
93
95
} => crate :: base:: codegen_place ( fx, place) ,
94
96
_ => unreachable ! ( ) ,
0 commit comments