Kaynağa Gözat

* x86-64 adaptions

florian 22 yıl önce
ebeveyn
işleme
0b48a6a3ec

+ 7 - 4
compiler/x86/aasmcpu.pas

@@ -326,8 +326,8 @@ implementation
          )
        );
 
-      reg_ot_table : array[0..regnumber_count-1] of longint = (
-        {$i rx86_64ot.inc}
+      reg_ot_table : array[tregisterindex] of longint = (
+        {$i r8664ot.inc}
       );
 {$else x86_64}
        { Intel style operands ! }
@@ -1285,7 +1285,7 @@ implementation
     function regval(r:Tregister):byte;
       const
         opcode_table:array[tregisterindex] of tregisterindex = (
-          {$i r386op.inc}
+          {$i r8664op.inc}
         );
       begin
         result:=opcode_table[findreg_by_number(r)];
@@ -2256,7 +2256,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.24  2003-09-23 17:56:06  peter
+  Revision 1.25  2003-09-24 17:12:36  florian
+    * x86-64 adaptions
+
+  Revision 1.24  2003/09/23 17:56:06  peter
     * locals and paras are allocated in the code generation
     * tvarsym.localloc contains the location of para/local when
       generating code for the current procedure

+ 29 - 5
compiler/x86/cpubase.pas

@@ -136,6 +136,14 @@ uses
       RS_MM5        = $05;
       RS_MM6        = $06;
       RS_MM7        = $07;
+      RS_MM8        = $08;
+      RS_MM9        = $09;
+      RS_MM10       = $0a;
+      RS_MM11       = $0b;
+      RS_MM12       = $0c;
+      RS_MM13       = $0d;
+      RS_MM14       = $0e;
+      RS_MM15       = $0f;
 
       { Float Super register first and last }
       first_mmx_supreg    = $00;
@@ -152,7 +160,7 @@ uses
 
       { Available Registers }
 {$ifdef x86_64}
-      {$i rx86_64con.inc}
+      {$i r8664con.inc}
 {$else x86_64}
       {$i r386con.inc}
 {$endif x86_64}
@@ -160,7 +168,7 @@ uses
     type
       { Number of registers used for indexing in tables }
 {$ifdef x86_64}
-      tregisterindex=0..{$i rx86_64nor.inc}-1;
+      tregisterindex=0..{$i r8664nor.inc}-1;
 {$else x86_64}
       tregisterindex=0..{$i r386nor.inc}-1;
 {$endif x86_64}
@@ -171,7 +179,7 @@ uses
 
       regnumber_table : array[tregisterindex] of tregister = (
 {$ifdef x86_64}
-        {$i rx86_64con.inc}
+        {$i r8664num.inc}
 {$else x86_64}
         {$i r386num.inc}
 {$endif x86_64}
@@ -179,7 +187,7 @@ uses
 
       regstabs_table : array[tregisterindex] of tregister = (
 {$ifdef x86_64}
-        {$i rx86_64stab.inc}
+        {$i r8664stab.inc}
 {$else x86_64}
         {$i r386stab.inc}
 {$endif x86_64}
@@ -369,6 +377,18 @@ implementation
       verbose;
 
     const
+    {$ifdef x86_64}
+      std_regname_table : array[tregisterindex] of string[7] = (
+        {$i r8664std.inc}
+      );
+
+      regnumber_index : array[tregisterindex] of tregisterindex = (
+        {$i r8664rni.inc}
+      );
+      std_regname_index : array[tregisterindex] of tregisterindex = (
+        {$i r8664sri.inc}
+      );
+    {$else x86_64}
       std_regname_table : array[tregisterindex] of string[7] = (
         {$i r386std.inc}
       );
@@ -380,6 +400,7 @@ implementation
       std_regname_index : array[tregisterindex] of tregisterindex = (
         {$i r386sri.inc}
       );
+    {$endif x86_64}
 
 
 {*****************************************************************************
@@ -538,7 +559,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.18  2003-09-23 17:56:06  peter
+  Revision 1.19  2003-09-24 17:12:36  florian
+    * x86-64 adaptions
+
+  Revision 1.18  2003/09/23 17:56:06  peter
     * locals and paras are allocated in the code generation
     * tvarsym.localloc contains the location of para/local when
       generating code for the current procedure

+ 17 - 2
compiler/x86/itx86att.pas

@@ -70,6 +70,18 @@ implementation
       cutils,verbose;
 
     const
+    {$ifdef x86_64}
+      att_regname_table : array[tregisterindex] of string[7] = (
+        {r8664att.inc contains the AT&T name of each register.}
+        {$i r8664att.inc}
+      );
+
+      att_regname_index : array[tregisterindex] of tregisterindex = (
+        {r8664ari.inc contains an index which sorts att_regname_table by
+         ATT name.}
+        {$i r8664ari.inc}
+      );
+    {$else x86_64}
       att_regname_table : array[tregisterindex] of string[7] = (
         {r386att.inc contains the AT&T name of each register.}
         {$i r386att.inc}
@@ -80,7 +92,7 @@ implementation
          ATT name.}
         {$i r386ari.inc}
       );
-
+    {$endif x86_64}
 
     function findreg_by_attname(const s:string):byte;
       var
@@ -121,7 +133,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.4  2003-09-03 15:55:02  peter
+  Revision 1.5  2003-09-24 17:12:36  florian
+    * x86-64 adaptions
+
+  Revision 1.4  2003/09/03 15:55:02  peter
     * NEWRA branch merged
 
   Revision 1.3.2.6  2003/08/31 15:46:26  peter

+ 10 - 7
compiler/x86/x86reg.dat

@@ -129,16 +129,19 @@ NR_XMM6,$04000006,xmm6,%xmm6,xmm6,xmm6,27,OT_XMMREG,6
 NR_XMM7,$04000007,xmm7,%xmm7,xmm7,xmm7,28,OT_XMMREG,7
 NR_XMM8,$04000008,xmm8,%xmm8,xmm8,xmm8,-1,OT_XMMREG,0,64
 NR_XMM9,$04000009,xmm9,%xmm9,xmm9,xmm9,-1,OT_XMMREG,1,64
-NR_XMM10,$0400000a,xmm10,%xmm10,xmm10,xmm10,-1,OT_REGXMM,2,64
-NR_XMM11,$0400000b,xmm11,%xmm11,xmm11,xmm11,-1,OT_REGXMM,3,64
-NR_XMM12,$0400000c,xmm12,%xmm12,xmm12,xmm12,-1,OT_REGXMM,4,64
-NR_XMM13,$0400000d,xmm13,%xmm13,xmm13,xmm13,-1,OT_REGXMM,5,64
-NR_XMM14,$0400000e,xmm14,%xmm14,xmm14,xmm14,-1,OT_REGXMM,6,64
-NR_XMM15,$0400000f,xmm15,%xmm15,xmm15,xmm15,-1,OT_REGXMM,7,64
+NR_XMM10,$0400000a,xmm10,%xmm10,xmm10,xmm10,-1,OT_XMMREG,2,64
+NR_XMM11,$0400000b,xmm11,%xmm11,xmm11,xmm11,-1,OT_XMMREG,3,64
+NR_XMM12,$0400000c,xmm12,%xmm12,xmm12,xmm12,-1,OT_XMMREG,4,64
+NR_XMM13,$0400000d,xmm13,%xmm13,xmm13,xmm13,-1,OT_XMMREG,5,64
+NR_XMM14,$0400000e,xmm14,%xmm14,xmm14,xmm14,-1,OT_XMMREG,6,64
+NR_XMM15,$0400000f,xmm15,%xmm15,xmm15,xmm15,-1,OT_XMMREG,7,64
 
 ;
 ; $Log$
-; Revision 1.2  2003-09-03 15:55:02  peter
+; Revision 1.3  2003-09-24 17:12:36  florian
+;   * x86-64 adaptions
+;
+; Revision 1.2  2003/09/03 15:55:02  peter
 ;   * NEWRA branch merged
 ;
 ; Revision 1.1.2.5  2003/08/31 16:44:48  peter