Browse Source

* fixed parsing of "rcl/rcr rm,imm" (mantis #9025)

git-svn-id: trunk@8272 -
Jonas Maebe 18 years ago
parent
commit
a8191abd16
5 changed files with 22 additions and 10 deletions
  1. 1 0
      .gitattributes
  2. 4 4
      compiler/i386/i386tab.inc
  3. 2 2
      compiler/x86/x86ins.dat
  4. 4 4
      compiler/x86_64/x8664tab.inc
  5. 11 0
      tests/webtbs/tw9025.pp

+ 1 - 0
.gitattributes

@@ -8341,6 +8341,7 @@ tests/webtbs/tw8950.pp svneol=native#text/plain
 tests/webtbs/tw8975.pp svneol=native#text/plain
 tests/webtbs/tw8975a.pp svneol=native#text/plain
 tests/webtbs/tw8977.pp svneol=native#text/plain
+tests/webtbs/tw9025.pp svneol=native#text/plain
 tests/webtbs/tw9026.pp svneol=native#text/plain
 tests/webtbs/tw9054.pp svneol=native#text/plain
 tests/webtbs/tw9059.pp svneol=native#text/plain

+ 4 - 4
compiler/i386/i386tab.inc

@@ -5456,9 +5456,9 @@
   (
     opcode  : A_RCL;
     ops     : 2;
-    optypes : (ot_regmem or ot_bits16 or ot_bits32 or ot_bits64,ot_immediate or ot_bits8,ot_none);
+    optypes : (ot_regmem or ot_bits16 or ot_bits32 or ot_bits64,ot_immediate,ot_none);
     code    : #192#208#1#193#130#21;
-    flags   : if_8086
+    flags   : if_8086 or if_sb
   ),
   (
     opcode  : A_RCL;
@@ -5498,9 +5498,9 @@
   (
     opcode  : A_RCR;
     ops     : 2;
-    optypes : (ot_regmem or ot_bits16 or ot_bits32 or ot_bits64,ot_immediate or ot_bits8,ot_none);
+    optypes : (ot_regmem or ot_bits16 or ot_bits32 or ot_bits64,ot_immediate,ot_none);
     code    : #192#208#1#193#131#21;
-    flags   : if_8086
+    flags   : if_8086 or if_sb
   ),
   (
     opcode  : A_RCR;

+ 2 - 2
compiler/x86/x86ins.dat

@@ -1721,7 +1721,7 @@ xmmreg,xmmreg         \323\3\x66\x0F\xEF\110          WILLAMETTE,SSE2
 (Ch_Mop2, Ch_Rop1, Ch_RWFlags)
 rm16|32|64,unity      \300\320\1\xD1\202              8086
 rm16|32|64,reg_cl     \300\320\1\xD3\202              8086
-rm16|32|64,imm8       \300\320\1\xC1\202\25           8086
+rm16|32|64,imm        \300\320\1\xC1\202\25           8086,SB
 rm8,unity             \300\323\1\xD0\202              8086
 rm8,reg_cl            \300\323\1\xD2\202              8086
 rm8,imm               \300\323\1\xC0\202\25           186,SB
@@ -1730,7 +1730,7 @@ rm8,imm               \300\323\1\xC0\202\25           186,SB
 (Ch_Mop2, Ch_Rop1, Ch_RWFlags)
 rm16|32|64,unity      \300\320\1\xD1\203              8086
 rm16|32|64,reg_cl     \300\320\1\xD3\203              8086
-rm16|32|64,imm8       \300\320\1\xC1\203\25           8086
+rm16|32|64,imm        \300\320\1\xC1\203\25           8086,SB
 rm8,unity             \300\323\1\xD0\203              8086
 rm8,reg_cl            \300\323\1\xD2\203              8086
 rm8,imm               \300\323\1\xC0\203\25           186,SB

+ 4 - 4
compiler/x86_64/x8664tab.inc

@@ -5407,9 +5407,9 @@
   (
     opcode  : A_RCL;
     ops     : 2;
-    optypes : (ot_regmem or ot_bits16 or ot_bits32 or ot_bits64,ot_immediate or ot_bits8,ot_none);
+    optypes : (ot_regmem or ot_bits16 or ot_bits32 or ot_bits64,ot_immediate,ot_none);
     code    : #192#208#1#193#130#21;
-    flags   : if_8086
+    flags   : if_8086 or if_sb
   ),
   (
     opcode  : A_RCL;
@@ -5449,9 +5449,9 @@
   (
     opcode  : A_RCR;
     ops     : 2;
-    optypes : (ot_regmem or ot_bits16 or ot_bits32 or ot_bits64,ot_immediate or ot_bits8,ot_none);
+    optypes : (ot_regmem or ot_bits16 or ot_bits32 or ot_bits64,ot_immediate,ot_none);
     code    : #192#208#1#193#131#21;
-    flags   : if_8086
+    flags   : if_8086 or if_sb
   ),
   (
     opcode  : A_RCR;

+ 11 - 0
tests/webtbs/tw9025.pp

@@ -0,0 +1,11 @@
+{ %cpu=i386,x86_64}
+{ %norun }
+
+{$asmmode intel}
+
+begin
+  asm
+    rcl ax,1
+    rcr ax,1
+  end
+end.