x64: Fix the formatting for andn (#5789)

* Print AluRmRVex instructions with the destination last
* Update andn tests
This commit is contained in:
Trevor Elliott
2023-02-15 11:16:59 -08:00
committed by GitHub
parent 0037b71b11
commit f0137c2618
3 changed files with 5 additions and 6 deletions

View File

@@ -762,9 +762,9 @@ impl PrettyPrint for Inst {
format!(
"{} {}, {}, {}",
ljustify2(op.to_string(), String::new()),
dst,
src1,
src2,
src1,
dst,
)
}
Inst::UnaryRmR { src, dst, op, size } => {

View File

@@ -11,12 +11,11 @@ block0(v0: i8, v1: i8):
; pushq %rbp
; movq %rsp, %rbp
; block0:
; andn %eax, %esi, %edi
; andn %edi, %esi, %eax
; movq %rbp, %rsp
; popq %rbp
; ret
function %reversed_operands(i8, i8) -> i8 {
block0(v0: i8, v1: i8):
v2 = bnot v0
@@ -27,7 +26,7 @@ block0(v0: i8, v1: i8):
; pushq %rbp
; movq %rsp, %rbp
; block0:
; andn %eax, %edi, %esi
; andn %esi, %edi, %eax
; movq %rbp, %rsp
; popq %rbp
; ret

View File

@@ -40,7 +40,7 @@
;; block0:
;; jmp label1
;; block1:
;; andn %eax, %esi, %edi
;; andn %edi, %esi, %eax
;; movq %rbp, %rsp
;; popq %rbp
;; ret