diff options
author | Kevin Enderby <enderby@apple.com> | 2010-05-03 21:03:31 +0000 |
---|---|---|
committer | Kevin Enderby <enderby@apple.com> | 2010-05-03 21:03:31 +0000 |
commit | eb612347f4ec1c6a44daa6abf232e25232984ef8 (patch) | |
tree | 4c9a3add5f60d0bd8f6d592e9401440e1e5ad476 | |
parent | 3c979b06c041544b97b13c5adac1a91d6cde6582 (diff) | |
download | external_llvm-eb612347f4ec1c6a44daa6abf232e25232984ef8.zip external_llvm-eb612347f4ec1c6a44daa6abf232e25232984ef8.tar.gz external_llvm-eb612347f4ec1c6a44daa6abf232e25232984ef8.tar.bz2 |
Fixed the encoding of two of the X86 movq instuctions. The Move quadword from
mm to mm/m64 and the Move quadword from xmm2/mem64 to xmm1 had the incorrect
encodings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102952 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/X86/X86Instr64bit.td | 2 | ||||
-rw-r--r-- | lib/Target/X86/X86InstrMMX.td | 2 | ||||
-rw-r--r-- | test/MC/AsmParser/X86/x86_32-encoding.s | 17 |
3 files changed, 19 insertions, 2 deletions
diff --git a/lib/Target/X86/X86Instr64bit.td b/lib/Target/X86/X86Instr64bit.td index 2dec05c..a0f4836 100644 --- a/lib/Target/X86/X86Instr64bit.td +++ b/lib/Target/X86/X86Instr64bit.td @@ -2284,7 +2284,7 @@ def MOVPQIto64rr : RPDI<0x7E, MRMDestReg, (outs GR64:$dst), (ins VR128:$src), def MOV64toSDrr : RPDI<0x6E, MRMSrcReg, (outs FR64:$dst), (ins GR64:$src), "mov{d|q}\t{$src, $dst|$dst, $src}", [(set FR64:$dst, (bitconvert GR64:$src))]>; -def MOV64toSDrm : RPDI<0x6E, MRMSrcMem, (outs FR64:$dst), (ins i64mem:$src), +def MOV64toSDrm : S3SI<0x6E, MRMSrcMem, (outs FR64:$dst), (ins i64mem:$src), "movq\t{$src, $dst|$dst, $src}", [(set FR64:$dst, (bitconvert (loadi64 addr:$src)))]>; diff --git a/lib/Target/X86/X86InstrMMX.td b/lib/Target/X86/X86InstrMMX.td index b866180..744af50 100644 --- a/lib/Target/X86/X86InstrMMX.td +++ b/lib/Target/X86/X86InstrMMX.td @@ -117,7 +117,7 @@ def MMX_MOVD64mr : MMXI<0x7E, MRMDestMem, (outs), (ins i32mem:$dst, VR64:$src), "movd\t{$src, $dst|$dst, $src}", []>; def MMX_MOVD64grr : MMXI<0x7E, MRMDestReg, (outs), (ins GR32:$dst, VR64:$src), "movd\t{$src, $dst|$dst, $src}", []>; -def MMX_MOVQ64gmr : MMXRI<0x7E, MRMDestMem, (outs), +def MMX_MOVQ64gmr : MMXRI<0x7F, MRMDestMem, (outs), (ins i64mem:$dst, VR64:$src), "movq\t{$src, $dst|$dst, $src}", []>; diff --git a/test/MC/AsmParser/X86/x86_32-encoding.s b/test/MC/AsmParser/X86/x86_32-encoding.s index 475632c..4f71d3e 100644 --- a/test/MC/AsmParser/X86/x86_32-encoding.s +++ b/test/MC/AsmParser/X86/x86_32-encoding.s @@ -9997,3 +9997,20 @@ pshufb CPI1_0(%rip), %xmm1 // CHECK: pushl $254 // CHECK: encoding: [0x68,0xfe,0x00,0x00,0x00] pushl $254 + +// radr://7928400 +// CHECK: movq %mm3, 3735928559(%ebx,%ecx,8) +// CHECK: encoding: [0x0f,0x7f,0x9c,0xcb,0xef,0xbe,0xad,0xde] + movq %mm3, 3735928559(%ebx,%ecx,8) + +// CHECK: movd %mm3, 3735928559(%ebx,%ecx,8) +// CHECK: encoding: [0x0f,0x7e,0x9c,0xcb,0xef,0xbe,0xad,0xde] + movd %mm3, 3735928559(%ebx,%ecx,8) + +// CHECK: movq 3735928559(%ebx,%ecx,8), %xmm5 +// CHECK: encoding: [0xf3,0x0f,0x7e,0xac,0xcb,0xef,0xbe,0xad,0xde] + movq 3735928559(%ebx,%ecx,8), %xmm5 + +// CHECK: movd 3735928559(%ebx,%ecx,8), %xmm5 +// CHECK: encoding: [0x66,0x0f,0x6e,0xac,0xcb,0xef,0xbe,0xad,0xde] + movd 3735928559(%ebx,%ecx,8), %xmm5 |