Răsfoiți Sursa

+ i386nop.inc now contains the number of opcodes
+ LCALL and LJMP added (untested)

pierre 25 ani în urmă
părinte
comite
86e515e1a5

+ 2 - 0
compiler/i386att.inc

@@ -165,6 +165,7 @@
 'jmp',
 'lahf',
 'lar',
+'lcall',
 'lds',
 'lea',
 'leave',
@@ -173,6 +174,7 @@
 'lgdt',
 'lgs',
 'lidt',
+'ljmp',
 'lldt',
 'lmsw',
 'loadall',

+ 3 - 1
compiler/i386atts.inc

@@ -17,7 +17,7 @@ attsufINT,
 attsufINT,
 attsufINT,
 attsufINT,
-attsufINT,
+attsufNONE,
 attsufNONE,
 attsufNONE,
 attsufNONE,
@@ -165,6 +165,7 @@ attsufNONE,
 attsufINT,
 attsufNONE,
 attsufINT,
+attsufNONE,
 attsufINT,
 attsufINT,
 attsufNONE,
@@ -173,6 +174,7 @@ attsufINT,
 attsufINT,
 attsufINT,
 attsufINT,
+attsufNONE,
 attsufINT,
 attsufINT,
 attsufNONE,

+ 30 - 1
compiler/i386ins.dat

@@ -176,7 +176,7 @@ reg32,reg32           \321\300\2\x0F\xAB\101          386
 rm16,imm              \320\300\2\x0F\xBA\205\25       386,SB
 rm32,imm              \321\300\2\x0F\xBA\205\25       386,SB
 
-[CALL,callX]
+[CALL,call]
 ; don't know value of any register
 (Ch_All, Ch_None, Ch_None)
 imm                   \322\1\xE8\64                   8086
@@ -1004,6 +1004,21 @@ reg16,reg16           \320\301\2\x0F\x02\110          286,PROT
 reg32,mem             \321\301\2\x0F\x02\110          286,PROT,SM
 reg32,reg32           \321\301\2\x0F\x02\110          286,PROT
 
+[LCALL,lcall]
+; don't know value of any register
+(Ch_All, Ch_None, Ch_None)
+mem|far               \322\300\1\xFF\203              8086
+mem16|far             \320\300\1\xFF\203              8086
+mem32|far             \321\300\1\xFF\203              386
+mem|near              \322\300\1\xFF\202              8086
+mem16|near            \320\300\1\xFF\202              8086
+mem32|near            \321\300\1\xFF\202              386
+reg16                 \320\300\1\xFF\202              8086
+reg32                 \321\300\1\xFF\202              386
+mem                   \322\300\1\xFF\202              8086
+mem16                 \320\300\1\xFF\202              8086
+mem32                 \321\300\1\xFF\202              386
+
 [LDS,ldsX]
 (Ch_Wop2, Ch_Rop1, Ch_None)
 reg16,mem             \320\301\1\xC5\110              8086
@@ -1042,6 +1057,20 @@ reg32,mem             \321\301\2\x0F\xB5\110          386
 (Ch_None, Ch_None, Ch_None)
 mem                   \300\2\x0F\x01\203              286,PRIV
 
+[LJMP,ljmp]
+(Ch_None, Ch_None, Ch_None)
+mem|far               \322\300\1\xFF\205              8086
+mem16|far             \320\300\1\xFF\205              8086
+mem32|far             \321\300\1\xFF\205              386
+mem|near              \322\300\1\xFF\204              8086
+mem16|near            \320\300\1\xFF\204              8086
+mem32|near            \321\300\1\xFF\204              386
+reg16                 \320\300\1\xFF\204              8086
+reg32                 \321\300\1\xFF\204              386
+mem                   \322\300\1\xFF\204              8086
+mem16                 \320\300\1\xFF\204              8086
+mem32                 \321\300\1\xFF\204              386
+
 [LLDT,lldtX]
 (Ch_None, Ch_None, Ch_None)
 mem                   \300\1\x0F\17\202               286,PROT,PRIV

+ 2 - 0
compiler/i386int.inc

@@ -165,6 +165,7 @@
 'jmp',
 'lahf',
 'lar',
+'lcall',
 'lds',
 'lea',
 'leave',
@@ -173,6 +174,7 @@
 'lgdt',
 'lgs',
 'lidt',
+'ljmp',
 'lldt',
 'lmsw',
 'loadall',

+ 2 - 0
compiler/i386nop.inc

