From e2eb92d0558ebcdc859233f9a796925add80c568 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Sun, 15 Apr 2007 23:09:23 +0000 Subject: [PATCH] CR8 is not special in any way as far as the assembler is concerned. CR8 is not special in any way as far as the assembler is concerned. It's listed as having a special form in the Intel documentation, but that is only because there are no other CRs which require a REX prefix. MOV to CR8 is special in the sense that it's a non-serializing instruction, but that's irrelevant to the assembler. Furthermore, it's totally unclear how TRs should be handled in long mode; there are no CPUs which uses TRs which also have long mode, so the easiest is to simply mark those instructions NOLONG. Finally, add PRIV to some privileged instructions. --- insns.dat | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/insns.dat b/insns.dat index 4c5f275..f3a48af 100644 --- a/insns.dat +++ b/insns.dat @@ -679,24 +679,16 @@ MOV mem_offs,reg_al \300\1\xA2\44 8086,SM MOV mem_offs,reg_ax \300\320\1\xA3\44 8086,SM MOV mem_offs,reg_eax \300\321\1\xA3\44 386,SM MOV mem_offs,reg_rax \300\321\1\xA3\44 X64,SM -MOV reg32,reg_c8reg \3\xF0\x0F\x20\101 NOLONG -MOV reg_c8reg,reg32 \3\xF0\x0F\x22\110 NOLONG -MOV reg32,reg_c8reg \321\2\x0F\x20\101 X64 -MOV reg64,reg_c8reg \323\2\x0F\x20\101 X64 -MOV reg_c8reg,reg32 \321\2\x0F\x22\110 X64 -MOV reg_c8reg,reg64 \323\2\x0F\x22\110 X64 MOV reg32,reg_creg \2\x0F\x20\101 386,PRIV -MOV reg64,reg_creg \323\2\x0F\x20\101 X64 +MOV reg64,reg_creg \323\2\x0F\x20\101 X64,PRIV MOV reg_creg,reg32 \2\x0F\x22\110 386,PRIV -MOV reg_creg,reg64 \323\2\x0F\x22\110 X64 +MOV reg_creg,reg64 \323\2\x0F\x22\110 X64,PRIV MOV reg32,reg_dreg \2\x0F\x21\101 386,PRIV -MOV reg64,reg_dreg \323\2\x0F\x21\101 X64 +MOV reg64,reg_dreg \323\2\x0F\x21\101 X64,PRIV MOV reg_dreg,reg32 \2\x0F\x23\110 386,PRIV -MOV reg_dreg,reg64 \323\2\x0F\x23\110 X64 -MOV reg32,reg_treg \2\x0F\x24\101 386,PRIV -MOV reg64,reg_treg \323\2\x0F\x24\101 X64 -MOV reg_treg,reg32 \2\x0F\x26\110 386,PRIV -MOV reg_treg,reg64 \323\2\x0F\x26\110 X64 +MOV reg_dreg,reg64 \323\2\x0F\x23\110 X64,PRIV +MOV reg32,reg_treg \2\x0F\x24\101 386,NOLONG +MOV reg_treg,reg32 \2\x0F\x26\110 386,NOLONG MOV mem,reg8 \300\1\x88\101 8086,SM MOV reg8,reg8 \1\x88\101 8086 MOV mem,reg16 \320\300\1\x89\101 8086,SM -- 2.7.4