File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
tests/disas/winch/x64/atomic/rmw
winch/codegen/src/isa/x64 Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 12
12
;; movq 0x10(%r11), %r11
13
13
;; addq $0x10, %r11
14
14
;; cmpq %rsp, %r11
15
- ;; ja 0x61
15
+ ;; ja 0x5f
16
16
;; 1c: movq %rdi, %r14
17
17
;; subq $0x10, %rsp
18
18
;; movq %rdi, 8(%rsp)
21
21
;; movl $0, %ecx
22
22
;; andl $3, %ecx
23
23
;; cmpl $0, %ecx
24
- ;; jne 0x63
24
+ ;; jne 0x61
25
25
;; 44: movl $0, %ecx
26
26
;; movq 0x58(%r14), %r11
27
27
;; movq (%r11), %rdx
28
28
;; addq %rcx, %rdx
29
29
;; negl %eax
30
30
;; lock xaddl %eax, (%rdx)
31
- ;; movl %eax, %eax
32
31
;; addq $0x10, %rsp
33
32
;; popq %rbp
34
33
;; retq
34
+ ;; 5f: ud2
35
35
;; 61: ud2
36
- ;; 63: ud2
Original file line number Diff line number Diff line change @@ -1413,8 +1413,12 @@ impl Masm for MacroAssembler {
1413
1413
}
1414
1414
1415
1415
if let Some ( extend) = extend {
1416
- self . asm . movzx_rr ( operand. to_reg ( ) , operand, extend) ;
1416
+ // We don't need to zero-extend from 32 to 64bits.
1417
+ if !( extend. from_bits ( ) == 32 && extend. to_bits ( ) == 64 ) {
1418
+ self . asm . movzx_rr ( operand. to_reg ( ) , operand, extend) ;
1419
+ }
1417
1420
}
1421
+
1418
1422
Ok ( ( ) )
1419
1423
}
1420
1424
}
You can’t perform that action at this time.
0 commit comments