@@ -0,0 +1,2 @@
+{ don't edit, this file is generated from i386ins.dat }
+1325;

+ 2 - 0
compiler/i386op.inc

@@ -165,6 +165,7 @@ A_JECXZ,
 A_JMP,
 A_LAHF,
 A_LAR,
+A_LCALL,
 A_LDS,
 A_LEA,
 A_LEAVE,
@@ -173,6 +174,7 @@ A_LFS,
 A_LGDT,
 A_LGS,
 A_LIDT,
+A_LJMP,
 A_LLDT,
 A_LMSW,
 A_LOADALL,

+ 2 - 0
compiler/i386prop.inc

@@ -165,6 +165,7 @@
 (Ch: (Ch_None, Ch_None, Ch_None)),
 (Ch: (Ch_WEAX, Ch_RFlags, Ch_None)),
 (Ch: (Ch_Wop2, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
 (Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
 (Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
 (Ch: (Ch_RWESP, Ch_WEBP, Ch_None)),
@@ -175,6 +176,7 @@
 (Ch: (Ch_None, Ch_None, Ch_None)),
 (Ch: (Ch_None, Ch_None, Ch_None)),
 (Ch: (Ch_None, Ch_None, Ch_None)),
+(Ch: (Ch_None, Ch_None, Ch_None)),
 (Ch: (Ch_All, Ch_None, Ch_None)),
 (Ch: (Ch_All, Ch_None, Ch_None)),
 (Ch: (Ch_None, Ch_None, Ch_None)),

+ 154 - 0
compiler/i386tab.inc

@@ -3472,6 +3472,83 @@
     code    : #209#193#2#15#2#72;
     flags   : if_286 or if_prot
   ),
+  (
+    opcode  : A_LCALL;
+    ops     : 1;
+    optypes : (ot_memory or ot_far,ot_none,ot_none);
+    code    : #210#192#1#255#131;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LCALL;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16 or ot_far,ot_none,ot_none);
+    code    : #208#192#1#255#131;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LCALL;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32 or ot_far,ot_none,ot_none);
+    code    : #209#192#1#255#131;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_LCALL;
+    ops     : 1;
+    optypes : (ot_memory or ot_near,ot_none,ot_none);
+    code    : #210#192#1#255#130;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LCALL;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16 or ot_near,ot_none,ot_none);
+    code    : #208#192#1#255#130;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LCALL;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32 or ot_near,ot_none,ot_none);
+    code    : #209#192#1#255#130;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_LCALL;
+    ops     : 1;
+    optypes : (ot_reg16,ot_none,ot_none);
+    code    : #208#192#1#255#130;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LCALL;
+    ops     : 1;
+    optypes : (ot_reg32,ot_none,ot_none);
+    code    : #209#192#1#255#130;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_LCALL;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #210#192#1#255#130;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LCALL;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16,ot_none,ot_none);
+    code    : #208#192#1#255#130;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LCALL;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #209#192#1#255#130;
+    flags   : if_386
+  ),
   (
     opcode  : A_LDS;
     ops     : 2;
@@ -3570,6 +3647,83 @@
     code    : #192#2#15#1#131;
     flags   : if_286 or if_priv
   ),
+  (
+    opcode  : A_LJMP;
+    ops     : 1;
+    optypes : (ot_memory or ot_far,ot_none,ot_none);
+    code    : #210#192#1#255#133;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LJMP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16 or ot_far,ot_none,ot_none);
+    code    : #208#192#1#255#133;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LJMP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32 or ot_far,ot_none,ot_none);
+    code    : #209#192#1#255#133;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_LJMP;
+    ops     : 1;
+    optypes : (ot_memory or ot_near,ot_none,ot_none);
+    code    : #210#192#1#255#132;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LJMP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16 or ot_near,ot_none,ot_none);
+    code    : #208#192#1#255#132;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LJMP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32 or ot_near,ot_none,ot_none);
+    code    : #209#192#1#255#132;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_LJMP;
+    ops     : 1;
+    optypes : (ot_reg16,ot_none,ot_none);
+    code    : #208#192#1#255#132;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LJMP;
+    ops     : 1;
+    optypes : (ot_reg32,ot_none,ot_none);
+    code    : #209#192#1#255#132;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_LJMP;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #210#192#1#255#132;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LJMP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16,ot_none,ot_none);
+    code    : #208#192#1#255#132;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LJMP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #209#192#1#255#132;
+    flags   : if_386
+  ),
   (
     opcode  : A_LLDT;
     ops     : 1;