diff options
author | H. Peter Anvin <hpa@zytor.com> | 2012-03-05 22:37:21 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2012-03-05 22:37:21 -0800 |
commit | b106ba161fc3b4c9e1740d6f8990211aff251199 (patch) | |
tree | daec0d63973dacdc88dd1f65b86ce7c1b680593e | |
parent | 9d91ff5b123aafbd92702e2a1f35661d9cc9bdb0 (diff) | |
download | nasm-b106ba161fc3b4c9e1740d6f8990211aff251199.tar.gz nasm-b106ba161fc3b4c9e1740d6f8990211aff251199.tar.bz2 nasm-b106ba161fc3b4c9e1740d6f8990211aff251199.zip |
Try again to fix our handling of MOVD/MOVQ
Try to implement the handling of MOVD as attempted in checkin:
70712c0df6c437c50452c4997aa2e3de5a0e0299
and reverted in:
d279fbbd80aab6f79584249629a4aea90b851458
due to BR3392199. This time make sure to use the SX flag to only
match when a size is explicitly given, and also don't duplicate the 0F
6F/7F opcodes, which are documented as MOVQ by AMD as well as Intel.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r-- | insns.dat | 16 | ||||
-rw-r--r-- | test/movd64.asm | 15 |
2 files changed, 23 insertions, 8 deletions
@@ -834,14 +834,14 @@ MOV rm64,imm32 [mi: hlexr o64 c7 /0 idx] X64 MOV mem,imm8 [mi: hlexr c6 /0 ib] 8086,SM MOV mem,imm16 [mi: hlexr o16 c7 /0 iw] 8086,SM MOV mem,imm32 [mi: hlexr o32 c7 /0 id] 386,SM -MOVD mmxreg,rm32 [rm: np 0f 6e /r] PENT,MMX -MOVD rm32,mmxreg [mr: np 0f 7e /r] PENT,MMX -MOVD xmmreg,rm32 [rm: np o16 0f 6e /r] SSE2 -MOVD rm32,xmmreg [mr: np o16 0f 7e /r] SSE2 -MOVQ mmxreg,mmxrm [rm: np o64nw 0f 6f /r] PENT,MMX,SQ -MOVQ mmxrm,mmxreg [mr: np o64nw 0f 7f /r] PENT,MMX,SQ -MOVQ mmxreg,rm64 [rm: np 0f 6e /r] X64,MMX -MOVQ rm64,mmxreg [mr: np 0f 7e /r] X64,MMX +MOVD mmxreg,rm32 [rm: np 0f 6e /r] PENT,MMX,SD +MOVD rm32,mmxreg [mr: np 0f 7e /r] PENT,MMX,SD +MOVD mmxreg,rm64 [rm: np o64 0f 6e /r] X64,MMX,SX,ND +MOVD rm64,mmxreg [mr: np o64 0f 7e /r] X64,MMX,SX,ND +MOVQ mmxreg,mmxrm [rm: np 0f 6f /r] PENT,MMX,SQ +MOVQ mmxrm,mmxreg [mr: np 0f 7f /r] PENT,MMX,SQ +MOVQ mmxreg,rm64 [rm: np o64 0f 6e /r] X64,MMX +MOVQ rm64,mmxreg [mr: np o64 0f 7e /r] X64,MMX MOVSB void [ a4] 8086 MOVSD void [ o32 a5] 386 MOVSQ void [ o64 a5] X64 diff --git a/test/movd64.asm b/test/movd64.asm new file mode 100644 index 0000000..b328c34 --- /dev/null +++ b/test/movd64.asm @@ -0,0 +1,15 @@ + bits 64 + + movd r8d, mm1 + movd r8, mm1 + movq r8, mm1 + + movd [rax], mm1 + movq [rax], mm1 + movd dword [rax], mm1 +; movq dword [rax], mm1 + movd qword [rax], mm1 + movq qword [rax], mm1 + +; movd mm2, mm1 + movq mm2, mm1 |