File tree Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -135,11 +135,8 @@ _x86_64_asm_write_rflags:
135135.global _x86_64_asm_read_rflags
136136.p2align 4
137137_x86_64_asm_read_rflags:
138- pushq %rbp
139- movq %rsp , %rbp
140138 pushfq
141139 popq %rax
142- popq %rbp
143140 retq
144141
145142.global _x86_64_asm_load_ss
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ mod x86_64 {
8181
8282 #[ cfg( feature = "inline_asm" ) ]
8383 unsafe {
84- asm ! ( "pushf ; pop {}" , out( reg) r, options( nomem, preserves_flags) ) ;
84+ asm ! ( "pushfq ; pop {}" , out( reg) r, options( nomem, preserves_flags) ) ;
8585 }
8686 #[ cfg( not( feature = "inline_asm" ) ) ]
8787 unsafe {
@@ -122,7 +122,7 @@ mod x86_64 {
122122 // HACK: we mark this function as preserves_flags to prevent Rust from restoring
123123 // saved flags after the "popf" below. See above note on safety.
124124 #[ cfg( feature = "inline_asm" ) ]
125- asm ! ( "push {}; popf " , in( reg) val, options( nomem, preserves_flags) ) ;
125+ asm ! ( "push {}; popfq " , in( reg) val, options( nomem, preserves_flags) ) ;
126126
127127 #[ cfg( not( feature = "inline_asm" ) ) ]
128128 crate :: asm:: x86_64_asm_write_rflags ( val) ;
You can’t perform that action at this time.
0 commit comments