Преглед на файлове

* changed pai386, paippc and paiapha (same for tai*) to paicpu (taicpu)

Jonas Maebe преди 26 години
родител
ревизия
5fc1435036

+ 14 - 11
compiler/ag386att.pas

@@ -669,33 +669,33 @@ unit ag386att;
 
 
            ait_instruction :
            ait_instruction :
              begin
              begin
-               op:=pai386(hp)^.opcode;
+               op:=paicpu(hp)^.opcode;
                calljmp:=is_calljmp(op);
                calljmp:=is_calljmp(op);
              { call maybe not translated to calll }
              { call maybe not translated to calll }
-               s:=#9+att_op2str[op]+cond2str[pai386(hp)^.condition];
+               s:=#9+att_op2str[op]+cond2str[paicpu(hp)^.condition];
                if (not calljmp) and
                if (not calljmp) and
                   (not att_nosuffix[op]) and
                   (not att_nosuffix[op]) and
                   not(
                   not(
-                   (pai386(hp)^.oper[0].typ=top_reg) and
-                   (pai386(hp)^.oper[0].reg in [R_ST..R_ST7])
+                   (paicpu(hp)^.oper[0].typ=top_reg) and
+                   (paicpu(hp)^.oper[0].reg in [R_ST..R_ST7])
                   ) then
                   ) then
-                s:=s+att_opsize2str[pai386(hp)^.opsize];
+                s:=s+att_opsize2str[paicpu(hp)^.opsize];
              { process operands }
              { process operands }
-               if pai386(hp)^.ops<>0 then
+               if paicpu(hp)^.ops<>0 then
                 begin
                 begin
                 { call and jmp need an extra handling                          }
                 { call and jmp need an extra handling                          }
                 { this code is only called if jmp isn't a labeled instruction }
                 { this code is only called if jmp isn't a labeled instruction }
                   if calljmp then
                   if calljmp then
-                   s:=s+#9+getopstr_jmp(pai386(hp)^.oper[0])
+                   s:=s+#9+getopstr_jmp(paicpu(hp)^.oper[0])
                   else
                   else
                    begin
                    begin
-                     for i:=0to pai386(hp)^.ops-1 do
+                     for i:=0to paicpu(hp)^.ops-1 do
                       begin
                       begin
                         if i=0 then
                         if i=0 then
                          sep:=#9
                          sep:=#9
                         else
                         else
                          sep:=',';
                          sep:=',';
-                        s:=s+sep+getopstr(pai386(hp)^.oper[i])
+                        s:=s+sep+getopstr(paicpu(hp)^.oper[i])
                       end;
                       end;
                    end;
                    end;
                 end;
                 end;
@@ -844,7 +844,10 @@ unit ag386att;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.10  1999-08-13 15:44:57  peter
+  Revision 1.11  1999-08-25 11:59:32  jonas
+    * changed pai386, paippc and paiapha (same for tai*) to paicpu (taicpu)
+
+  Revision 1.10  1999/08/13 15:44:57  peter
     * first things to include lineinfo in the executable
     * first things to include lineinfo in the executable
 
 
   Revision 1.9  1999/08/10 12:26:20  pierre
   Revision 1.9  1999/08/10 12:26:20  pierre
@@ -980,7 +983,7 @@ end.
 
 
   Revision 1.78  1999/04/16 10:00:54  pierre
   Revision 1.78  1999/04/16 10:00:54  pierre
     + ifdef USE_OP3 code :
     + ifdef USE_OP3 code :
-      added all missing op_... constructors for tai386 needed
+      added all missing op_... constructors for taicpu needed
       for SHRD,SHLD and IMUL code in assembler readers
       for SHRD,SHLD and IMUL code in assembler readers
       (check in tests/tbs0123.pp)
       (check in tests/tbs0123.pp)
 
 

+ 7 - 4
compiler/ag386bin.pas

@@ -433,7 +433,7 @@ unit ag386bin;
              ait_string :
              ait_string :
                objectalloc^.sectionalloc(pai_string(hp)^.len);
                objectalloc^.sectionalloc(pai_string(hp)^.len);
              ait_instruction :
              ait_instruction :
-               objectalloc^.sectionalloc(pai386(hp)^.Pass1(objectalloc^.sectionsize));
+               objectalloc^.sectionalloc(paicpu(hp)^.Pass1(objectalloc^.sectionsize));
              ait_cut :
              ait_cut :
                if SmartAsm then
                if SmartAsm then
                 begin
                 begin
@@ -584,7 +584,7 @@ unit ag386bin;
              ait_string :
              ait_string :
                objectalloc^.sectionalloc(pai_string(hp)^.len);
                objectalloc^.sectionalloc(pai_string(hp)^.len);
              ait_instruction :
              ait_instruction :
-               objectalloc^.sectionalloc(pai386(hp)^.Pass1(objectalloc^.sectionsize));
+               objectalloc^.sectionalloc(paicpu(hp)^.Pass1(objectalloc^.sectionsize));
              ait_direct :
              ait_direct :
                Message(asmw_f_direct_not_supported);
                Message(asmw_f_direct_not_supported);
              ait_cut :
              ait_cut :
@@ -707,7 +707,7 @@ unit ag386bin;
              ait_label :
              ait_label :
                objectoutput^.writesymbol(pai_label(hp)^.l);
                objectoutput^.writesymbol(pai_label(hp)^.l);
              ait_instruction :
              ait_instruction :
-               pai386(hp)^.Pass2;
+               paicpu(hp)^.Pass2;
 {$ifdef GDB}
 {$ifdef GDB}
              ait_stabn :
              ait_stabn :
                convertstabs(pai_stabn(hp)^.str);
                convertstabs(pai_stabn(hp)^.str);
@@ -905,7 +905,10 @@ unit ag386bin;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.23  1999-08-10 12:26:21  pierre
+  Revision 1.24  1999-08-25 11:59:33  jonas
+    * changed pai386, paippc and paiapha (same for tai*) to paicpu (taicpu)
+
+  Revision 1.23  1999/08/10 12:26:21  pierre
    * avoid double .edata section if using DLLTOOL
    * avoid double .edata section if using DLLTOOL
 
 
   Revision 1.22  1999/08/04 00:22:35  florian
   Revision 1.22  1999/08/04 00:22:35  florian

+ 20 - 17
compiler/ag386int.pas

@@ -477,21 +477,21 @@ unit ag386int;
                      end;
                      end;
    ait_instruction : begin
    ait_instruction : begin
                      { We need intel order, no At&t }
                      { We need intel order, no At&t }
-                       pai386(hp)^.SwapOperands;
+                       paicpu(hp)^.SwapOperands;
                      { Reset }
                      { Reset }
                        suffix:='';
                        suffix:='';
                        prefix:= '';
                        prefix:= '';
                        s:='';
                        s:='';
                      { added prefix instructions, must be on same line as opcode }
                      { added prefix instructions, must be on same line as opcode }
-                       if (pai386(hp)^.ops = 0) and
-                          ((pai386(hp)^.opcode = A_REP) or
-                           (pai386(hp)^.opcode = A_LOCK) or
-                           (pai386(hp)^.opcode =  A_REPE) or
-                           (pai386(hp)^.opcode =  A_REPNZ) or
-                           (pai386(hp)^.opcode =  A_REPZ) or
-                           (pai386(hp)^.opcode = A_REPNE)) then
+                       if (paicpu(hp)^.ops = 0) and
+                          ((paicpu(hp)^.opcode = A_REP) or
+                           (paicpu(hp)^.opcode = A_LOCK) or
+                           (paicpu(hp)^.opcode =  A_REPE) or
+                           (paicpu(hp)^.opcode =  A_REPNZ) or
+                           (paicpu(hp)^.opcode =  A_REPZ) or
+                           (paicpu(hp)^.opcode = A_REPNE)) then
                         Begin
                         Begin
-                          prefix:=int_op2str[pai386(hp)^.opcode]+#9;
+                          prefix:=int_op2str[paicpu(hp)^.opcode]+#9;
                           hp:=Pai(hp^.next);
                           hp:=Pai(hp^.next);
                         { this is theorically impossible... }
                         { this is theorically impossible... }
                           if hp=nil then
                           if hp=nil then
@@ -506,23 +506,23 @@ unit ag386int;
                         end
                         end
                        else
                        else
                         prefix:= '';
                         prefix:= '';
-                       if pai386(hp)^.ops<>0 then
+                       if paicpu(hp)^.ops<>0 then
                         begin
                         begin
-                          if is_calljmp(pai386(hp)^.opcode) then
-                           s:=#9+getopstr_jmp(pai386(hp)^.oper[0])
+                          if is_calljmp(paicpu(hp)^.opcode) then
+                           s:=#9+getopstr_jmp(paicpu(hp)^.oper[0])
                           else
                           else
                            begin
                            begin
-                             for i:=0to pai386(hp)^.ops-1 do
+                             for i:=0to paicpu(hp)^.ops-1 do
                               begin
                               begin
                                 if i=0 then
                                 if i=0 then
                                  sep:=#9
                                  sep:=#9
                                 else
                                 else
                                  sep:=',';
                                  sep:=',';
-                                s:=s+sep+getopstr(pai386(hp)^.oper[i],pai386(hp)^.opsize,pai386(hp)^.opcode,(i=2));
+                                s:=s+sep+getopstr(paicpu(hp)^.oper[i],paicpu(hp)^.opsize,paicpu(hp)^.opcode,(i=2));
                               end;
                               end;
                            end;
                            end;
                         end;
                         end;
-                       AsmWriteLn(#9#9+prefix+int_op2str[pai386(hp)^.opcode]+cond2str[pai386(hp)^.condition]+suffix+s);
+                       AsmWriteLn(#9#9+prefix+int_op2str[paicpu(hp)^.opcode]+cond2str[paicpu(hp)^.condition]+suffix+s);
                      end;
                      end;
 {$ifdef GDB}
 {$ifdef GDB}
              ait_stabn,
              ait_stabn,
@@ -627,7 +627,10 @@ ait_stab_function_name : ;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.51  1999-08-04 00:22:36  florian
+  Revision 1.52  1999-08-25 11:59:36  jonas
+    * changed pai386, paippc and paiapha (same for tai*) to paicpu (taicpu)
+
+  Revision 1.51  1999/08/04 00:22:36  florian
     * renamed i386asm and i386base to cpuasm and cpubase
     * renamed i386asm and i386base to cpuasm and cpubase
 
 
   Revision 1.50  1999/07/22 09:37:31  florian
   Revision 1.50  1999/07/22 09:37:31  florian
@@ -713,7 +716,7 @@ end.
 
 
   Revision 1.31  1999/04/16 10:00:55  pierre
   Revision 1.31  1999/04/16 10:00:55  pierre
     + ifdef USE_OP3 code :
     + ifdef USE_OP3 code :
-      added all missing op_... constructors for tai386 needed
+      added all missing op_... constructors for taicpu needed
       for SHRD,SHLD and IMUL code in assembler readers
       for SHRD,SHLD and IMUL code in assembler readers
       (check in tests/tbs0123.pp)
       (check in tests/tbs0123.pp)
 
 

+ 15 - 12
compiler/ag386nsm.pas

@@ -481,33 +481,33 @@ unit ag386nsm;
                      end;
                      end;
    ait_instruction : begin
    ait_instruction : begin
                      { We need intel order, no At&t }
                      { We need intel order, no At&t }
-                       pai386(hp)^.SwapOperands;
+                       paicpu(hp)^.SwapOperands;
                      { Reset }
                      { Reset }
                        suffix:='';
                        suffix:='';
                        prefix:='';
                        prefix:='';
                        s:='';
                        s:='';
-                       if pai386(hp)^.ops<>0 then
+                       if paicpu(hp)^.ops<>0 then
                         begin
                         begin
-                          if is_calljmp(pai386(hp)^.opcode) then
-                           s:=#9+getopstr_jmp(pai386(hp)^.oper[0])
+                          if is_calljmp(paicpu(hp)^.opcode) then
+                           s:=#9+getopstr_jmp(paicpu(hp)^.oper[0])
                           else
                           else
                            begin
                            begin
-                             for i:=0to pai386(hp)^.ops-1 do
+                             for i:=0to paicpu(hp)^.ops-1 do
                               begin
                               begin
                                 if i=0 then
                                 if i=0 then
                                  sep:=#9
                                  sep:=#9
                                 else
                                 else
                                  sep:=',';
                                  sep:=',';
-                                s:=s+sep+getopstr(pai386(hp)^.oper[i],pai386(hp)^.opsize,pai386(hp)^.opcode,
-                                  pai386(hp)^.ops,(i=2));
+                                s:=s+sep+getopstr(paicpu(hp)^.oper[i],paicpu(hp)^.opsize,paicpu(hp)^.opcode,
+                                  paicpu(hp)^.ops,(i=2));
                               end;
                               end;
                            end;
                            end;
                         end;
                         end;
-                       if pai386(hp)^.opcode=A_FWAIT then
+                       if paicpu(hp)^.opcode=A_FWAIT then
                         AsmWriteln(#9#9'DB'#9'09bh')
                         AsmWriteln(#9#9'DB'#9'09bh')
                        else
                        else
-                        AsmWriteLn(#9#9+prefix+int_op2str[pai386(hp)^.opcode]+
-                          cond2str[pai386(hp)^.condition]+suffix+s);
+                        AsmWriteLn(#9#9+prefix+int_op2str[paicpu(hp)^.opcode]+
+                          cond2str[paicpu(hp)^.condition]+suffix+s);
                      end;
                      end;
 {$ifdef GDB}
 {$ifdef GDB}
              ait_stabn,
              ait_stabn,
@@ -602,7 +602,10 @@ ait_stab_function_name : ;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.48  1999-08-04 00:22:37  florian
+  Revision 1.49  1999-08-25 11:59:38  jonas
+    * changed pai386, paippc and paiapha (same for tai*) to paicpu (taicpu)
+
+  Revision 1.48  1999/08/04 00:22:37  florian
     * renamed i386asm and i386base to cpuasm and cpubase
     * renamed i386asm and i386base to cpuasm and cpubase
 
 
   Revision 1.47  1999/08/01 18:28:10  florian
   Revision 1.47  1999/08/01 18:28:10  florian
@@ -694,7 +697,7 @@ end.
 
 
   Revision 1.26  1999/04/16 10:00:56  pierre
   Revision 1.26  1999/04/16 10:00:56  pierre
     + ifdef USE_OP3 code :
     + ifdef USE_OP3 code :
-      added all missing op_... constructors for tai386 needed
+      added all missing op_... constructors for taicpu needed
       for SHRD,SHLD and IMUL code in assembler readers
       for SHRD,SHLD and IMUL code in assembler readers
       (check in tests/tbs0123.pp)
       (check in tests/tbs0123.pp)
 
 

+ 5 - 2
compiler/cg386cal.pas

@@ -221,7 +221,7 @@ implementation
          inlinecode : ptree;
          inlinecode : ptree;
          para_offset : longint;
          para_offset : longint;
          { instruction for alignement correction }
          { instruction for alignement correction }
-{        corr : pai386;}
+{        corr : paicpu;}
          { we must pop this size also after !! }
          { we must pop this size also after !! }
 {        must_pop : boolean; }
 {        must_pop : boolean; }
          pop_size : longint;
          pop_size : longint;
@@ -1211,7 +1211,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.101  1999-08-23 23:38:18  pierre
+  Revision 1.102  1999-08-25 11:59:39  jonas
+    * changed pai386, paippc and paiapha (same for tai*) to paicpu (taicpu)
+
+  Revision 1.101  1999/08/23 23:38:18  pierre
    + TEMPREGDEBUG code added
    + TEMPREGDEBUG code added
 
 
   Revision 1.100  1999/08/19 13:08:45  pierre
   Revision 1.100  1999/08/19 13:08:45  pierre

+ 5 - 2
compiler/cg386flw.pas

@@ -796,12 +796,15 @@ do_jmp:
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.46  1999-08-19 13:06:47  pierre
+  Revision 1.47  1999-08-25 11:59:42  jonas
+    * changed pai386, paippc and paiapha (same for tai*) to paicpu (taicpu)
+
+  Revision 1.46  1999/08/19 13:06:47  pierre
     * _FAIL will now free memory correctly
     * _FAIL will now free memory correctly
       and reset VMT field on static instances
       and reset VMT field on static instances
       (not yet tested for classes, is it allowed ?)
       (not yet tested for classes, is it allowed ?)
     + emit_.... all variant defined here to avoid tons of
     + emit_.... all variant defined here to avoid tons of
-      exprasmlist^.concat(new(pai386,...) in cg386***
+      exprasmlist^.concat(new(paicpu,...) in cg386***
 
 
   Revision 1.45  1999/08/04 00:22:46  florian
   Revision 1.45  1999/08/04 00:22:46  florian
     * renamed i386asm and i386base to cpuasm and cpubase
     * renamed i386asm and i386base to cpuasm and cpubase

+ 6 - 3
compiler/cg386ld.pas

@@ -377,7 +377,7 @@ implementation
          fputyp : tfloattype;
          fputyp : tfloattype;
          loc : tloc;
          loc : tloc;
          r : preference;
          r : preference;
-         ai : pai386;
+         ai : paicpu;
          op : tasmop;
          op : tasmop;
       begin
       begin
          otlabel:=truelabel;
          otlabel:=truelabel;
@@ -740,7 +740,7 @@ implementation
                                 emit_flag2reg(p^.right^.location.resflags,p^.left^.location.register)
                                 emit_flag2reg(p^.right^.location.resflags,p^.left^.location.register)
                               else
                               else
                                 begin
                                 begin
-                                  ai:=new(pai386,op_ref(A_Setcc,S_B,newreference(p^.left^.location.reference)));
+                                  ai:=new(paicpu,op_ref(A_Setcc,S_B,newreference(p^.left^.location.reference)));
                                   ai^.SetCondition(flag_2_cond[p^.right^.location.resflags]);
                                   ai^.SetCondition(flag_2_cond[p^.right^.location.resflags]);
                                   exprasmlist^.concat(ai);
                                   exprasmlist^.concat(ai);
                                 end;
                                 end;
@@ -968,7 +968,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.77  1999-08-24 22:38:51  michael
+  Revision 1.78  1999-08-25 11:59:43  jonas
+    * changed pai386, paippc and paiapha (same for tai*) to paicpu (taicpu)
+
+  Revision 1.77  1999/08/24 22:38:51  michael
   * more resourcestring changes
   * more resourcestring changes
 
 
   Revision 1.76  1999/08/23 11:45:39  michael
   Revision 1.76  1999/08/23 11:45:39  michael

+ 8 - 5
compiler/cg386mem.pas

@@ -412,7 +412,7 @@ implementation
          t   : ptree;
          t   : ptree;
          hp  : preference;
          hp  : preference;
          href : treference;
          href : treference;
-         tai : Pai386;
+         tai : Paicpu;
          pushed : tpushed;
          pushed : tpushed;
          hightree : ptree;
          hightree : ptree;
 
 
@@ -685,9 +685,9 @@ implementation
                        { Booleans are stored in an 8 bit memory location, so
                        { Booleans are stored in an 8 bit memory location, so
                          the use of MOVL is not correct }
                          the use of MOVL is not correct }
                        case p^.right^.resulttype^.size of
                        case p^.right^.resulttype^.size of
-                        1 : tai:=new(pai386,op_ref_reg(A_MOVZX,S_BL,newreference(p^.right^.location.reference),ind));
-                        2 : tai:=new(Pai386,op_ref_reg(A_MOVZX,S_WL,newreference(p^.right^.location.reference),ind));
-                        4 : tai:=new(Pai386,op_ref_reg(A_MOV,S_L,newreference(p^.right^.location.reference),ind));
+                        1 : tai:=new(paicpu,op_ref_reg(A_MOVZX,S_BL,newreference(p^.right^.location.reference),ind));
+                        2 : tai:=new(Paicpu,op_ref_reg(A_MOVZX,S_WL,newreference(p^.right^.location.reference),ind));
+                        4 : tai:=new(Paicpu,op_ref_reg(A_MOV,S_L,newreference(p^.right^.location.reference),ind));
                        end;
                        end;
                        exprasmlist^.concat(tai);
                        exprasmlist^.concat(tai);
                     end;
                     end;
@@ -851,7 +851,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.53  1999-08-23 23:49:21  pierre
+  Revision 1.54  1999-08-25 11:59:46  jonas
+    * changed pai386, paippc and paiapha (same for tai*) to paicpu (taicpu)
+
+  Revision 1.53  1999/08/23 23:49:21  pierre
    * hnewn location corrected
    * hnewn location corrected
 
 
   Revision 1.52  1999/08/19 13:08:52  pierre
   Revision 1.52  1999/08/19 13:08:52  pierre

+ 5 - 2
compiler/cg386set.pas

@@ -730,7 +730,7 @@ implementation
            emit_ref(A_JMP,S_NO,hr);
            emit_ref(A_JMP,S_NO,hr);
            { !!!!! generate tables
            { !!!!! generate tables
              if not(cs_littlesize in aktlocalswitches) then
              if not(cs_littlesize in aktlocalswitches) then
-             jumpsegment^.concat(new(pai386,op_const(A_ALIGN,S_NO,4)));
+             jumpsegment^.concat(new(paicpu,op_const(A_ALIGN,S_NO,4)));
            }
            }
            jumpsegment^.concat(new(pai_label,init(table)));
            jumpsegment^.concat(new(pai_label,init(table)));
              last:=min_;
              last:=min_;
@@ -919,7 +919,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.39  1999-08-23 23:46:42  pierre
+  Revision 1.40  1999-08-25 11:59:47  jonas
+    * changed pai386, paippc and paiapha (same for tai*) to paicpu (taicpu)
+
+  Revision 1.39  1999/08/23 23:46:42  pierre
    * del_reference moved to respect registers32 in secondin
    * del_reference moved to respect registers32 in secondin
 
 
   Revision 1.38  1999/08/19 13:08:53  pierre
   Revision 1.38  1999/08/19 13:08:53  pierre

+ 13 - 10
compiler/cg68kcnv.pas

@@ -703,7 +703,7 @@ implementation
 {           for u32bit a solution would be to push $0 and to load a
 {           for u32bit a solution would be to push $0 and to load a
 +          comp
 +          comp
 +           if porddef(p^.left^.resulttype)^.typ=u32bit then
 +           if porddef(p^.left^.resulttype)^.typ=u32bit then
-+             exprasmlist^.concat(new(pai386,op_ref(A_FILD,S_IQ,r)))
++             exprasmlist^.concat(new(paicpu,op_ref(A_FILD,S_IQ,r)))
 +           else}
 +           else}
           clear_location(p^.location);
           clear_location(p^.location);
           p^.location.loc := LOC_FPU;
           p^.location.loc := LOC_FPU;
@@ -1090,9 +1090,9 @@ implementation
 { !!!!!!!!
 { !!!!!!!!
                         case porddef(p^.resulttype)^.typ of
                         case porddef(p^.resulttype)^.typ of
                   bool16bit,
                   bool16bit,
-              u16bit,s16bit : exprasmlist^.concat(new(pai386,op_reg_reg(A_MOVZX,S_BW,hregister,p^.location.register)));
+              u16bit,s16bit : exprasmlist^.concat(new(paicpu,op_reg_reg(A_MOVZX,S_BW,hregister,p^.location.register)));
                   bool32bit,
                   bool32bit,
-              u32bit,s32bit : exprasmlist^.concat(new(pai386,op_reg_reg(A_MOVZX,S_BL,hregister,p^.location.register)));
+              u32bit,s32bit : exprasmlist^.concat(new(paicpu,op_reg_reg(A_MOVZX,S_BL,hregister,p^.location.register)));
                         end; }
                         end; }
                       end;
                       end;
            LOC_JUMP : begin
            LOC_JUMP : begin
@@ -1144,11 +1144,11 @@ implementation
 
 
           bool16bit : begin
           bool16bit : begin
                         p^.location.register:=reg8toreg16(hregister);
                         p^.location.register:=reg8toreg16(hregister);
-                        exprasmlist^.concat(new(pai386,op_reg_reg(A_MOVZX,S_BW,hregister,p^.location.register)));
+                        exprasmlist^.concat(new(paicpu,op_reg_reg(A_MOVZX,S_BW,hregister,p^.location.register)));
                       end;
                       end;
           bool32bit : begin
           bool32bit : begin
                         p^.location.register:=reg16toreg32(hregister);
                         p^.location.register:=reg16toreg32(hregister);
-                        exprasmlist^.concat(new(pai386,op_reg_reg(A_MOVZX,S_BL,hregister,p^.location.register)));
+                        exprasmlist^.concat(new(paicpu,op_reg_reg(A_MOVZX,S_BL,hregister,p^.location.register)));
                       end; }
                       end; }
          else
          else
           internalerror(10064);
           internalerror(10064);
@@ -1190,11 +1190,11 @@ implementation
          getlabel(l2);
          getlabel(l2);
          case hp^.location.loc of
          case hp^.location.loc of
             LOC_CREGISTER,LOC_REGISTER:
             LOC_CREGISTER,LOC_REGISTER:
-              exprasmlist^.concat(new(pai386,op_const_reg(A_CMP,S_L,0,
+              exprasmlist^.concat(new(paicpu,op_const_reg(A_CMP,S_L,0,
                 hp^.location.register)));
                 hp^.location.register)));
             LOC_MEM,LOC_REFERENCE:
             LOC_MEM,LOC_REFERENCE:
               begin
               begin
-                 exprasmlist^.concat(new(pai386,op_const_ref(A_CMP,S_L,0,
+                 exprasmlist^.concat(new(paicpu,op_const_ref(A_CMP,S_L,0,
                    newreference(hp^.location.reference))));
                    newreference(hp^.location.reference))));
                   del_reference(hp^.location.reference);
                   del_reference(hp^.location.reference);
                   p^.location.register:=getregister32;
                   p^.location.register:=getregister32;
@@ -1202,7 +1202,7 @@ implementation
          end;
          end;
          emitl(A_JZ,l1);
          emitl(A_JZ,l1);
          if hp^.location.loc in [LOC_MEM,LOC_REFERENCE] then
          if hp^.location.loc in [LOC_MEM,LOC_REFERENCE] then
-           exprasmlist^.concat(new(pai386,op_ref_reg(A_MOV,S_L,newreference(
+           exprasmlist^.concat(new(paicpu,op_ref_reg(A_MOV,S_L,newreference(
              hp^.location.reference),
              hp^.location.reference),
              p^.location.register)));
              p^.location.register)));
          emitl(A_JMP,l2);
          emitl(A_JMP,l2);
@@ -1210,7 +1210,7 @@ implementation
          new(hr);
          new(hr);
          reset_reference(hr^);
          reset_reference(hr^);
          hr^.symbol:=stringdup('FPC_EMPTYCHAR');
          hr^.symbol:=stringdup('FPC_EMPTYCHAR');
-         exprasmlist^.concat(new(pai386,op_ref_reg(A_LEA,S_L,hr,
+         exprasmlist^.concat(new(paicpu,op_ref_reg(A_LEA,S_L,hr,
            p^.location.register)));
            p^.location.register)));
          emitl(A_LABEL,l2); }
          emitl(A_LABEL,l2); }
       end;
       end;
@@ -1363,7 +1363,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.12  1998-12-11 00:02:59  peter
+  Revision 1.13  1999-08-25 11:59:48  jonas
+    * changed pai386, paippc and paiapha (same for tai*) to paicpu (taicpu)
+
+  Revision 1.12  1998/12/11 00:02:59  peter
     + globtype,tokens,version unit splitted from globals
     + globtype,tokens,version unit splitted from globals
 
 
   Revision 1.11  1998/11/05 12:02:36  peter
   Revision 1.11  1998/11/05 12:02:36  peter

+ 17 - 14
compiler/cg68kflw.pas

@@ -620,12 +620,12 @@ do_jmp:
          getlabel(lastonlabel);
          getlabel(lastonlabel);
          push_int (1); { push type of exceptionframe }
          push_int (1); { push type of exceptionframe }
          emitcall('FPC_PUSHEXCEPTADDR',true);
          emitcall('FPC_PUSHEXCEPTADDR',true);
-         exprasmlist^.concat(new(pai386,
+         exprasmlist^.concat(new(paicpu,
            op_reg(A_PUSH,S_L,R_EAX)));
            op_reg(A_PUSH,S_L,R_EAX)));
          emitcall('FPC_SETJMP',true);
          emitcall('FPC_SETJMP',true);
-         exprasmlist^.concat(new(pai386,
+         exprasmlist^.concat(new(paicpu,
            op_reg(A_PUSH,S_L,R_EAX)));
            op_reg(A_PUSH,S_L,R_EAX)));
-         exprasmlist^.concat(new(pai386,
+         exprasmlist^.concat(new(paicpu,
            op_reg_reg(A_TEST,S_L,R_EAX,R_EAX)));
            op_reg_reg(A_TEST,S_L,R_EAX,R_EAX)));
          emitl(A_JNE,exceptlabel);
          emitl(A_JNE,exceptlabel);
 
 
@@ -635,9 +635,9 @@ do_jmp:
            exit;
            exit;
 
 
          emitl(A_LABEL,exceptlabel);
          emitl(A_LABEL,exceptlabel);
-         exprasmlist^.concat(new(pai386,
+         exprasmlist^.concat(new(paicpu,
            op_reg(A_POP,S_L,R_EAX)));
            op_reg(A_POP,S_L,R_EAX)));
-         exprasmlist^.concat(new(pai386,
+         exprasmlist^.concat(new(paicpu,
            op_reg_reg(A_TEST,S_L,R_EAX,R_EAX)));
            op_reg_reg(A_TEST,S_L,R_EAX,R_EAX)));
          emitl(A_JNE,doexceptlabel);
          emitl(A_JNE,doexceptlabel);
          emitcall('FPC_POPADDRSTACK',true);
          emitcall('FPC_POPADDRSTACK',true);
@@ -678,13 +678,13 @@ do_jmp:
 { !!!!!!!!!!!!!!! }
 { !!!!!!!!!!!!!!! }
 (*         getlabel(nextonlabel);
 (*         getlabel(nextonlabel);
          { push the vmt }
          { push the vmt }
-         exprasmlist^.concat(new(pai386,op_csymbol(A_PUSH,S_L,
+         exprasmlist^.concat(new(paicpu,op_csymbol(A_PUSH,S_L,
            newcsymbol(p^.excepttype^.vmt_mangledname,0))));
            newcsymbol(p^.excepttype^.vmt_mangledname,0))));
          maybe_concat_external(p^.excepttype^.owner,
          maybe_concat_external(p^.excepttype^.owner,
            p^.excepttype^.vmt_mangledname);
            p^.excepttype^.vmt_mangledname);
 
 
          emitcall('FPC_CATCHES',true);
          emitcall('FPC_CATCHES',true);
-         exprasmlist^.concat(new(pai386,
+         exprasmlist^.concat(new(paicpu,
            op_reg_reg(A_TEST,S_L,R_EAX,R_EAX)));
            op_reg_reg(A_TEST,S_L,R_EAX,R_EAX)));
          emitl(A_JE,nextonlabel);
          emitl(A_JE,nextonlabel);
          ref.symbol:=nil;
          ref.symbol:=nil;
@@ -694,7 +694,7 @@ do_jmp:
          if assigned(p^.exceptsymtable) then
          if assigned(p^.exceptsymtable) then
            pvarsym(p^.exceptsymtable^.root)^.address:=ref.offset;
            pvarsym(p^.exceptsymtable^.root)^.address:=ref.offset;
 
 
-         exprasmlist^.concat(new(pai386,op_reg_ref(A_MOV,S_L,
+         exprasmlist^.concat(new(paicpu,op_reg_ref(A_MOV,S_L,
            R_EAX,newreference(ref))));
            R_EAX,newreference(ref))));
 
 
          if assigned(p^.right) then
          if assigned(p^.right) then
@@ -726,12 +726,12 @@ do_jmp:
          getlabel(endfinallylabel);
          getlabel(endfinallylabel);
          push_int(1); { Type of stack-frame must be pushed}
          push_int(1); { Type of stack-frame must be pushed}
          emitcall('FPC_PUSHEXCEPTADDR',true);
          emitcall('FPC_PUSHEXCEPTADDR',true);
-         exprasmlist^.concat(new(pai386,
+         exprasmlist^.concat(new(paicpu,
            op_reg(A_PUSH,S_L,R_EAX)));
            op_reg(A_PUSH,S_L,R_EAX)));
          emitcall('FPC_SETJMP',true);
          emitcall('FPC_SETJMP',true);
-         exprasmlist^.concat(new(pai386,
+         exprasmlist^.concat(new(paicpu,
            op_reg(A_PUSH,S_L,R_EAX)));
            op_reg(A_PUSH,S_L,R_EAX)));
-         exprasmlist^.concat(new(pai386,
+         exprasmlist^.concat(new(paicpu,
            op_reg_reg(A_TEST,S_L,R_EAX,R_EAX)));
            op_reg_reg(A_TEST,S_L,R_EAX,R_EAX)));
          emitl(A_JNE,finallylabel);
          emitl(A_JNE,finallylabel);
 
 
@@ -746,9 +746,9 @@ do_jmp:
          secondpass(p^.right);
          secondpass(p^.right);
          if codegenerror then
          if codegenerror then
            exit;
            exit;
-         exprasmlist^.concat(new(pai386,
+         exprasmlist^.concat(new(paicpu,
            op_reg(A_POP,S_L,R_EAX)));
            op_reg(A_POP,S_L,R_EAX)));
-         exprasmlist^.concat(new(pai386,
+         exprasmlist^.concat(new(paicpu,
            op_reg_reg(A_TEST,S_L,R_EAX,R_EAX)));
            op_reg_reg(A_TEST,S_L,R_EAX,R_EAX)));
          emitl(A_JE,noreraiselabel);
          emitl(A_JE,noreraiselabel);
          emitcall('FPC_RERAISE',true);
          emitcall('FPC_RERAISE',true);
@@ -779,7 +779,10 @@ do_jmp:
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.8  1998-12-11 00:03:02  peter
+  Revision 1.9  1999-08-25 11:59:49  jonas
+    * changed pai386, paippc and paiapha (same for tai*) to paicpu (taicpu)
+
+  Revision 1.8  1998/12/11 00:03:02  peter
     + globtype,tokens,version unit splitted from globals
     + globtype,tokens,version unit splitted from globals
 
 
   Revision 1.7  1998/10/14 11:28:19  florian
   Revision 1.7  1998/10/14 11:28:19  florian

+ 7 - 4
compiler/cg68kinl.pas

@@ -873,14 +873,14 @@ implementation
                            else
                            else
                              begin
                              begin
                                 hregister:=R_EDI;
                                 hregister:=R_EDI;
-                                exprasmlist^.concat(new(pai386,op_ref_reg(A_MOV,S_L,
+                                exprasmlist^.concat(new(paicpu,op_ref_reg(A_MOV,S_L,
                                   newreference(p^.left^.right^.left^.location.reference),R_EDI)));
                                   newreference(p^.left^.right^.left^.location.reference),R_EDI)));
                              end;
                              end;
                           if (p^.left^.left^.location.loc=LOC_REFERENCE) then
                           if (p^.left^.left^.location.loc=LOC_REFERENCE) then
-                            exprasmlist^.concat(new(pai386,op_reg_ref(asmop,S_L,R_EDI,
+                            exprasmlist^.concat(new(paicpu,op_reg_ref(asmop,S_L,R_EDI,
                               newreference(p^.left^.right^.left^.location.reference))))
                               newreference(p^.left^.right^.left^.location.reference))))
                           else
                           else
-                            exprasmlist^.concat(new(pai386,op_reg_reg(asmop,S_L,R_EDI,
+                            exprasmlist^.concat(new(paicpu,op_reg_reg(asmop,S_L,R_EDI,
                               p^.left^.right^.left^.location.register)));
                               p^.left^.right^.left^.location.register)));
                         end
                         end
                       else
                       else
@@ -900,7 +900,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.16  1999-04-07 15:31:18  pierre
+  Revision 1.17  1999-08-25 11:59:50  jonas
+    * changed pai386, paippc and paiapha (same for tai*) to paicpu (taicpu)
+
+  Revision 1.16  1999/04/07 15:31:18  pierre
     * all formaldefs are now a sinlge definition
     * all formaldefs are now a sinlge definition
       cformaldef (this was necessary for double_checksum)
       cformaldef (this was necessary for double_checksum)
     + small part of double_checksum code
     + small part of double_checksum code

+ 6 - 3
compiler/cg68kmem.pas

@@ -193,7 +193,7 @@ implementation
                      emitpushreferenceaddr(exprasmlist,r^);
                      emitpushreferenceaddr(exprasmlist,r^);
                      { push pointer adress }
                      { push pointer adress }
                      case p^.left^.location.loc of
                      case p^.left^.location.loc of
-                        LOC_CREGISTER : exprasmlist^.concat(new(pai386,op_reg(A_PUSH,S_L,
+                        LOC_CREGISTER : exprasmlist^.concat(new(paicpu,op_reg(A_PUSH,S_L,
                           p^.left^.location.register)));
                           p^.left^.location.register)));
                         LOC_REFERENCE:
                         LOC_REFERENCE:
                           emitpushreferenceaddr(exprasmlist,p^.left^.location.reference);
                           emitpushreferenceaddr(exprasmlist,p^.left^.location.reference);
@@ -215,7 +215,7 @@ implementation
                      emitpushreferenceaddr(exprasmlist,r^);
                      emitpushreferenceaddr(exprasmlist,r^);
                      { push pointer adress }
                      { push pointer adress }
                      case p^.left^.location.loc of
                      case p^.left^.location.loc of
-                        LOC_CREGISTER : exprasmlist^.concat(new(pai386,op_reg(A_PUSH,S_L,
+                        LOC_CREGISTER : exprasmlist^.concat(new(paicpu,op_reg(A_PUSH,S_L,
                           p^.left^.location.register)));
                           p^.left^.location.register)));
                         LOC_REFERENCE:
                         LOC_REFERENCE:
                           emitpushreferenceaddr(exprasmlist,p^.left^.location.reference);
                           emitpushreferenceaddr(exprasmlist,p^.left^.location.reference);
@@ -725,7 +725,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.11  1998-12-11 10:48:11  pierre
+  Revision 1.12  1999-08-25 11:59:52  jonas
+    * changed pai386, paippc and paiapha (same for tai*) to paicpu (taicpu)
+
+  Revision 1.11  1998/12/11 10:48:11  pierre
    * #0 char removed
    * #0 char removed
 
 
   Revision 1.10  1998/12/11 00:03:06  peter
   Revision 1.10  1998/12/11 00:03:06  peter

+ 7 - 4
compiler/cga68k.pas

@@ -293,15 +293,15 @@ procedure mov_reg_to_dest(p : ptree; s : topsize; reg : tregister);
 (*        case hr of
 (*        case hr of
       R_AX..R_DI : begin
       R_AX..R_DI : begin
                      hr:=reg16toreg32(hr);
                      hr:=reg16toreg32(hr);
-                     exprasmlist^.concat(new(pai386,op_const_reg(A_AND,S_L,$ffff,hr)));
+                     exprasmlist^.concat(new(paicpu,op_const_reg(A_AND,S_L,$ffff,hr)));
                    end;
                    end;
       R_AL..R_DL : begin
       R_AL..R_DL : begin
                      hr:=reg8toreg32(hr);
                      hr:=reg8toreg32(hr);
-                     exprasmlist^.concat(new(pai386,op_const_reg(A_AND,S_L,$ff,hr)));
+                     exprasmlist^.concat(new(paicpu,op_const_reg(A_AND,S_L,$ff,hr)));
                    end;
                    end;
       R_AH..R_DH : begin
       R_AH..R_DH : begin
                      hr:=reg8toreg32(hr);
                      hr:=reg8toreg32(hr);
-                     exprasmlist^.concat(new(pai386,op_const_reg(A_AND,S_L,$ff00,hr)));
+                     exprasmlist^.concat(new(paicpu,op_const_reg(A_AND,S_L,$ff00,hr)));
                    end;
                    end;
         end; *)
         end; *)
       end;
       end;
@@ -1396,7 +1396,10 @@ end;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.31  1998-12-11 00:03:09  peter
+  Revision 1.32  1999-08-25 11:59:54  jonas
+    * changed pai386, paippc and paiapha (same for tai*) to paicpu (taicpu)
+
+  Revision 1.31  1998/12/11 00:03:09  peter
     + globtype,tokens,version unit splitted from globals
     + globtype,tokens,version unit splitted from globals
 
 
   Revision 1.30  1998/11/30 09:43:05  pierre
   Revision 1.30  1998/11/30 09:43:05  pierre

Файловите разлики са ограничени, защото са твърде много
+ 161 - 161
compiler/cgai386.pas


+ 52 - 49
compiler/cpuasm.pas

@@ -54,8 +54,8 @@ type
   end;
   end;
 
 
 
 
-  pai386 = ^tai386;
-  tai386 = object(tai)
+  paicpu = ^taicpu;
+  taicpu = object(tai)
      is_jmp    : boolean; { is this instruction a jump? (needed for optimizer) }
      is_jmp    : boolean; { is this instruction a jump? (needed for optimizer) }
      opcode    : tasmop;
      opcode    : tasmop;
      opsize    : topsize;
      opsize    : topsize;
@@ -156,10 +156,10 @@ uses
 
 
 
 
 {*****************************************************************************
 {*****************************************************************************
-                                 Tai386 Constructors
+                                 Taicpu Constructors
 *****************************************************************************}
 *****************************************************************************}
 
 
-    procedure tai386.loadconst(opidx:longint;l:longint);
+    procedure taicpu.loadconst(opidx:longint;l:longint);
       begin
       begin
         if opidx>=ops then
         if opidx>=ops then
          ops:=opidx+1;
          ops:=opidx+1;
@@ -172,7 +172,7 @@ uses
          end;
          end;
       end;
       end;
 
 
-    procedure tai386.loadsymbol(opidx:longint;s:pasmsymbol;sofs:longint);
+    procedure taicpu.loadsymbol(opidx:longint;s:pasmsymbol;sofs:longint);
       begin
       begin
         if opidx>=ops then
         if opidx>=ops then
          ops:=opidx+1;
          ops:=opidx+1;
@@ -189,7 +189,7 @@ uses
          inc(s^.refs);
          inc(s^.refs);
       end;
       end;
 
 
-    procedure tai386.loadref(opidx:longint;p:preference);
+    procedure taicpu.loadref(opidx:longint;p:preference);
       begin
       begin
         if opidx>=ops then
         if opidx>=ops then
          ops:=opidx+1;
          ops:=opidx+1;
@@ -219,7 +219,7 @@ uses
          end;
          end;
       end;
       end;
 
 
-    procedure tai386.loadreg(opidx:longint;r:tregister);
+    procedure taicpu.loadreg(opidx:longint;r:tregister);
       begin
       begin
         if opidx>=ops then
         if opidx>=ops then
          ops:=opidx+1;
          ops:=opidx+1;
@@ -232,7 +232,7 @@ uses
          end;
          end;
       end;
       end;
 
 
-    procedure tai386.loadoper(opidx:longint;o:toper);
+    procedure taicpu.loadoper(opidx:longint;o:toper);
       begin
       begin
         if opidx>=ops then
         if opidx>=ops then
          ops:=opidx+1;
          ops:=opidx+1;
@@ -245,13 +245,13 @@ uses
       end;
       end;
 
 
 
 
-    procedure tai386.changeopsize(siz:topsize);
+    procedure taicpu.changeopsize(siz:topsize);
       begin
       begin
         opsize:=siz;
         opsize:=siz;
       end;
       end;
 
 
 
 
-    procedure tai386.init(op : tasmop;_size : topsize);
+    procedure taicpu.init(op : tasmop;_size : topsize);
       begin
       begin
          typ:=ait_instruction;
          typ:=ait_instruction;
          is_jmp:=false;
          is_jmp:=false;
@@ -268,14 +268,14 @@ uses
 {$endif}
 {$endif}
       end;
       end;
 
 
-    constructor tai386.op_none(op : tasmop;_size : topsize);
+    constructor taicpu.op_none(op : tasmop;_size : topsize);
       begin
       begin
          inherited init;
          inherited init;
          init(op,_size);
          init(op,_size);
       end;
       end;
 
 
 
 
-    constructor tai386.op_reg(op : tasmop;_size : topsize;_op1 : tregister);
+    constructor taicpu.op_reg(op : tasmop;_size : topsize;_op1 : tregister);
       begin
       begin
          inherited init;
          inherited init;
          init(op,_size);
          init(op,_size);
@@ -284,7 +284,7 @@ uses
       end;
       end;
 
 
 
 
-    constructor tai386.op_const(op : tasmop;_size : topsize;_op1 : longint);
+    constructor taicpu.op_const(op : tasmop;_size : topsize;_op1 : longint);
       begin
       begin
          inherited init;
          inherited init;
          init(op,_size);
          init(op,_size);
@@ -293,7 +293,7 @@ uses
       end;
       end;
 
 
 
 
-    constructor tai386.op_ref(op : tasmop;_size : topsize;_op1 : preference);
+    constructor taicpu.op_ref(op : tasmop;_size : topsize;_op1 : preference);
       begin
       begin
          inherited init;
          inherited init;
          init(op,_size);
          init(op,_size);
@@ -302,7 +302,7 @@ uses
       end;
       end;
 
 
 
 
-    constructor tai386.op_reg_reg(op : tasmop;_size : topsize;_op1,_op2 : tregister);
+    constructor taicpu.op_reg_reg(op : tasmop;_size : topsize;_op1,_op2 : tregister);
       begin
       begin
          inherited init;
          inherited init;
          init(op,_size);
          init(op,_size);
@@ -312,7 +312,7 @@ uses
       end;
       end;
 
 
 
 
-    constructor tai386.op_reg_const(op:tasmop; _size: topsize; _op1: tregister; _op2: longint);
+    constructor taicpu.op_reg_const(op:tasmop; _size: topsize; _op1: tregister; _op2: longint);
       begin
       begin
          inherited init;
          inherited init;
          init(op,_size);
          init(op,_size);
@@ -322,7 +322,7 @@ uses
       end;
       end;
 
 
 
 
-    constructor tai386.op_reg_ref(op : tasmop;_size : topsize;_op1 : tregister;_op2 : preference);
+    constructor taicpu.op_reg_ref(op : tasmop;_size : topsize;_op1 : tregister;_op2 : preference);
       begin
       begin
          inherited init;
          inherited init;
          init(op,_size);
          init(op,_size);
@@ -332,7 +332,7 @@ uses
       end;
       end;
 
 
 
 
-    constructor tai386.op_const_reg(op : tasmop;_size : topsize;_op1 : longint;_op2 : tregister);
+    constructor taicpu.op_const_reg(op : tasmop;_size : topsize;_op1 : longint;_op2 : tregister);
       begin
       begin
          inherited init;
          inherited init;
          init(op,_size);
          init(op,_size);
@@ -342,7 +342,7 @@ uses
       end;
       end;
 
 
 
 
-    constructor tai386.op_const_const(op : tasmop;_size : topsize;_op1,_op2 : longint);
+    constructor taicpu.op_const_const(op : tasmop;_size : topsize;_op1,_op2 : longint);
       begin
       begin
          inherited init;
          inherited init;
          init(op,_size);
          init(op,_size);
@@ -352,7 +352,7 @@ uses
       end;
       end;
 
 
 
 
-    constructor tai386.op_const_ref(op : tasmop;_size : topsize;_op1 : longint;_op2 : preference);
+    constructor taicpu.op_const_ref(op : tasmop;_size : topsize;_op1 : longint;_op2 : preference);
       begin
       begin
          inherited init;
          inherited init;
          init(op,_size);
          init(op,_size);
@@ -361,7 +361,7 @@ uses
          loadref(1,_op2);
          loadref(1,_op2);
       end;
       end;
 
 
-    constructor tai386.op_ref_reg(op : tasmop;_size : topsize;_op1 : preference;_op2 : tregister);
+    constructor taicpu.op_ref_reg(op : tasmop;_size : topsize;_op1 : preference;_op2 : tregister);
       begin
       begin
          inherited init;
          inherited init;
          init(op,_size);
          init(op,_size);
@@ -371,7 +371,7 @@ uses
       end;
       end;
 
 
 
 
-    constructor tai386.op_ref_ref(op : tasmop;_size : topsize;_op1,_op2 : preference);
+    constructor taicpu.op_ref_ref(op : tasmop;_size : topsize;_op1,_op2 : preference);
       begin
       begin
          inherited init;
          inherited init;
          init(op,_size);
          init(op,_size);
@@ -381,7 +381,7 @@ uses
       end;
       end;
 
 
 
 
-    constructor tai386.op_reg_reg_reg(op : tasmop;_size : topsize;_op1,_op2,_op3 : tregister);
+    constructor taicpu.op_reg_reg_reg(op : tasmop;_size : topsize;_op1,_op2,_op3 : tregister);
       begin
       begin
          inherited init;
          inherited init;
          init(op,_size);
          init(op,_size);
@@ -391,7 +391,7 @@ uses
          loadreg(2,_op3);
          loadreg(2,_op3);
       end;
       end;
 
 
-    constructor tai386.op_const_reg_reg(op : tasmop;_size : topsize;_op1 : longint;_op2 : tregister;_op3 : tregister);
+    constructor taicpu.op_const_reg_reg(op : tasmop;_size : topsize;_op1 : longint;_op2 : tregister;_op3 : tregister);
       begin
       begin
          inherited init;
          inherited init;
          init(op,_size);
          init(op,_size);
@@ -401,7 +401,7 @@ uses
          loadreg(2,_op3);
          loadreg(2,_op3);
       end;
       end;
 
 
-     constructor tai386.op_reg_reg_ref(op : tasmop;_size : topsize;_op1,_op2 : tregister;_op3 : preference);
+     constructor taicpu.op_reg_reg_ref(op : tasmop;_size : topsize;_op1,_op2 : tregister;_op3 : preference);
       begin
       begin
          inherited init;
          inherited init;
          init(op,_size);
          init(op,_size);
@@ -411,7 +411,7 @@ uses
          loadref(2,_op3);
          loadref(2,_op3);
       end;
       end;
 
 
-     constructor tai386.op_const_ref_reg(op : tasmop;_size : topsize;_op1 : longint;_op2 : preference;_op3 : tregister);
+     constructor taicpu.op_const_ref_reg(op : tasmop;_size : topsize;_op1 : longint;_op2 : preference;_op3 : tregister);
       begin
       begin
          inherited init;
          inherited init;
          init(op,_size);
          init(op,_size);
@@ -421,7 +421,7 @@ uses
          loadreg(2,_op3);
          loadreg(2,_op3);
       end;
       end;
 
 
-     constructor tai386.op_const_reg_ref(op : tasmop;_size : topsize;_op1 : longint;_op2 : tregister;_op3 : preference);
+     constructor taicpu.op_const_reg_ref(op : tasmop;_size : topsize;_op1 : longint;_op2 : tregister;_op3 : preference);
       begin
       begin
          inherited init;
          inherited init;
          init(op,_size);
          init(op,_size);
@@ -432,7 +432,7 @@ uses
       end;
       end;
 
 
 
 
-    constructor tai386.op_cond_sym(op : tasmop;cond:TAsmCond;_size : topsize;_op1 : pasmsymbol);
+    constructor taicpu.op_cond_sym(op : tasmop;cond:TAsmCond;_size : topsize;_op1 : pasmsymbol);
       begin
       begin
          inherited init;
          inherited init;
          init(op,_size);
          init(op,_size);
@@ -442,7 +442,7 @@ uses
       end;
       end;
 
 
 
 
-    constructor tai386.op_sym(op : tasmop;_size : topsize;_op1 : pasmsymbol);
+    constructor taicpu.op_sym(op : tasmop;_size : topsize;_op1 : pasmsymbol);
       begin
       begin
          inherited init;
          inherited init;
          init(op,_size);
          init(op,_size);
@@ -451,7 +451,7 @@ uses
       end;
       end;
 
 
 
 
-    constructor tai386.op_sym_ofs(op : tasmop;_size : topsize;_op1 : pasmsymbol;_op1ofs:longint);
+    constructor taicpu.op_sym_ofs(op : tasmop;_size : topsize;_op1 : pasmsymbol;_op1ofs:longint);
       begin
       begin
          inherited init;
          inherited init;
          init(op,_size);
          init(op,_size);
@@ -460,7 +460,7 @@ uses
       end;
       end;
 
 
 
 
-    constructor tai386.op_sym_ofs_reg(op : tasmop;_size : topsize;_op1 : pasmsymbol;_op1ofs:longint;_op2 : tregister);
+    constructor taicpu.op_sym_ofs_reg(op : tasmop;_size : topsize;_op1 : pasmsymbol;_op1ofs:longint;_op2 : tregister);
       begin
       begin
          inherited init;
          inherited init;
          init(op,_size);
          init(op,_size);
@@ -470,7 +470,7 @@ uses
       end;
       end;
 
 
 
 
-    constructor tai386.op_sym_ofs_ref(op : tasmop;_size : topsize;_op1 : pasmsymbol;_op1ofs:longint;_op2 : preference);
+    constructor taicpu.op_sym_ofs_ref(op : tasmop;_size : topsize;_op1 : pasmsymbol;_op1ofs:longint;_op2 : preference);
       begin
       begin
          inherited init;
          inherited init;
          init(op,_size);
          init(op,_size);
@@ -479,7 +479,7 @@ uses
          loadref(1,_op2);
          loadref(1,_op2);
       end;
       end;
 
 
-    destructor tai386.done;
+    destructor taicpu.done;
       var
       var
         i : longint;
         i : longint;
       begin
       begin
@@ -494,7 +494,7 @@ uses
         inherited done;
         inherited done;
       end;
       end;
 
 
-    function tai386.getcopy:plinkedlist_item;
+    function taicpu.getcopy:plinkedlist_item;
       var
       var
         i : longint;
         i : longint;
         p : plinkedlist_item;
         p : plinkedlist_item;
@@ -502,22 +502,22 @@ uses
         p:=inherited getcopy;
         p:=inherited getcopy;
         { make a copy of the references }
         { make a copy of the references }
         for i:=1 to ops do
         for i:=1 to ops do
-         if (pai386(p)^.oper[i-1].typ=top_ref) then
+         if (paicpu(p)^.oper[i-1].typ=top_ref) then
           begin
           begin
-            new(pai386(p)^.oper[i-1].ref);
-            pai386(p)^.oper[i-1].ref^:=oper[i-1].ref^;
+            new(paicpu(p)^.oper[i-1].ref);
+            paicpu(p)^.oper[i-1].ref^:=oper[i-1].ref^;
           end;
           end;
         getcopy:=p;
         getcopy:=p;
       end;
       end;
 
 
 
 
-    procedure tai386.SetCondition(c:TAsmCond);
+    procedure taicpu.SetCondition(c:TAsmCond);
       begin
       begin
          condition:=c;
          condition:=c;
       end;
       end;
 
 
 
 
-    function tai386.GetString:string;
+    function taicpu.GetString:string;
 {$ifdef ASMDEBUG}
 {$ifdef ASMDEBUG}
       var
       var
         i : longint;
         i : longint;
@@ -565,7 +565,7 @@ uses
       end;
       end;
 
 
 
 
-procedure tai386.SwapOperands;
+procedure taicpu.SwapOperands;
 var
 var
   p : TOper;
   p : TOper;
 begin
 begin
@@ -602,7 +602,7 @@ type
     sib   : byte;
     sib   : byte;
   end;
   end;
 
 
-procedure tai386.create_ot;
+procedure taicpu.create_ot;
 {
 {
   this function will also fix some other fields which only needs to be once
   this function will also fix some other fields which only needs to be once
 }
 }
@@ -664,13 +664,13 @@ begin
 end;
 end;
 
 
 
 
-function tai386.InsEnd:longint;
+function taicpu.InsEnd:longint;
 begin
 begin
   InsEnd:=InsOffset+InsSize;
   InsEnd:=InsOffset+InsSize;
 end;
 end;
 
 
 
 
-function tai386.Matches(p:PInsEntry):longint;
+function taicpu.Matches(p:PInsEntry):longint;
 { * IF_SM stands for Size Match: any operand whose size is not
 { * IF_SM stands for Size Match: any operand whose size is not
  * explicitly specified by the template is `really' intended to be
  * explicitly specified by the template is `really' intended to be
  * the same size as the first size-specified operand.
  * the same size as the first size-specified operand.
@@ -767,7 +767,7 @@ begin
 end;
 end;
 
 
 
 
-function tai386.Pass1(offset:longint):longint;
+function taicpu.Pass1(offset:longint):longint;
 var
 var
   m,i,size_prob : longint;
   m,i,size_prob : longint;
 begin
 begin
@@ -839,7 +839,7 @@ begin
 end;
 end;
 
 
 
 
-procedure tai386.Pass2;
+procedure taicpu.Pass2;
 var
 var
   c : longint;
   c : longint;
 begin
 begin
@@ -867,7 +867,7 @@ begin
 end;
 end;
 
 
 
 
-function tai386.NeedAddrPrefix(opidx:byte):boolean;
+function taicpu.NeedAddrPrefix(opidx:byte):boolean;
 var
 var
   i,b : tregister;
   i,b : tregister;
 begin
 begin
@@ -1066,7 +1066,7 @@ begin
 end;
 end;
 
 
 
 
-function tai386.calcsize(p:PInsEntry):longint;
+function taicpu.calcsize(p:PInsEntry):longint;
 var
 var
   codes : pchar;
   codes : pchar;
   c     : byte;
   c     : byte;
@@ -1145,7 +1145,7 @@ begin
 end;
 end;
 
 
 
 
-procedure tai386.GenCode;
+procedure taicpu.GenCode;
 {
 {
  * the actual codes (C syntax, i.e. octal):
  * the actual codes (C syntax, i.e. octal):
  * \0            - terminates the code. (Unless it's a literal of course.)
  * \0            - terminates the code. (Unless it's a literal of course.)
@@ -1496,7 +1496,10 @@ end;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.2  1999-08-12 14:36:01  peter
+  Revision 1.3  1999-08-25 11:59:57  jonas
+    * changed pai386, paippc and paiapha (same for tai*) to paicpu (taicpu)
+
+  Revision 1.2  1999/08/12 14:36:01  peter
     + KNI instructions
     + KNI instructions
 
 
   Revision 1.1  1999/08/04 00:22:57  florian
   Revision 1.1  1999/08/04 00:22:57  florian

+ 45 - 42
compiler/csopt386.pas

@@ -106,18 +106,18 @@ Begin {CheckSequence}
 (*              If ((Found+1) = OldNrOfMods) And
 (*              If ((Found+1) = OldNrOfMods) And
               Assigned(hp2) And
               Assigned(hp2) And
               (Pai(hp2)^.typ = ait_instruction) And
               (Pai(hp2)^.typ = ait_instruction) And
-              ((Pai386(hp2)^.opcode = A_MOV) or
-               (Pai386(p1)^.opcode = A_MOVZX)) And
-              (Pai386(hp2)^.oper[0].typ = top_ref) And
-              (Pai386(hp2)^.optype[1] = top_reg) And
+              ((Paicpu(hp2)^.opcode = A_MOV) or
+               (Paicpu(p1)^.opcode = A_MOVZX)) And
+              (Paicpu(hp2)^.oper[0].typ = top_ref) And
+              (Paicpu(hp2)^.optype[1] = top_reg) And
               Assigned(hp3) And
               Assigned(hp3) And
               (Pai(hp3)^.typ = ait_instruction) And
               (Pai(hp3)^.typ = ait_instruction) And
-              ((Pai386(hp3)^.opcode = A_MOV) or
-               (Pai386(hp3)^.opcode = A_MOVZX)) And
-              (Pai386(hp3)^.oper[0].typ = top_ref) And
-              (Pai386(hp3)^.optype[1] = top_reg) And
-               (Pai386(hp2)^.opcode <> Pai386(hp3)^.opcode) And
-              RefsEquivalent(TReference(Pai386(hp2)^.oper[1]^),TReference(Pai386(hp3)^.oper[1]^), RegInfo)
+              ((Paicpu(hp3)^.opcode = A_MOV) or
+               (Paicpu(hp3)^.opcode = A_MOVZX)) And
+              (Paicpu(hp3)^.oper[0].typ = top_ref) And
+              (Paicpu(hp3)^.optype[1] = top_reg) And
+               (Paicpu(hp2)^.opcode <> Paicpu(hp3)^.opcode) And
+              RefsEquivalent(TReference(Paicpu(hp2)^.oper[1]^),TReference(Paicpu(hp3)^.oper[1]^), RegInfo)
              Then
              Then
 
 
 {hack to be able to optimize
 {hack to be able to optimize
@@ -130,17 +130,17 @@ Begin {CheckSequence}
      mov (reg), reg
      mov (reg), reg
      movzx (reg), reg [*]}
      movzx (reg), reg [*]}
 
 
-               If (Pai386(hp2)^.opcode = A_MOV)
+               If (Paicpu(hp2)^.opcode = A_MOV)
                  Then
                  Then
                    Begin
                    Begin
-                    If (Pai386(hp2)^.opsize = S_B) And
-                       RegsEquivalent(Reg8toReg32(TRegister(Pai386(hp2)^.oper[1])),
-                                      TRegister(Pai386(hp3)^.oper[1]), RegInfo)
+                    If (Paicpu(hp2)^.opsize = S_B) And
+                       RegsEquivalent(Reg8toReg32(TRegister(Paicpu(hp2)^.oper[1])),
+                                      TRegister(Paicpu(hp3)^.oper[1]), RegInfo)
                        Then
                        Then
                          Begin
                          Begin
-                           Pai386(hp2)^.opcode := A_MOVZX;
-                           Pai386(hp2)^.opsize := S_BL;
-                           Pai386(hp2)^.loadoper(1,Pai386(hp3)^.oper[1]);
+                           Paicpu(hp2)^.opcode := A_MOVZX;
+                           Paicpu(hp2)^.opsize := S_BL;
+                           Paicpu(hp2)^.loadoper(1,Paicpu(hp3)^.oper[1]);
                            Inc(Found);
                            Inc(Found);
                            TmpResult := True;
                            TmpResult := True;
                          End
                          End
@@ -153,9 +153,9 @@ Begin {CheckSequence}
                    End
                    End
                  Else
                  Else
                    Begin
                    Begin
-                     If (Pai386(hp3)^.opsize = S_B) And
-                       RegsEquivalent(TRegister(Pai386(hp2)^.oper[1]),
-                                      Reg8toReg32(TRegister(Pai386(hp3)^.oper[1])),
+                     If (Paicpu(hp3)^.opsize = S_B) And
+                       RegsEquivalent(TRegister(Paicpu(hp2)^.oper[1]),
+                                      Reg8toReg32(TRegister(Paicpu(hp3)^.oper[1])),
                                       RegInfo)
                                       RegInfo)
                        Then
                        Then
                          Begin
                          Begin
@@ -245,28 +245,28 @@ Begin
       Case p^.typ Of
       Case p^.typ Of
         ait_instruction:
         ait_instruction:
           Begin
           Begin
-            Case Pai386(p)^.opcode Of
+            Case Paicpu(p)^.opcode Of
               A_CLD: If GetLastInstruction(p, hp1) And
               A_CLD: If GetLastInstruction(p, hp1) And
                         (PPaiProp(hp1^.OptInfo)^.DirFlag = F_NotSet) Then
                         (PPaiProp(hp1^.OptInfo)^.DirFlag = F_NotSet) Then
                        PPaiProp(Pai(p)^.OptInfo)^.CanBeRemoved := True;
                        PPaiProp(Pai(p)^.OptInfo)^.CanBeRemoved := True;
               A_MOV, A_MOVZX, A_MOVSX:
               A_MOV, A_MOVZX, A_MOVSX:
                 Begin
                 Begin
-                  Case Pai386(p)^.oper[0].typ Of
+                  Case Paicpu(p)^.oper[0].typ Of
 {                    Top_Reg:
 {                    Top_Reg:
-                      Case Pai386(p)^.optype[1] Of
+                      Case Paicpu(p)^.optype[1] Of
                         Top_Reg:;
                         Top_Reg:;
                         Top_Ref:;
                         Top_Ref:;
                       End;}
                       End;}
                     Top_Ref:
                     Top_Ref:
                       Begin {destination is always a register in this case}
                       Begin {destination is always a register in this case}
-                        With PPaiProp(p^.OptInfo)^.Regs[Reg32(Pai386(p)^.oper[1].reg)] Do
+                        With PPaiProp(p^.OptInfo)^.Regs[Reg32(Paicpu(p)^.oper[1].reg)] Do
                           Begin
                           Begin
                             If (p = StartMod) And
                             If (p = StartMod) And
                                GetLastInstruction (p, hp1) And
                                GetLastInstruction (p, hp1) And
                                (hp1^.typ <> ait_marker)
                                (hp1^.typ <> ait_marker)
                               Then
                               Then
 {so we don't try to check a sequence when p is the first instruction of the block}
 {so we don't try to check a sequence when p is the first instruction of the block}
-                               If CheckSequence(p, Pai386(p)^.oper[1].reg, Cnt, RegInfo) And
+                               If CheckSequence(p, Paicpu(p)^.oper[1].reg, Cnt, RegInfo) And
                                   (Cnt > 0)
                                   (Cnt > 0)
                                  Then
                                  Then
                                    Begin
                                    Begin
@@ -291,12 +291,12 @@ Begin
                                      While Cnt2 <= Cnt Do
                                      While Cnt2 <= Cnt Do
                                        Begin
                                        Begin
                                          If (hp1 = nil) And
                                          If (hp1 = nil) And
-                                            Not(RegInInstruction(Pai386(hp2)^.oper[1].reg, p) Or
-                                                RegInInstruction(Reg32(Pai386(hp2)^.oper[1].reg), p)) And
+                                            Not(RegInInstruction(Paicpu(hp2)^.oper[1].reg, p) Or
+                                                RegInInstruction(Reg32(Paicpu(hp2)^.oper[1].reg), p)) And
                                             Not((p^.typ = ait_instruction) And
                                             Not((p^.typ = ait_instruction) And
-                                                (pai386(p)^.OpCode = A_MOV) And
-                                                (pai386(p)^.Oper[0].typ = top_ref) And
-                                                (PPaiProp(p^.OptInfo)^.Regs[Reg32(pai386(p)^.Oper[1].reg)].NrOfMods
+                                                (paicpu(p)^.OpCode = A_MOV) And
+                                                (paicpu(p)^.Oper[0].typ = top_ref) And
+                                                (PPaiProp(p^.OptInfo)^.Regs[Reg32(paicpu(p)^.Oper[1].reg)].NrOfMods
                                                    <= (Cnt - Cnt2 + 1)))
                                                    <= (Cnt - Cnt2 + 1)))
                                            Then hp1 := p;
                                            Then hp1 := p;
 {$ifndef noremove}
 {$ifndef noremove}
@@ -345,7 +345,7 @@ Begin
                                               (RegInfo.New2OldReg[RegCounter] <> RegCounter) Then
                                               (RegInfo.New2OldReg[RegCounter] <> RegCounter) Then
 
 
                                              Begin
                                              Begin
-                                               hp3 := New(Pai386,Op_Reg_Reg(A_MOV, S_L,
+                                               hp3 := New(Paicpu,Op_Reg_Reg(A_MOV, S_L,
                                                                     {old reg          new reg}
                                                                     {old reg          new reg}
                                                       RegInfo.New2OldReg[RegCounter], RegCounter));
                                                       RegInfo.New2OldReg[RegCounter], RegCounter));
                                                hp3^.fileinfo := hp2^.fileinfo;
                                                hp3^.fileinfo := hp2^.fileinfo;
@@ -447,15 +447,15 @@ Begin
                                  Else
                                  Else
                                    If (Cnt > 0) And
                                    If (Cnt > 0) And
                                       (PPaiProp(p^.OptInfo)^.
                                       (PPaiProp(p^.OptInfo)^.
-                                        Regs[Reg32(Pai386(p)^.oper[1].reg)].Typ = Con_Ref) And
+                                        Regs[Reg32(Paicpu(p)^.oper[1].reg)].Typ = Con_Ref) And
                                       (PPaiProp(p^.OptInfo)^.CanBeRemoved) Then
                                       (PPaiProp(p^.OptInfo)^.CanBeRemoved) Then
                                      Begin
                                      Begin
                                        hp2 := p;
                                        hp2 := p;
                                        Cnt2 := 1;
                                        Cnt2 := 1;
                                        While Cnt2 <= Cnt Do
                                        While Cnt2 <= Cnt Do
                                          Begin
                                          Begin
-                                           If RegInInstruction(Pai386(hp2)^.oper[1].reg, p) Or
-                                              RegInInstruction(Reg32(Pai386(hp2)^.oper[1].reg), p) Then
+                                           If RegInInstruction(Paicpu(hp2)^.oper[1].reg, p) Or
+                                              RegInInstruction(Reg32(Paicpu(hp2)^.oper[1].reg), p) Then
                                              PPaiProp(p^.OptInfo)^.CanBeRemoved := False;
                                              PPaiProp(p^.OptInfo)^.CanBeRemoved := False;
                                            Inc(Cnt2);
                                            Inc(Cnt2);
                                            GetNextInstruction(p, p);
                                            GetNextInstruction(p, p);
@@ -466,11 +466,11 @@ Begin
                       End;
                       End;
                     Top_Const:
                     Top_Const:
                       Begin
                       Begin
-                        Case Pai386(p)^.oper[1].typ Of
+                        Case Paicpu(p)^.oper[1].typ Of
                           Top_Reg:
                           Top_Reg:
                             Begin
                             Begin
                               If GetLastInstruction(p, hp1) Then
                               If GetLastInstruction(p, hp1) Then
-                                With PPaiProp(hp1^.OptInfo)^.Regs[Reg32(Pai386(p)^.oper[1].reg)] Do
+                                With PPaiProp(hp1^.OptInfo)^.Regs[Reg32(Paicpu(p)^.oper[1].reg)] Do
                                   If (Typ = Con_Const) And
                                   If (Typ = Con_Const) And
                                      (StartMod = p) Then
                                      (StartMod = p) Then
                                     PPaiProp(p^.OptInfo)^.CanBeRemoved := True;
                                     PPaiProp(p^.OptInfo)^.CanBeRemoved := True;
@@ -485,12 +485,12 @@ Begin
                         PPaiProp(Pai(p)^.OptInfo)^.CanBeRemoved := True;
                         PPaiProp(Pai(p)^.OptInfo)^.CanBeRemoved := True;
               A_XOR:
               A_XOR:
                 Begin
                 Begin
-                  If (Pai386(p)^.oper[0].typ = top_reg) And
-                     (Pai386(p)^.oper[0].typ = top_reg) And
-                     (Pai386(p)^.oper[1].reg = Pai386(p)^.oper[1].reg) And
+                  If (Paicpu(p)^.oper[0].typ = top_reg) And
+                     (Paicpu(p)^.oper[0].typ = top_reg) And
+                     (Paicpu(p)^.oper[1].reg = Paicpu(p)^.oper[1].reg) And
                      GetLastInstruction(p, hp1) And
                      GetLastInstruction(p, hp1) And
-                     (PPaiProp(hp1^.OptInfo)^.Regs[Reg32(Pai386(p)^.oper[1].reg)].typ = con_const) And
-                     (PPaiProp(hp1^.OptInfo)^.Regs[Reg32(Pai386(p)^.oper[1].reg)].StartMod = nil)
+                     (PPaiProp(hp1^.OptInfo)^.Regs[Reg32(Paicpu(p)^.oper[1].reg)].typ = con_const) And
+                     (PPaiProp(hp1^.OptInfo)^.Regs[Reg32(Paicpu(p)^.oper[1].reg)].StartMod = nil)
                     Then PPaiProp(p^.OptInfo)^.CanBeRemoved := True
                     Then PPaiProp(p^.OptInfo)^.CanBeRemoved := True
                 End
                 End
             End
             End
@@ -553,7 +553,10 @@ End.
 
 
 {
 {
  $Log$
  $Log$
- Revision 1.23  1999-08-04 00:22:58  florian
+ Revision 1.24  1999-08-25 11:59:58  jonas
+   * changed pai386, paippc and paiapha (same for tai*) to paicpu (taicpu)
+
+ Revision 1.23  1999/08/04 00:22:58  florian
    * renamed i386asm and i386base to cpuasm and cpubase
    * renamed i386asm and i386base to cpuasm and cpubase
 
 
  Revision 1.22  1999/06/03 15:45:08  jonas
  Revision 1.22  1999/06/03 15:45:08  jonas

+ 137 - 134
compiler/daopt386.pas

@@ -1085,9 +1085,9 @@ Begin
       Reg := Reg32(Reg);
       Reg := Reg32(Reg);
       Counter := 0;
       Counter := 0;
       Repeat
       Repeat
-        Case Pai386(p1)^.oper[Counter].typ Of
-          Top_Reg: TmpResult := Reg = Reg32(Pai386(p1)^.oper[Counter].reg);
-          Top_Ref: TmpResult := RegInRef(Reg, Pai386(p1)^.oper[Counter].ref^);
+        Case Paicpu(p1)^.oper[Counter].typ Of
+          Top_Reg: TmpResult := Reg = Reg32(Paicpu(p1)^.oper[Counter].reg);
+          Top_Ref: TmpResult := RegInRef(Reg, Paicpu(p1)^.oper[Counter].ref^);
         End;
         End;
         Inc(Counter)
         Inc(Counter)
       Until (Counter = 3) or TmpResult;
       Until (Counter = 3) or TmpResult;
@@ -1308,19 +1308,19 @@ Begin
         (Counter <= Content.NrOfMods) Do
         (Counter <= Content.NrOfMods) Do
     Begin
     Begin
       If (p^.typ = ait_instruction) and
       If (p^.typ = ait_instruction) and
-         ((Pai386(p)^.opcode = A_MOV) or
-          (Pai386(p)^.opcode = A_MOVZX) or
-          (Pai386(p)^.opcode = A_MOVSX))
+         ((Paicpu(p)^.opcode = A_MOV) or
+          (Paicpu(p)^.opcode = A_MOVZX) or
+          (Paicpu(p)^.opcode = A_MOVSX))
         Then
         Then
           Begin
           Begin
-            If (Pai386(p)^.oper[0].typ = top_ref) Then
-              With Pai386(p)^.oper[0].ref^ Do
+            If (Paicpu(p)^.oper[0].typ = top_ref) Then
+              With Paicpu(p)^.oper[0].ref^ Do
                 If (Base = ProcInfo.FramePointer) And
                 If (Base = ProcInfo.FramePointer) And
                    (Index = R_NO)
                    (Index = R_NO)
                   Then
                   Then
                     Begin
                     Begin
-                      RegsChecked := RegsChecked + [Reg32(Pai386(p)^.oper[1].reg)];
-                      If Reg = Reg32(Pai386(p)^.oper[1].reg) Then
+                      RegsChecked := RegsChecked + [Reg32(Paicpu(p)^.oper[1].reg)];
+                      If Reg = Reg32(Paicpu(p)^.oper[1].reg) Then
                         Break;
                         Break;
                     End
                     End
                   Else
                   Else
@@ -1381,12 +1381,12 @@ End;
 Begin
 Begin
   If (p^.typ = ait_instruction) Then
   If (p^.typ = ait_instruction) Then
     Begin
     Begin
-      Case Pai386(p)^.oper[0].typ Of
+      Case Paicpu(p)^.oper[0].typ Of
         top_reg:
         top_reg:
-          If Not(Pai386(p)^.oper[0].reg in [R_NO,R_ESP,ProcInfo.FramePointer]) Then
-            RegSet := RegSet + [Pai386(p)^.oper[0].reg];
+          If Not(Paicpu(p)^.oper[0].reg in [R_NO,R_ESP,ProcInfo.FramePointer]) Then
+            RegSet := RegSet + [Paicpu(p)^.oper[0].reg];
         top_ref:
         top_ref:
-          With TReference(Pai386(p)^.oper[0]^) Do
+          With TReference(Paicpu(p)^.oper[0]^) Do
             Begin
             Begin
               If Not(Base in [ProcInfo.FramePointer,R_NO,R_ESP])
               If Not(Base in [ProcInfo.FramePointer,R_NO,R_ESP])
                 Then RegSet := RegSet + [Base];
                 Then RegSet := RegSet + [Base];
@@ -1394,12 +1394,12 @@ Begin
                 Then RegSet := RegSet + [Index];
                 Then RegSet := RegSet + [Index];
             End;
             End;
       End;
       End;
-      Case Pai386(p)^.oper[1].typ Of
+      Case Paicpu(p)^.oper[1].typ Of
         top_reg:
         top_reg:
-          If Not(Pai386(p)^.oper[1].reg in [R_NO,R_ESP,ProcInfo.FramePointer]) Then
-            If RegSet := RegSet + [TRegister(TwoWords(Pai386(p)^.oper[1]).Word1];
+          If Not(Paicpu(p)^.oper[1].reg in [R_NO,R_ESP,ProcInfo.FramePointer]) Then
+            If RegSet := RegSet + [TRegister(TwoWords(Paicpu(p)^.oper[1]).Word1];
         top_ref:
         top_ref:
-          With TReference(Pai386(p)^.oper[1]^) Do
+          With TReference(Paicpu(p)^.oper[1]^) Do
             Begin
             Begin
               If Not(Base in [ProcInfo.FramePointer,R_NO,R_ESP])
               If Not(Base in [ProcInfo.FramePointer,R_NO,R_ESP])
                 Then RegSet := RegSet + [Base];
                 Then RegSet := RegSet + [Base];
@@ -1449,31 +1449,31 @@ Function InstructionsEquivalent(p1, p2: Pai; Var RegInfo: TRegInfo): Boolean;
 {$ifdef csdebug}
 {$ifdef csdebug}
 var hp: pai;
 var hp: pai;
 {$endif csdebug}
 {$endif csdebug}
-Begin {checks whether two Pai386 instructions are equal}
+Begin {checks whether two Paicpu instructions are equal}
   If Assigned(p1) And Assigned(p2) And
   If Assigned(p1) And Assigned(p2) And
      (Pai(p1)^.typ = ait_instruction) And
      (Pai(p1)^.typ = ait_instruction) And
      (Pai(p1)^.typ = ait_instruction) And
      (Pai(p1)^.typ = ait_instruction) And
-     (Pai386(p1)^.opcode = Pai386(p2)^.opcode) And
-     (Pai386(p1)^.oper[0].typ = Pai386(p2)^.oper[0].typ) And
-     (Pai386(p1)^.oper[1].typ = Pai386(p2)^.oper[1].typ) And
-     (Pai386(p1)^.oper[2].typ = Pai386(p2)^.oper[2].typ)
+     (Paicpu(p1)^.opcode = Paicpu(p2)^.opcode) And
+     (Paicpu(p1)^.oper[0].typ = Paicpu(p2)^.oper[0].typ) And
+     (Paicpu(p1)^.oper[1].typ = Paicpu(p2)^.oper[1].typ) And
+     (Paicpu(p1)^.oper[2].typ = Paicpu(p2)^.oper[2].typ)
     Then
     Then
  {both instructions have the same structure:
  {both instructions have the same structure:
   "<operator> <operand of type1>, <operand of type 2>"}
   "<operator> <operand of type1>, <operand of type 2>"}
-      If ((Pai386(p1)^.opcode = A_MOV) or
-          (Pai386(p1)^.opcode = A_MOVZX) or
-          (Pai386(p1)^.opcode = A_MOVSX)) And
-         (Pai386(p1)^.oper[0].typ = top_ref) {then .oper[1]t = top_reg} Then
-        If Not(RegInRef(Pai386(p1)^.oper[1].reg, Pai386(p1)^.oper[0].ref^)) Then
+      If ((Paicpu(p1)^.opcode = A_MOV) or
+          (Paicpu(p1)^.opcode = A_MOVZX) or
+          (Paicpu(p1)^.opcode = A_MOVSX)) And
+         (Paicpu(p1)^.oper[0].typ = top_ref) {then .oper[1]t = top_reg} Then
+        If Not(RegInRef(Paicpu(p1)^.oper[1].reg, Paicpu(p1)^.oper[0].ref^)) Then
  {the "old" instruction is a load of a register with a new value, not with
  {the "old" instruction is a load of a register with a new value, not with
   a value based on the contents of this register (so no "mov (reg), reg")}
   a value based on the contents of this register (so no "mov (reg), reg")}
-          If Not(RegInRef(Pai386(p2)^.oper[1].reg, Pai386(p2)^.oper[0].ref^)) And
-             RefsEqual(Pai386(p1)^.oper[0].ref^, Pai386(p2)^.oper[0].ref^)
+          If Not(RegInRef(Paicpu(p2)^.oper[1].reg, Paicpu(p2)^.oper[0].ref^)) And
+             RefsEqual(Paicpu(p1)^.oper[0].ref^, Paicpu(p2)^.oper[0].ref^)
             Then
             Then
  {the "new" instruction is also a load of a register with a new value, and
  {the "new" instruction is also a load of a register with a new value, and
   this value is fetched from the same memory location}
   this value is fetched from the same memory location}
               Begin
               Begin
-                With Pai386(p2)^.oper[0].ref^ Do
+                With Paicpu(p2)^.oper[0].ref^ Do
                   Begin
                   Begin
                     If Not(Base in [ProcInfo.FramePointer, R_NO, R_ESP])
                     If Not(Base in [ProcInfo.FramePointer, R_NO, R_ESP])
        {it won't do any harm if the register is already in RegsLoadedForRef}
        {it won't do any harm if the register is already in RegsLoadedForRef}
@@ -1484,10 +1484,10 @@ Begin {checks whether two Pai386 instructions are equal}
  {add the registers from the reference (.oper[0]) to the RegInfo, all registers
  {add the registers from the reference (.oper[0]) to the RegInfo, all registers
   from the reference are the same in the old and in the new instruction
   from the reference are the same in the old and in the new instruction
   sequence}
   sequence}
-                AddOp2RegInfo(Pai386(p1)^.oper[0], RegInfo);
+                AddOp2RegInfo(Paicpu(p1)^.oper[0], RegInfo);
  {the registers from .oper[1] have to be equivalent, but not necessarily equal}
  {the registers from .oper[1] have to be equivalent, but not necessarily equal}
                 InstructionsEquivalent :=
                 InstructionsEquivalent :=
-                  RegsEquivalent(Pai386(p1)^.oper[1].reg, Pai386(p2)^.oper[1].reg, RegInfo, OpAct_Write);
+                  RegsEquivalent(Paicpu(p1)^.oper[1].reg, Paicpu(p2)^.oper[1].reg, RegInfo, OpAct_Write);
               End
               End
  {the registers are loaded with values from different memory locations. If
  {the registers are loaded with values from different memory locations. If
   this was allowed, the instructions "mov -4(esi),eax" and "mov -4(ebp),eax"
   this was allowed, the instructions "mov -4(esi),eax" and "mov -4(ebp),eax"
@@ -1496,10 +1496,10 @@ Begin {checks whether two Pai386 instructions are equal}
         Else
         Else
  {load register with a value based on the current value of this register}
  {load register with a value based on the current value of this register}
           Begin
           Begin
-            With Pai386(p2)^.oper[0].ref^ Do
+            With Paicpu(p2)^.oper[0].ref^ Do
               Begin
               Begin
                 If Not(Base in [ProcInfo.FramePointer,
                 If Not(Base in [ProcInfo.FramePointer,
-                                Reg32(Pai386(p2)^.oper[1].reg),R_NO,R_ESP])
+                                Reg32(Paicpu(p2)^.oper[1].reg),R_NO,R_ESP])
  {it won't do any harm if the register is already in RegsLoadedForRef}
  {it won't do any harm if the register is already in RegsLoadedForRef}
                   Then
                   Then
                     Begin
                     Begin
@@ -1509,7 +1509,7 @@ Begin {checks whether two Pai386 instructions are equal}
 {$endif csdebug}
 {$endif csdebug}
                     end;
                     end;
                 If Not(Index in [ProcInfo.FramePointer,
                 If Not(Index in [ProcInfo.FramePointer,
-                                 Reg32(Pai386(p2)^.oper[1].reg),R_NO,R_ESP])
+                                 Reg32(Paicpu(p2)^.oper[1].reg),R_NO,R_ESP])
                   Then
                   Then
                     Begin
                     Begin
                       RegInfo.RegsLoadedForRef := RegInfo.RegsLoadedForRef + [Index];
                       RegInfo.RegsLoadedForRef := RegInfo.RegsLoadedForRef + [Index];
@@ -1519,18 +1519,18 @@ Begin {checks whether two Pai386 instructions are equal}
                     end;
                     end;
 
 
               End;
               End;
-            If Not(Reg32(Pai386(p2)^.oper[1].reg) In [ProcInfo.FramePointer,R_NO,R_ESP])
+            If Not(Reg32(Paicpu(p2)^.oper[1].reg) In [ProcInfo.FramePointer,R_NO,R_ESP])
               Then
               Then
                 Begin
                 Begin
                   RegInfo.RegsLoadedForRef := RegInfo.RegsLoadedForRef -
                   RegInfo.RegsLoadedForRef := RegInfo.RegsLoadedForRef -
-                                                 [Reg32(Pai386(p2)^.oper[1].reg)];
+                                                 [Reg32(Paicpu(p2)^.oper[1].reg)];
 {$ifdef csdebug}
 {$ifdef csdebug}
-                  Writeln(att_reg2str[Reg32(Pai386(p2)^.oper[1].reg)], ' removed');
+                  Writeln(att_reg2str[Reg32(Paicpu(p2)^.oper[1].reg)], ' removed');
 {$endif csdebug}
 {$endif csdebug}
                 end;
                 end;
             InstructionsEquivalent :=
             InstructionsEquivalent :=
-               OpsEquivalent(Pai386(p1)^.oper[0], Pai386(p2)^.oper[0], RegInfo, OpAct_Read) And
-               OpsEquivalent(Pai386(p1)^.oper[1], Pai386(p2)^.oper[1], RegInfo, OpAct_Write)
+               OpsEquivalent(Paicpu(p1)^.oper[0], Paicpu(p2)^.oper[0], RegInfo, OpAct_Read) And
+               OpsEquivalent(Paicpu(p1)^.oper[1], Paicpu(p2)^.oper[1], RegInfo, OpAct_Write)
           End
           End
       Else
       Else
  {an instruction <> mov, movzx, movsx}
  {an instruction <> mov, movzx, movsx}
@@ -1543,9 +1543,9 @@ Begin {checks whether two Pai386 instructions are equal}
          p2^.next := hp;
          p2^.next := hp;
   {$endif csdebug}
   {$endif csdebug}
          InstructionsEquivalent :=
          InstructionsEquivalent :=
-           OpsEquivalent(Pai386(p1)^.oper[0], Pai386(p2)^.oper[0], RegInfo, OpAct_Unknown) And
-           OpsEquivalent(Pai386(p1)^.oper[1], Pai386(p2)^.oper[1], RegInfo, OpAct_Unknown) And
-           OpsEquivalent(Pai386(p1)^.oper[2], Pai386(p2)^.oper[2], RegInfo, OpAct_Unknown)
+           OpsEquivalent(Paicpu(p1)^.oper[0], Paicpu(p2)^.oper[0], RegInfo, OpAct_Unknown) And
+           OpsEquivalent(Paicpu(p1)^.oper[1], Paicpu(p2)^.oper[1], RegInfo, OpAct_Unknown) And
+           OpsEquivalent(Paicpu(p1)^.oper[2], Paicpu(p2)^.oper[2], RegInfo, OpAct_Unknown)
        end
        end
  {the instructions haven't even got the same structure, so they're certainly
  {the instructions haven't even got the same structure, so they're certainly
   not equivalent}
   not equivalent}
@@ -1571,16 +1571,16 @@ End;
 
 
 (*
 (*
 Function InstructionsEqual(p1, p2: Pai): Boolean;
 Function InstructionsEqual(p1, p2: Pai): Boolean;
-Begin {checks whether two Pai386 instructions are equal}
+Begin {checks whether two Paicpu instructions are equal}
   InstructionsEqual :=
   InstructionsEqual :=
     Assigned(p1) And Assigned(p2) And
     Assigned(p1) And Assigned(p2) And
     ((Pai(p1)^.typ = ait_instruction) And
     ((Pai(p1)^.typ = ait_instruction) And
      (Pai(p1)^.typ = ait_instruction) And
      (Pai(p1)^.typ = ait_instruction) And
-     (Pai386(p1)^.opcode = Pai386(p2)^.opcode) And
-     (Pai386(p1)^.oper[0].typ = Pai386(p2)^.oper[0].typ) And
-     (Pai386(p1)^.oper[1].typ = Pai386(p2)^.oper[1].typ) And
-     OpsEqual(Pai386(p1)^.oper[0].typ, Pai386(p1)^.oper[0], Pai386(p2)^.oper[0]) And
-     OpsEqual(Pai386(p1)^.oper[1].typ, Pai386(p1)^.oper[1], Pai386(p2)^.oper[1]))
+     (Paicpu(p1)^.opcode = Paicpu(p2)^.opcode) And
+     (Paicpu(p1)^.oper[0].typ = Paicpu(p2)^.oper[0].typ) And
+     (Paicpu(p1)^.oper[1].typ = Paicpu(p2)^.oper[1].typ) And
+     OpsEqual(Paicpu(p1)^.oper[0].typ, Paicpu(p1)^.oper[0], Paicpu(p2)^.oper[0]) And
+     OpsEqual(Paicpu(p1)^.oper[1].typ, Paicpu(p1)^.oper[1], Paicpu(p2)^.oper[1]))
 End;
 End;
 *)
 *)
 
 
@@ -1591,10 +1591,10 @@ Begin
   TmpResult := False;
   TmpResult := False;
   If (p^.typ = ait_instruction) Then
   If (p^.typ = ait_instruction) Then
     Begin
     Begin
-      If (Pai386(p)^.oper[0].typ = Top_Ref) Then
-        TmpResult := RefsEqual(Ref, Pai386(p)^.oper[0].ref^);
-      If Not(TmpResult) And (Pai386(p)^.oper[1].typ = Top_Ref) Then
-        TmpResult := RefsEqual(Ref, Pai386(p)^.oper[1].ref^);
+      If (Paicpu(p)^.oper[0].typ = Top_Ref) Then
+        TmpResult := RefsEqual(Ref, Paicpu(p)^.oper[0].ref^);
+      If Not(TmpResult) And (Paicpu(p)^.oper[1].typ = Top_Ref) Then
+        TmpResult := RefsEqual(Ref, Paicpu(p)^.oper[1].ref^);
     End;
     End;
   RefInInstruction := TmpResult;
   RefInInstruction := TmpResult;
 End;
 End;
@@ -1652,8 +1652,8 @@ Begin
                  ((Counter <> WhichReg) Or
                  ((Counter <> WhichReg) Or
                   ((NrOfMods <> 1) And
                   ((NrOfMods <> 1) And
  {StarMod is always of the type ait_instruction}
  {StarMod is always of the type ait_instruction}
-                   (Pai386(StartMod)^.oper[0].typ = top_ref) And
-                   RefsEqual(Pai386(StartMod)^.oper[0].ref^, Ref)
+                   (Paicpu(StartMod)^.oper[0].typ = top_ref) And
+                   RefsEqual(Paicpu(StartMod)^.oper[0].ref^, Ref)
                   )
                   )
                  )
                  )
                 )
                 )
@@ -1677,9 +1677,9 @@ Begin
             (Ref.Base = R_EDI) Or
             (Ref.Base = R_EDI) Or
         {don't destroy if reg contains a parameter, local or global variable}
         {don't destroy if reg contains a parameter, local or global variable}
             Not((NrOfMods = 1) And
             Not((NrOfMods = 1) And
-                (Pai386(StartMod)^.oper[0].typ = top_ref) And
-                ((Pai386(StartMod)^.oper[0].ref^.base = ProcInfo.FramePointer) Or
-                  Assigned(Pai386(StartMod)^.oper[0].ref^.Symbol)
+                (Paicpu(StartMod)^.oper[0].typ = top_ref) And
+                ((Paicpu(StartMod)^.oper[0].ref^.base = ProcInfo.FramePointer) Or
+                  Assigned(Paicpu(StartMod)^.oper[0].ref^.Symbol)
                 )
                 )
                )
                )
            )
            )
@@ -1739,7 +1739,7 @@ End;
 
 
 {$ifdef arithopt}
 {$ifdef arithopt}
 Procedure AddInstr2RegContents({$ifdef statedebug} asml: paasmoutput; {$endif}
 Procedure AddInstr2RegContents({$ifdef statedebug} asml: paasmoutput; {$endif}
-p: pai386; reg: TRegister);
+p: paicpu; reg: TRegister);
 {$ifdef statedebug}
 {$ifdef statedebug}
 var hp: pai;
 var hp: pai;
 {$endif statedebug}
 {$endif statedebug}
@@ -1773,7 +1773,7 @@ Begin
 End;
 End;
 
 
 Procedure AddInstr2OpContents({$ifdef statedebug} asml: paasmoutput; {$endif}
 Procedure AddInstr2OpContents({$ifdef statedebug} asml: paasmoutput; {$endif}
-p: pai386; const oper: TOper);
+p: paicpu; const oper: TOper);
 Begin
 Begin
   If oper.typ = top_reg Then
   If oper.typ = top_reg Then
     AddInstr2RegContents({$ifdef statedebug} asml, {$endif}p, oper.reg)
     AddInstr2RegContents({$ifdef statedebug} asml, {$endif}p, oper.reg)
@@ -1869,7 +1869,7 @@ Begin
                       Begin
                       Begin
                         If (GetLastInstruction(p, hp) And
                         If (GetLastInstruction(p, hp) And
                            Not(((hp^.typ = ait_instruction)) And
                            Not(((hp^.typ = ait_instruction)) And
-                                (pai386_labeled(hp)^.is_jmp))
+                                (paicpu_labeled(hp)^.is_jmp))
                           Then
                           Then
   {previous instruction not a JMP -> the contents of the registers after the
   {previous instruction not a JMP -> the contents of the registers after the
    previous intruction has been executed have to be taken into account as well}
    previous intruction has been executed have to be taken into account as well}
@@ -1886,7 +1886,7 @@ Begin
   already been processed}
   already been processed}
                       If GetLastInstruction(p, hp) And
                       If GetLastInstruction(p, hp) And
                          Not(hp^.typ = ait_instruction) And
                          Not(hp^.typ = ait_instruction) And
-                            (pai386_labeled(hp)^.opcode = A_JMP))
+                            (paicpu_labeled(hp)^.opcode = A_JMP))
                         Then
                         Then
   {previous instruction not a jmp, so keep all the registers' contents from the
   {previous instruction not a jmp, so keep all the registers' contents from the
    previous instruction}
    previous instruction}
@@ -1903,8 +1903,8 @@ Begin
       been processed}
       been processed}
                             While GetNextInstruction(hp, hp) And
                             While GetNextInstruction(hp, hp) And
                                   Not((hp^.typ = ait_instruction) And
                                   Not((hp^.typ = ait_instruction) And
-                                      (pai386(hp)^.is_jmp) and
-                                      (pasmlabel(pai386(hp)^.oper[0].sym)^.labelnr = Pai_Label(p)^.l^.labelnr)) And
+                                      (paicpu(hp)^.is_jmp) and
+                                      (pasmlabel(paicpu(hp)^.oper[0].sym)^.labelnr = Pai_Label(p)^.l^.labelnr)) And
                                   Not((hp^.typ = ait_label) And
                                   Not((hp^.typ = ait_label) And
                                       (LTable^[Pai_Label(hp)^.l^.labelnr-LoLab].RefsFound
                                       (LTable^[Pai_Label(hp)^.l^.labelnr-LoLab].RefsFound
                                        = Pai_Label(hp)^.l^.RefCount) And
                                        = Pai_Label(hp)^.l^.RefCount) And
@@ -1945,13 +1945,13 @@ Begin
 
 
         ait_instruction:
         ait_instruction:
           Begin
           Begin
-            if pai386(p)^.is_jmp then
+            if paicpu(p)^.is_jmp then
              begin
              begin
 {$IfNDef JumpAnal}
 {$IfNDef JumpAnal}
   ;
   ;
 {$Else JumpAnal}
 {$Else JumpAnal}
-          With LTable^[pasmlabel(pai386(p)^.oper[0].sym)^.labelnr-LoLab] Do
-            If (RefsFound = pasmlabel(pai386(p)^.oper[0].sym)^.RefCount) Then
+          With LTable^[pasmlabel(paicpu(p)^.oper[0].sym)^.labelnr-LoLab] Do
+            If (RefsFound = pasmlabel(paicpu(p)^.oper[0].sym)^.RefCount) Then
               Begin
               Begin
                 If (InstrCnt < InstrNr)
                 If (InstrCnt < InstrNr)
                   Then
                   Then
@@ -1977,7 +1977,7 @@ Begin
 {                    If (JmpsProcessed > 0) Or
 {                    If (JmpsProcessed > 0) Or
                        Not(GetLastInstruction(PaiObj, hp) And
                        Not(GetLastInstruction(PaiObj, hp) And
                            (hp^.typ = ait_labeled_instruction) And
                            (hp^.typ = ait_labeled_instruction) And
-                           (pai386_labeled(hp)^.opcode = A_JMP))
+                           (paicpu_labeled(hp)^.opcode = A_JMP))
                       Then}
                       Then}
 {instruction prior to label is not a jmp, or at least one jump to the label
 {instruction prior to label is not a jmp, or at least one jump to the label
  has yet been processed}
  has yet been processed}
@@ -2035,36 +2035,36 @@ Begin
           end
           end
           else
           else
            begin
            begin
-            InstrProp := AsmInstr[Pai386(p)^.opcode];
-            Case Pai386(p)^.opcode Of
+            InstrProp := AsmInstr[Paicpu(p)^.opcode];
+            Case Paicpu(p)^.opcode Of
               A_MOV, A_MOVZX, A_MOVSX:
               A_MOV, A_MOVZX, A_MOVSX:
                 Begin
                 Begin
-                  Case Pai386(p)^.oper[0].typ Of
+                  Case Paicpu(p)^.oper[0].typ Of
                     Top_Reg:
                     Top_Reg:
-                      Case Pai386(p)^.oper[1].typ Of
+                      Case Paicpu(p)^.oper[1].typ Of
                         Top_Reg:
                         Top_Reg:
                           Begin
                           Begin
-                            DestroyReg(CurProp, Pai386(p)^.oper[1].reg);
-                            ReadReg(CurProp, Pai386(p)^.oper[0].reg);
-{                            CurProp^.Regs[Pai386(p)^.oper[1].reg] :=
-                              CurProp^.Regs[Pai386(p)^.oper[0].reg];
-                            If (CurProp^.Regs[Pai386(p)^.oper[1].reg].ModReg = R_NO) Then
-                              CurProp^.Regs[Pai386(p)^.oper[1].reg].ModReg :=
-                                Pai386(p)^.oper[0].reg;}
+                            DestroyReg(CurProp, Paicpu(p)^.oper[1].reg);
+                            ReadReg(CurProp, Paicpu(p)^.oper[0].reg);
+{                            CurProp^.Regs[Paicpu(p)^.oper[1].reg] :=
+                              CurProp^.Regs[Paicpu(p)^.oper[0].reg];
+                            If (CurProp^.Regs[Paicpu(p)^.oper[1].reg].ModReg = R_NO) Then
+                              CurProp^.Regs[Paicpu(p)^.oper[1].reg].ModReg :=
+                                Paicpu(p)^.oper[0].reg;}
                           End;
                           End;
                         Top_Ref:
                         Top_Ref:
                           Begin
                           Begin
-                            ReadReg(CurProp, Pai386(p)^.oper[0].reg);
-                            ReadRef(CurProp, Pai386(p)^.oper[1].ref);
-                            DestroyRefs(p, Pai386(p)^.oper[1].ref^, Pai386(p)^.oper[0].reg);
+                            ReadReg(CurProp, Paicpu(p)^.oper[0].reg);
+                            ReadRef(CurProp, Paicpu(p)^.oper[1].ref);
+                            DestroyRefs(p, Paicpu(p)^.oper[1].ref^, Paicpu(p)^.oper[0].reg);
                           End;
                           End;
                       End;
                       End;
                     Top_Ref:
                     Top_Ref:
                       Begin {destination is always a register in this case}
                       Begin {destination is always a register in this case}
-                        ReadRef(CurProp, Pai386(p)^.oper[0].ref);
-                        ReadReg(CurProp, Pai386(p)^.oper[1].reg);
-                        TmpReg := Reg32(Pai386(p)^.oper[1].reg);
-                        If RegInRef(TmpReg, Pai386(p)^.oper[0].ref^) And
+                        ReadRef(CurProp, Paicpu(p)^.oper[0].ref);
+                        ReadReg(CurProp, Paicpu(p)^.oper[1].reg);
+                        TmpReg := Reg32(Paicpu(p)^.oper[1].reg);
+                        If RegInRef(TmpReg, Paicpu(p)^.oper[0].ref^) And
                            (CurProp^.Regs[TmpReg].Typ = Con_Ref)
                            (CurProp^.Regs[TmpReg].Typ = Con_Ref)
                           Then
                           Then
                             Begin
                             Begin
@@ -2082,7 +2082,7 @@ Begin
                           Else
                           Else
                             Begin
                             Begin
                               DestroyReg(CurProp, TmpReg);
                               DestroyReg(CurProp, TmpReg);
-                              If Not(RegInRef(TmpReg, Pai386(p)^.oper[0].ref^)) Then
+                              If Not(RegInRef(TmpReg, Paicpu(p)^.oper[0].ref^)) Then
                                 With CurProp^.Regs[TmpReg] Do
                                 With CurProp^.Regs[TmpReg] Do
                                   Begin
                                   Begin
                                     Typ := Con_Ref;
                                     Typ := Con_Ref;
@@ -2098,10 +2098,10 @@ Begin
                       End;
                       End;
                     Top_Const:
                     Top_Const:
                       Begin
                       Begin
-                        Case Pai386(p)^.oper[1].typ Of
+                        Case Paicpu(p)^.oper[1].typ Of
                           Top_Reg:
                           Top_Reg:
                             Begin
                             Begin
-                              TmpReg := Reg32(Pai386(p)^.oper[1].reg);
+                              TmpReg := Reg32(Paicpu(p)^.oper[1].reg);
                               With CurProp^.Regs[TmpReg] Do
                               With CurProp^.Regs[TmpReg] Do
                                 Begin
                                 Begin
                                   DestroyReg(CurProp, TmpReg);
                                   DestroyReg(CurProp, TmpReg);
@@ -2111,8 +2111,8 @@ Begin
                             End;
                             End;
                           Top_Ref:
                           Top_Ref:
                             Begin
                             Begin
-                              ReadRef(CurProp, Pai386(p)^.oper[1].ref);
-                              DestroyRefs(P, Pai386(p)^.oper[1].ref^, R_NO);
+                              ReadRef(CurProp, Paicpu(p)^.oper[1].ref);
+                              DestroyRefs(P, Paicpu(p)^.oper[1].ref^, R_NO);
                             End;
                             End;
                         End;
                         End;
                       End;
                       End;
@@ -2120,19 +2120,19 @@ Begin
                 End;
                 End;
               A_DIV, A_IDIV, A_MUL:
               A_DIV, A_IDIV, A_MUL:
                 Begin
                 Begin
-                  ReadOp(Curprop, Pai386(p)^.oper[0]);
+                  ReadOp(Curprop, Paicpu(p)^.oper[0]);
                   ReadReg(CurProp,R_EAX);
                   ReadReg(CurProp,R_EAX);
-                  If (Pai386(p)^.OpCode = A_IDIV) or
-                     (Pai386(p)^.OpCode = A_DIV) Then
+                  If (Paicpu(p)^.OpCode = A_IDIV) or
+                     (Paicpu(p)^.OpCode = A_DIV) Then
                     ReadReg(CurProp,R_EDX);
                     ReadReg(CurProp,R_EDX);
                   DestroyReg(CurProp, R_EAX)
                   DestroyReg(CurProp, R_EAX)
                 End;
                 End;
               A_IMUL:
               A_IMUL:
                 Begin
                 Begin
-                  ReadOp(CurProp,Pai386(p)^.oper[0]);
-                  ReadOp(CurProp,Pai386(p)^.oper[1]);
-                  If (Pai386(p)^.oper[2].typ = top_none) Then
-                    If (Pai386(p)^.oper[1].typ = top_none) Then
+                  ReadOp(CurProp,Paicpu(p)^.oper[0]);
+                  ReadOp(CurProp,Paicpu(p)^.oper[1]);
+                  If (Paicpu(p)^.oper[2].typ = top_none) Then
+                    If (Paicpu(p)^.oper[1].typ = top_none) Then
                       Begin
                       Begin
                         ReadReg(CurProp,R_EAX);
                         ReadReg(CurProp,R_EAX);
                         DestroyReg(CurProp, R_EAX);
                         DestroyReg(CurProp, R_EAX);
@@ -2140,32 +2140,32 @@ Begin
                       End
                       End
                     Else
                     Else
             {$ifdef arithopt}
             {$ifdef arithopt}
-                      AddOp2RegContents(Pai386(p), Pai386(p)^.oper[1])
+                      AddOp2RegContents(Paicpu(p), Paicpu(p)^.oper[1])
             {$else arithopt}
             {$else arithopt}
-                      DestroyOp(p, Pai386(p)^.oper[1])
+                      DestroyOp(p, Paicpu(p)^.oper[1])
             {$endif arithopt}
             {$endif arithopt}
                   Else
                   Else
             {$ifdef arithopt}
             {$ifdef arithopt}
-                    AddOp2RegContents(Pai386(p), Pai386(p)^.oper[2]);
+                    AddOp2RegContents(Paicpu(p), Paicpu(p)^.oper[2]);
             {$else arithopt}
             {$else arithopt}
-                    DestroyOp(p, Pai386(p)^.oper[2]);
+                    DestroyOp(p, Paicpu(p)^.oper[2]);
             {$endif arithopt}
             {$endif arithopt}
                 End;
                 End;
               A_XOR:
               A_XOR:
                 Begin
                 Begin
-                  ReadOp(CurProp, Pai386(p)^.oper[0]);
-                  ReadOp(CurProp, Pai386(p)^.oper[1]);
-                  If (Pai386(p)^.oper[0].typ = top_reg) And
-                     (Pai386(p)^.oper[1].typ = top_reg) And
-                     (Pai386(p)^.oper[0].reg = Pai386(p)^.oper[1].reg)
+                  ReadOp(CurProp, Paicpu(p)^.oper[0]);
+                  ReadOp(CurProp, Paicpu(p)^.oper[1]);
+                  If (Paicpu(p)^.oper[0].typ = top_reg) And
+                     (Paicpu(p)^.oper[1].typ = top_reg) And
+                     (Paicpu(p)^.oper[0].reg = Paicpu(p)^.oper[1].reg)
                     Then
                     Then
                       Begin
                       Begin
-                        DestroyReg(CurProp, Pai386(p)^.oper[0].reg);
-                        CurProp^.Regs[Reg32(Pai386(p)^.oper[0].reg)].typ := Con_Const;
-                        CurProp^.Regs[Reg32(Pai386(p)^.oper[0].reg)].StartMod := Pointer(0)
+                        DestroyReg(CurProp, Paicpu(p)^.oper[0].reg);
+                        CurProp^.Regs[Reg32(Paicpu(p)^.oper[0].reg)].typ := Con_Const;
+                        CurProp^.Regs[Reg32(Paicpu(p)^.oper[0].reg)].StartMod := Pointer(0)
                       End
                       End
                     Else
                     Else
-                      DestroyOp(p, Pai386(p)^.oper[1]);
+                      DestroyOp(p, Paicpu(p)^.oper[1]);
                 End
                 End
               Else
               Else
                 Begin
                 Begin
@@ -2184,46 +2184,46 @@ Begin
 {$ifdef arithopt}
 {$ifdef arithopt}
                         C_MEAX..C_MEDI:
                         C_MEAX..C_MEDI:
                           AddInstr2RegContents({$ifdef statedebug} asml, {$endif}
                           AddInstr2RegContents({$ifdef statedebug} asml, {$endif}
-                                               Pai386(p),
+                                               Paicpu(p),
                                                TCh2Reg(InstrProp.Ch[Cnt]));
                                                TCh2Reg(InstrProp.Ch[Cnt]));
 {$endif arithopt}
 {$endif arithopt}
                         C_CDirFlag: CurProp^.DirFlag := F_NotSet;
                         C_CDirFlag: CurProp^.DirFlag := F_NotSet;
                         C_SDirFlag: CurProp^.DirFlag := F_Set;
                         C_SDirFlag: CurProp^.DirFlag := F_Set;
-                        C_Rop1: ReadOp(CurProp, Pai386(p)^.oper[0]);
-                        C_Rop2: ReadOp(CurProp, Pai386(p)^.oper[1]);
-                        C_ROp3: ReadOp(CurProp, Pai386(p)^.oper[2]);
+                        C_Rop1: ReadOp(CurProp, Paicpu(p)^.oper[0]);
+                        C_Rop2: ReadOp(CurProp, Paicpu(p)^.oper[1]);
+                        C_ROp3: ReadOp(CurProp, Paicpu(p)^.oper[2]);
                         C_Wop1..C_RWop1:
                         C_Wop1..C_RWop1:
                           Begin
                           Begin
                             If (InstrProp.Ch[Cnt] in [C_RWop1]) Then
                             If (InstrProp.Ch[Cnt] in [C_RWop1]) Then
-                              ReadOp(CurProp, Pai386(p)^.oper[0]);
-                            DestroyOp(p, Pai386(p)^.oper[0]);
+                              ReadOp(CurProp, Paicpu(p)^.oper[0]);
+                            DestroyOp(p, Paicpu(p)^.oper[0]);
                           End;
                           End;
 {$ifdef arithopt}
 {$ifdef arithopt}
                         C_Mop1:
                         C_Mop1:
                           AddInstr2OpContents({$ifdef statedebug} asml, {$endif}
                           AddInstr2OpContents({$ifdef statedebug} asml, {$endif}
-                          Pai386(p), Pai386(p)^.oper[0]);
+                          Paicpu(p), Paicpu(p)^.oper[0]);
 {$endif arithopt}
 {$endif arithopt}
                         C_Wop2..C_RWop2:
                         C_Wop2..C_RWop2:
                           Begin
                           Begin
                             If (InstrProp.Ch[Cnt] = C_RWop2) Then
                             If (InstrProp.Ch[Cnt] = C_RWop2) Then
-                              ReadOp(CurProp, Pai386(p)^.oper[1]);
-                            DestroyOp(p, Pai386(p)^.oper[1]);
+                              ReadOp(CurProp, Paicpu(p)^.oper[1]);
+                            DestroyOp(p, Paicpu(p)^.oper[1]);
                           End;
                           End;
 {$ifdef arithopt}
 {$ifdef arithopt}
                         C_Mop2:
                         C_Mop2:
                           AddInstr2OpContents({$ifdef statedebug} asml, {$endif}
                           AddInstr2OpContents({$ifdef statedebug} asml, {$endif}
-                          Pai386(p), Pai386(p)^.oper[1]);
+                          Paicpu(p), Paicpu(p)^.oper[1]);
 {$endif arithopt}
 {$endif arithopt}
                         C_WOp3..C_RWOp3:
                         C_WOp3..C_RWOp3:
                           Begin
                           Begin
                             If (InstrProp.Ch[Cnt] = C_RWOp3) Then
                             If (InstrProp.Ch[Cnt] = C_RWOp3) Then
-                              ReadOp(CurProp, Pai386(p)^.oper[2]);
-                            DestroyOp(p, Pai386(p)^.oper[2]);
+                              ReadOp(CurProp, Paicpu(p)^.oper[2]);
+                            DestroyOp(p, Paicpu(p)^.oper[2]);
                           End;
                           End;
 {$ifdef arithopt}
 {$ifdef arithopt}
                         C_Mop3:
                         C_Mop3:
                           AddInstr2OpContents({$ifdef statedebug} asml, {$endif}
                           AddInstr2OpContents({$ifdef statedebug} asml, {$endif}
-                          Pai386(p), Pai386(p)^.oper[2]);
+                          Paicpu(p), Paicpu(p)^.oper[2]);
 {$endif arithopt}
 {$endif arithopt}
                         C_WMemEDI:
                         C_WMemEDI:
                           Begin
                           Begin
@@ -2276,20 +2276,20 @@ Begin
           End;
           End;
         ait_instruction:
         ait_instruction:
           begin
           begin
-            if pai386(p)^.is_jmp then
+            if paicpu(p)^.is_jmp then
              begin
              begin
-               If (pasmlabel(pai386(P)^.oper[0].sym)^.labelnr >= LoLab) And
-                  (pasmlabel(pai386(P)^.oper[0].sym)^.labelnr <= HiLab) Then
-                 Inc(LTable^[pasmlabel(pai386(P)^.oper[0].sym)^.labelnr-LoLab].RefsFound);
+               If (pasmlabel(paicpu(P)^.oper[0].sym)^.labelnr >= LoLab) And
+                  (pasmlabel(paicpu(P)^.oper[0].sym)^.labelnr <= HiLab) Then
+                 Inc(LTable^[pasmlabel(paicpu(P)^.oper[0].sym)^.labelnr-LoLab].RefsFound);
              end;
              end;
           end;
           end;
 {        ait_instruction:
 {        ait_instruction:
           Begin
           Begin
-           If (Pai386(p)^.opcode = A_PUSH) And
-              (Pai386(p)^.oper[0].typ = top_symbol) And
-              (PCSymbol(Pai386(p)^.oper[0])^.offset = 0) Then
+           If (Paicpu(p)^.opcode = A_PUSH) And
+              (Paicpu(p)^.oper[0].typ = top_symbol) And
+              (PCSymbol(Paicpu(p)^.oper[0])^.offset = 0) Then
              Begin
              Begin
-               TmpStr := StrPas(PCSymbol(Pai386(p)^.oper[0])^.symbol);
+               TmpStr := StrPas(PCSymbol(Paicpu(p)^.oper[0])^.symbol);
                If}
                If}
       End;
       End;
 {$EndIf JumpAnal}
 {$EndIf JumpAnal}
@@ -2350,7 +2350,10 @@ End.
 
 
 {
 {
  $Log$
  $Log$
- Revision 1.56  1999-08-18 13:25:54  jonas
+ Revision 1.57  1999-08-25 12:00:00  jonas
+   * changed pai386, paippc and paiapha (same for tai*) to paicpu (taicpu)
+
+ Revision 1.56  1999/08/18 13:25:54  jonas
    * minor fixes regarding the reading of operands
    * minor fixes regarding the reading of operands
 
 
  Revision 1.55  1999/08/12 14:36:03  peter
  Revision 1.55  1999/08/12 14:36:03  peter

+ 13 - 10
compiler/new/alpha/agas.pas

@@ -75,33 +75,33 @@ unit agas;
       procedure tAlphaattasmlist.WriteInstruction (P : PAi);
       procedure tAlphaattasmlist.WriteInstruction (P : PAi);
         begin
         begin
 (*
 (*
-               op:=pai386(hp)^.opcode;
+               op:=paicpu(hp)^.opcode;
                calljmp:=is_calljmp(op);
                calljmp:=is_calljmp(op);
              { call maybe not translated to calll }
              { call maybe not translated to calll }
-               s:=#9+att_op2str[op]+cond2str[pai386(hp)^.condition];
+               s:=#9+att_op2str[op]+cond2str[paicpu(hp)^.condition];
                if (not calljmp) and
                if (not calljmp) and
                   (not att_nosuffix[op]) and
                   (not att_nosuffix[op]) and
                   not(
                   not(
-                   (pai386(hp)^.oper[0].typ=top_reg) and
-                   (pai386(hp)^.oper[0].reg in [R_ST..R_ST7])
+                   (paicpu(hp)^.oper[0].typ=top_reg) and
+                   (paicpu(hp)^.oper[0].reg in [R_ST..R_ST7])
                   ) then
                   ) then
-                s:=s+att_opsize2str[pai386(hp)^.opsize];
+                s:=s+att_opsize2str[paicpu(hp)^.opsize];
              { process operands }
              { process operands }
-               if pai386(hp)^.ops<>0 then
+               if paicpu(hp)^.ops<>0 then
                 begin
                 begin
                 { call and jmp need an extra handling                          }
                 { call and jmp need an extra handling                          }
                 { this code is only called if jmp isn't a labeled instruction }
                 { this code is only called if jmp isn't a labeled instruction }
                   if calljmp then
                   if calljmp then
-                   s:=s+#9+getopstr_jmp(pai386(hp)^.oper[0])
+                   s:=s+#9+getopstr_jmp(paicpu(hp)^.oper[0])
                   else
                   else
                    begin
                    begin
-                     for i:=0to pai386(hp)^.ops-1 do
+                     for i:=0to paicpu(hp)^.ops-1 do
                       begin
                       begin
                         if i=0 then
                         if i=0 then
                          sep:=#9
                          sep:=#9
                         else
                         else
                          sep:=',';
                          sep:=',';
-                        s:=s+sep+getopstr(pai386(hp)^.oper[i])
+                        s:=s+sep+getopstr(paicpu(hp)^.oper[i])
                       end;
                       end;
                    end;
                    end;
                 end;
                 end;
@@ -113,7 +113,10 @@ end.
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.3  1999-08-05 15:50:31  michael
+  Revision 1.4  1999-08-25 12:00:16  jonas
+    * changed pai386, paippc and paiapha (same for tai*) to paicpu (taicpu)
+
+  Revision 1.3  1999/08/05 15:50:31  michael
   * more changes
   * more changes
 
 
 }
 }

+ 12 - 9
compiler/new/alpha/cgcpu.pas

@@ -69,12 +69,12 @@ procedure tcgalpha.g_stackframe_entry(list : paasmoutput;localsize : longint);
 begin
 begin
   With List^ do 
   With List^ do 
     begin
     begin
-    concat(new(paialpha,op_reg_ref(A_LDGP,Global_pointer,new_reference(R_27,0))));
-    concat(new(paialpha,op_reg_ref(A_LDA,Stack_Pointer,new_reference(Stack_pointer,-LocalSize))));
+    concat(new(paicpu,op_reg_ref(A_LDGP,Global_pointer,new_reference(R_27,0))));
+    concat(new(paicpu,op_reg_ref(A_LDA,Stack_Pointer,new_reference(Stack_pointer,-LocalSize))));
     If LocalSize<>0 then
     If LocalSize<>0 then
       concat(new(paiframe,Init(Global_pointer,LocalSize,R_27,0)));
       concat(new(paiframe,Init(Global_pointer,LocalSize,R_27,0)));
     { Always generate a frame pointer. }
     { Always generate a frame pointer. }
-    concat(new(paialpha,op_reg_reg_reg(A_BIS,Stack_pointer,Stack_pointer,Frame_pointer)))
+    concat(new(paicpu,op_reg_reg_reg(A_BIS,Stack_pointer,Stack_pointer,Frame_pointer)))
     end;
     end;
 end;
 end;
 
 
@@ -84,11 +84,11 @@ begin
   With List^ do
   With List^ do
     begin
     begin
     { Restore stack pointer from frame pointer }
     { Restore stack pointer from frame pointer }
-    Concat (new(paialpha,op_reg_reg_reg(A_BIS,Frame_Pointer,Frame_Pointer,Stack_Pointer)));
+    Concat (new(paicpu,op_reg_reg_reg(A_BIS,Frame_Pointer,Frame_Pointer,Stack_Pointer)));
     { Restore previous stack position}
     { Restore previous stack position}
-    Concat (new(paialpha,op_reg_const_reg(A_ADDQ,Stack_Pointer,Parasize,Stack_pointer)));
+    Concat (new(paicpu,op_reg_const_reg(A_ADDQ,Stack_Pointer,Parasize,Stack_pointer)));
     { return... }
     { return... }
-    Concat (new(paialpha,op_reg_ref_const(A_RET,Stack_pointer,new_reference(Return_pointer,0),1)));
+    Concat (new(paicpu,op_reg_ref_const(A_RET,Stack_pointer,new_reference(Return_pointer,0),1)));
     { end directive
     { end directive
     Concat (new(paiend,init(''));
     Concat (new(paiend,init(''));
     }
     }
@@ -98,7 +98,7 @@ end;
 procedure tcgalpha.a_call_name(list : paasmoutput;const s : string;  offset : longint);
 procedure tcgalpha.a_call_name(list : paasmoutput;const s : string;  offset : longint);
 
 
   begin
   begin
-     { list^.concat(new(pai386,op_sym(A_CALL,S_NO,newasmsymbol(s)))); }
+     { list^.concat(new(paicpu,op_sym(A_CALL,S_NO,newasmsymbol(s)))); }
      {!!!!!!!!!1 offset is ignored }
      {!!!!!!!!!1 offset is ignored }
      abstract;
      abstract;
   end;
   end;
@@ -106,7 +106,7 @@ procedure tcgalpha.a_call_name(list : paasmoutput;const s : string;  offset : lo
 procedure tcgalpha.a_push_reg(list : paasmoutput;r : tregister);
 procedure tcgalpha.a_push_reg(list : paasmoutput;r : tregister);
 
 
   begin
   begin
-     { list^.concat(new(pai386,op_reg(A_PUSH,regsize(r),r))); }
+     { list^.concat(new(paicpu,op_reg(A_PUSH,regsize(r),r))); }
      abstract;
      abstract;
   end;
   end;
 
 
@@ -200,7 +200,10 @@ end;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.6  1999-08-06 18:05:57  florian
+  Revision 1.7  1999-08-25 12:00:17  jonas
+    * changed pai386, paippc and paiapha (same for tai*) to paicpu (taicpu)
+
+  Revision 1.6  1999/08/06 18:05:57  florian
     * implemented some stuff for assignments
     * implemented some stuff for assignments
 
 
   Revision 1.5  1999/08/06 14:15:53  florian
   Revision 1.5  1999/08/06 14:15:53  florian

+ 34 - 31
compiler/new/alpha/cpuasm.pas

@@ -44,8 +44,8 @@ type
     end;
     end;
 
 
 
 
-  paialpha = ^taialpha;
-  taialpha = object(tainstruction)
+  paicpu = ^taicpu;
+  taicpu = object(tainstruction)
      constructor op_none(op : tasmop);
      constructor op_none(op : tasmop);
 
 
      constructor op_reg(op : tasmop;_op1 : tregister);
      constructor op_reg(op : tasmop;_op1 : tregister);
@@ -89,130 +89,130 @@ implementation
 
 
 
 
 {*****************************************************************************
 {*****************************************************************************
-                                 taialpha Constructors
+                                 taicpu Constructors
 *****************************************************************************}
 *****************************************************************************}
 
 
 
 
-    constructor taialpha.op_none(op : tasmop);
+    constructor taicpu.op_none(op : tasmop);
       begin
       begin
          inherited init(op);
          inherited init(op);
       end;
       end;
 
 
 
 
-    constructor taialpha.op_reg(op : tasmop;_op1 : tregister);
+    constructor taicpu.op_reg(op : tasmop;_op1 : tregister);
       begin
       begin
          inherited init(op);
          inherited init(op);
          ops:=1;
          ops:=1;
       end;
       end;
 
 
 
 
-    constructor taialpha.op_const(op : tasmop;_op1 : longint);
+    constructor taicpu.op_const(op : tasmop;_op1 : longint);
       begin
       begin
          inherited init(op);
          inherited init(op);
          ops:=1;
          ops:=1;
       end;
       end;
 
 
 
 
-    constructor taialpha.op_ref(op : tasmop;_op1 : preference);
+    constructor taicpu.op_ref(op : tasmop;_op1 : preference);
       begin
       begin
          inherited init(op);
          inherited init(op);
          ops:=1;
          ops:=1;
       end;
       end;
 
 
 
 
-    constructor taialpha.op_reg_reg(op : tasmop;_op1,_op2 : tregister);
+    constructor taicpu.op_reg_reg(op : tasmop;_op1,_op2 : tregister);
       begin
       begin
          inherited init(op);
          inherited init(op);
          ops:=2;
          ops:=2;
       end;
       end;
 
 
 
 
-    constructor taialpha.op_reg_const(op:tasmop; _op1: tregister; _op2: longint);
+    constructor taicpu.op_reg_const(op:tasmop; _op1: tregister; _op2: longint);
       begin
       begin
          inherited init(op);
          inherited init(op);
          ops:=2;
          ops:=2;
       end;
       end;
 
 
 
 
-    constructor taialpha.op_reg_ref(op : tasmop;_op1 : tregister;_op2 : preference);
+    constructor taicpu.op_reg_ref(op : tasmop;_op1 : tregister;_op2 : preference);
       begin
       begin
          inherited init(op);
          inherited init(op);
          ops:=2;
          ops:=2;
       end;
       end;
 
 
 
 
-    constructor taialpha.op_const_reg(op : tasmop;_op1 : longint;_op2 : tregister);
+    constructor taicpu.op_const_reg(op : tasmop;_op1 : longint;_op2 : tregister);
       begin
       begin
          inherited init(op);
          inherited init(op);
          ops:=2;
          ops:=2;
       end;
       end;
 
 
 
 
-    constructor taialpha.op_const_const(op : tasmop;_op1,_op2 : longint);
+    constructor taicpu.op_const_const(op : tasmop;_op1,_op2 : longint);
       begin
       begin
          inherited init(op);
          inherited init(op);
          ops:=2;
          ops:=2;
       end;
       end;
 
 
 
 
-    constructor taialpha.op_const_ref(op : tasmop;_op1 : longint;_op2 : preference);
+    constructor taicpu.op_const_ref(op : tasmop;_op1 : longint;_op2 : preference);
       begin
       begin
          inherited init(op);
          inherited init(op);
          ops:=2;
          ops:=2;
       end;
       end;
 
 
-    constructor taialpha.op_ref_reg(op : tasmop;_op1 : preference;_op2 : tregister);
+    constructor taicpu.op_ref_reg(op : tasmop;_op1 : preference;_op2 : tregister);
       begin
       begin
          inherited init(op);
          inherited init(op);
          ops:=2;
          ops:=2;
       end;
       end;
 
 
 
 
-    constructor taialpha.op_ref_ref(op : tasmop;_op1,_op2 : preference);
+    constructor taicpu.op_ref_ref(op : tasmop;_op1,_op2 : preference);
       begin
       begin
          inherited init(op);
          inherited init(op);
          ops:=2;
          ops:=2;
       end;
       end;
 
 
 
 
-    constructor taialpha.op_reg_reg_reg(op : tasmop;_op1,_op2,_op3 : tregister);
+    constructor taicpu.op_reg_reg_reg(op : tasmop;_op1,_op2,_op3 : tregister);
       begin
       begin
          inherited init(op);
          inherited init(op);
          ops:=3;
          ops:=3;
       end;
       end;
 
 
-    constructor taialpha.op_reg_const_reg(op : tasmop;_op1 : tregister;_op2 : longint;_op3 : tregister);
+    constructor taicpu.op_reg_const_reg(op : tasmop;_op1 : tregister;_op2 : longint;_op3 : tregister);
       begin
       begin
          inherited init(op);
          inherited init(op);
          ops:=3;
          ops:=3;
       end;
       end;
 
 
-     constructor taialpha.op_reg_reg_ref(op : tasmop;_op1,_op2 : tregister;_op3 : preference);
+     constructor taicpu.op_reg_reg_ref(op : tasmop;_op1,_op2 : tregister;_op3 : preference);
       begin
       begin
          inherited init(op);
          inherited init(op);
          ops:=3;
          ops:=3;
       end;
       end;
 
 
-     constructor taialpha.op_const_ref_reg(op : tasmop;_op1 : longint;_op2 : preference;_op3 : tregister);
+     constructor taicpu.op_const_ref_reg(op : tasmop;_op1 : longint;_op2 : preference;_op3 : tregister);
       begin
       begin
          inherited init(op);
          inherited init(op);
          ops:=3;
          ops:=3;
       end;
       end;
 
 
-     constructor taialpha.op_const_reg_ref(op : tasmop;_op1 : longint;_op2 : tregister;_op3 : preference);
+     constructor taicpu.op_const_reg_ref(op : tasmop;_op1 : longint;_op2 : tregister;_op3 : preference);
       begin
       begin
          inherited init(op);
          inherited init(op);
          ops:=3;
          ops:=3;
       end;
       end;
 
 
-     constructor taialpha.op_reg_ref_const(op : tasmop;_op1 : tregister;_op2 : preference;_op3 : longint);
+     constructor taicpu.op_reg_ref_const(op : tasmop;_op1 : tregister;_op2 : preference;_op3 : longint);
       begin
       begin
          inherited init(op);
          inherited init(op);
          ops:=3;
          ops:=3;
       end;
       end;
 
 
 
 
-    constructor taialpha.op_cond_sym(op : tasmop;cond:TAsmCond;_op1 : pasmsymbol);
+    constructor taicpu.op_cond_sym(op : tasmop;cond:TAsmCond;_op1 : pasmsymbol);
       begin
       begin
          inherited init(op);
          inherited init(op);
          condition:=cond;
          condition:=cond;
@@ -220,34 +220,34 @@ implementation
       end;
       end;
 
 
 
 
-    constructor taialpha.op_sym(op : tasmop;_op1 : pasmsymbol);
+    constructor taicpu.op_sym(op : tasmop;_op1 : pasmsymbol);
       begin
       begin
          inherited init(op);
          inherited init(op);
          ops:=1;
          ops:=1;
       end;
       end;
 
 
 
 
-    constructor taialpha.op_sym_ofs(op : tasmop;_op1 : pasmsymbol;_op1ofs:longint);
+    constructor taicpu.op_sym_ofs(op : tasmop;_op1 : pasmsymbol;_op1ofs:longint);
       begin
       begin
          inherited init(op);
          inherited init(op);
          ops:=1;
          ops:=1;
       end;
       end;
 
 
 
 
-    constructor taialpha.op_sym_ofs_reg(op : tasmop;_op1 : pasmsymbol;_op1ofs:longint;_op2 : tregister);
+    constructor taicpu.op_sym_ofs_reg(op : tasmop;_op1 : pasmsymbol;_op1ofs:longint;_op2 : tregister);
       begin
       begin
          inherited init(op);
          inherited init(op);
          ops:=2;
          ops:=2;
       end;
       end;
 
 
 
 
-    constructor taialpha.op_sym_ofs_ref(op : tasmop;_op1 : pasmsymbol;_op1ofs:longint;_op2 : preference);
+    constructor taicpu.op_sym_ofs_ref(op : tasmop;_op1 : pasmsymbol;_op1ofs:longint;_op2 : preference);
       begin
       begin
          inherited init(op);
          inherited init(op);
          ops:=2;
          ops:=2;
       end;
       end;
 
 
-    function taialpha.getcopy:plinkedlist_item;
+    function taicpu.getcopy:plinkedlist_item;
       var
       var
         i : longint;
         i : longint;
         p : plinkedlist_item;
         p : plinkedlist_item;
@@ -255,10 +255,10 @@ implementation
         p:=inherited getcopy;
         p:=inherited getcopy;
         { make a copy of the references }
         { make a copy of the references }
         for i:=1 to ops do
         for i:=1 to ops do
-         if (paialpha(p)^.oper[i-1].typ=top_ref) then
+         if (paicpu(p)^.oper[i-1].typ=top_ref) then
           begin
           begin
-            new(paialpha(p)^.oper[i-1].ref);
-            paialpha(p)^.oper[i-1].ref^:=oper[i-1].ref^;
+            new(paicpu(p)^.oper[i-1].ref);
+            paicpu(p)^.oper[i-1].ref^:=oper[i-1].ref^;
           end;
           end;
         getcopy:=p;
         getcopy:=p;
       end;
       end;
@@ -285,7 +285,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.4  1999-08-06 16:04:07  michael
+  Revision 1.5  1999-08-25 12:00:18  jonas
+    * changed pai386, paippc and paiapha (same for tai*) to paicpu (taicpu)
+
+  Revision 1.4  1999/08/06 16:04:07  michael
   + introduced tainstruction
   + introduced tainstruction
 
 
   Revision 1.3  1999/08/06 14:15:54  florian
   Revision 1.3  1999/08/06 14:15:54  florian

+ 9 - 6
compiler/new/aoptcs.pas

@@ -792,12 +792,12 @@ Begin
                         PPaiProp(Pai(p)^.OptInfo)^.CanBeRemoved := True;
                         PPaiProp(Pai(p)^.OptInfo)^.CanBeRemoved := True;
               A_XOR:
               A_XOR:
                 Begin
                 Begin
-                  If (Pai386(p)^.oper[0].typ = top_reg) And
-                     (Pai386(p)^.oper[0].typ = top_reg) And
-                     (Pai386(p)^.oper[1].reg = Pai386(p)^.oper[1].reg) And
+                  If (Paicpu(p)^.oper[0].typ = top_reg) And
+                     (Paicpu(p)^.oper[0].typ = top_reg) And
+                     (Paicpu(p)^.oper[1].reg = Paicpu(p)^.oper[1].reg) And
                      GetLastInstruction(p, hp1) And
                      GetLastInstruction(p, hp1) And
-                     (PPaiProp(hp1^.OptInfo)^.Regs[Reg32(Pai386(p)^.oper[1].reg)].typ = con_const) And
-                     (PPaiProp(hp1^.OptInfo)^.Regs[Reg32(Pai386(p)^.oper[1].reg)].StartMod = nil)
+                     (PPaiProp(hp1^.OptInfo)^.Regs[Reg32(Paicpu(p)^.oper[1].reg)].typ = con_const) And
+                     (PPaiProp(hp1^.OptInfo)^.Regs[Reg32(Paicpu(p)^.oper[1].reg)].StartMod = nil)
                     Then PPaiProp(p^.OptInfo)^.CanBeRemoved := True
                     Then PPaiProp(p^.OptInfo)^.CanBeRemoved := True
                 End
                 End
           End;
           End;
@@ -850,7 +850,10 @@ End.
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.2  1999-08-23 14:41:13  jonas
+  Revision 1.3  1999-08-25 12:00:10  jonas
+    * changed pai386, paippc and paiapha (same for tai*) to paicpu (taicpu)
+
+  Revision 1.2  1999/08/23 14:41:13  jonas
     + checksequence (processor independent)\n  + processor independent part of docse
     + checksequence (processor independent)\n  + processor independent part of docse
 
 
   Revision 1.1  1999/08/18 14:32:21  jonas
   Revision 1.1  1999/08/18 14:32:21  jonas

+ 11 - 8
compiler/new/cgobj.pas

@@ -695,16 +695,16 @@ unit cgobj;
            begin
            begin
              if procinfo._class^.isclass then
              if procinfo._class^.isclass then
                begin
                begin
-                 list^.concat(new(pai386,op_sym(A_CALL,S_NO,newasmsymbol('FPC_NEW_CLASS'))));
-                 list^.concat(new(pai386,op_cond_sym(A_Jcc,C_Z,S_NO,quickexitlabel)));
+                 list^.concat(new(paicpu,op_sym(A_CALL,S_NO,newasmsymbol('FPC_NEW_CLASS'))));
+                 list^.concat(new(paicpu,op_cond_sym(A_Jcc,C_Z,S_NO,quickexitlabel)));
                end
                end
              else
              else
                begin
                begin
                  {
                  {
                  list^.insert(new(pai_labeled,init(A_JZ,quickexitlabel)));
                  list^.insert(new(pai_labeled,init(A_JZ,quickexitlabel)));
-                 list^.insert(new(pai386,op_csymbol(A_CALL,S_NO,
+                 list^.insert(new(paicpu,op_csymbol(A_CALL,S_NO,
                    newcsymbol('FPC_HELP_CONSTRUCTOR',0))));
                    newcsymbol('FPC_HELP_CONSTRUCTOR',0))));
-                 list^.insert(new(pai386,op_const_reg(A_MOV,S_L,procinfo._class^.vmt_offset,R_EDI)));
+                 list^.insert(new(paicpu,op_const_reg(A_MOV,S_L,procinfo._class^.vmt_offset,R_EDI)));
                  concat_external('FPC_HELP_CONSTRUCTOR',EXT_NEAR);
                  concat_external('FPC_HELP_CONSTRUCTOR',EXT_NEAR);
                  }
                  }
                end;
                end;
@@ -884,9 +884,9 @@ unit cgobj;
          if (po_savestdregs in aktprocsym^.definition^.procoptions) then
          if (po_savestdregs in aktprocsym^.definition^.procoptions) then
            begin
            begin
              if (aktprocsym^.definition^.usedregisters and ($80 shr byte(R_EBX)))<>0 then
              if (aktprocsym^.definition^.usedregisters and ($80 shr byte(R_EBX)))<>0 then
-              exprasmlist^.concat(new(pai386,op_reg(A_POP,S_L,R_EBX)));
-             exprasmlist^.concat(new(pai386,op_reg(A_POP,S_L,R_ESI)));
-             exprasmlist^.concat(new(pai386,op_reg(A_POP,S_L,R_EDI)));
+              exprasmlist^.concat(new(paicpu,op_reg(A_POP,S_L,R_EBX)));
+             exprasmlist^.concat(new(paicpu,op_reg(A_POP,S_L,R_ESI)));
+             exprasmlist^.concat(new(paicpu,op_reg(A_POP,S_L,R_EDI)));
              { here we could reset R_EBX
              { here we could reset R_EBX
                but that is risky because it only works
                but that is risky because it only works
                if genexitcode is called after genentrycode
                if genexitcode is called after genentrycode
@@ -1080,7 +1080,10 @@ unit cgobj;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.22  1999-08-18 17:05:55  florian
+  Revision 1.23  1999-08-25 12:00:11  jonas
+    * changed pai386, paippc and paiapha (same for tai*) to paicpu (taicpu)
+
+  Revision 1.22  1999/08/18 17:05:55  florian
     + implemented initilizing of data for the new code generator
     + implemented initilizing of data for the new code generator
       so it should compile now simple programs
       so it should compile now simple programs
 
 

+ 5 - 2
compiler/new/i386/aoptcpub.pas

@@ -48,7 +48,7 @@ Type
   TOpAction = (OpAct_Read, OpAct_Write, OpAct_Modify, OpAct_Unknown);
   TOpAction = (OpAct_Read, OpAct_Write, OpAct_Modify, OpAct_Unknown);
 
 
 { type of a normal instruction }
 { type of a normal instruction }
-  TInstr = Tai386;
+  TInstr = Taicpu;
   PInstr = ^TInstr;
   PInstr = ^TInstr;
 
 
   TFlag = (DirFlag);
   TFlag = (DirFlag);
@@ -739,7 +739,10 @@ End.
 
 
 {
 {
  $Log$
  $Log$
- Revision 1.4  1999-08-23 14:41:14  jonas
+ Revision 1.5  1999-08-25 12:00:19  jonas
+   * changed pai386, paippc and paiapha (same for tai*) to paicpu (taicpu)
+
+ Revision 1.4  1999/08/23 14:41:14  jonas
    + checksequence (processor independent)\n  + processor independent part of docse
    + checksequence (processor independent)\n  + processor independent part of docse
 
 
  Revision 1.3  1999/08/18 14:32:25  jonas
  Revision 1.3  1999/08/18 14:32:25  jonas

+ 15 - 12
compiler/new/i386/cgcpu.pas

@@ -65,18 +65,18 @@ unit cgcpu;
          if localsize<>0 then
          if localsize<>0 then
            begin
            begin
               if (cs_littlesize in aktglobalswitches) and (localsize<=65535) then
               if (cs_littlesize in aktglobalswitches) and (localsize<=65535) then
-                list^.insert(new(pai386,op_const_const(A_ENTER,S_NO,localsize,0)))
+                list^.insert(new(paicpu,op_const_const(A_ENTER,S_NO,localsize,0)))
               else
               else
                 begin
                 begin
-                   list^.concat(new(pai386,op_reg(A_PUSH,S_L,R_EBP)));
-                   list^.concat(new(pai386,op_reg_reg(A_MOV,S_L,R_ESP,R_EBP)));
-                   list^.concat(new(pai386,op_const_reg(A_SUB,S_L,localsize,R_ESP)));
+                   list^.concat(new(paicpu,op_reg(A_PUSH,S_L,R_EBP)));
+                   list^.concat(new(paicpu,op_reg_reg(A_MOV,S_L,R_ESP,R_EBP)));
+                   list^.concat(new(paicpu,op_const_reg(A_SUB,S_L,localsize,R_ESP)));
                 end;
                 end;
              end
              end
          else
          else
            begin
            begin
-              list^.concat(new(pai386,op_reg(A_PUSH,S_L,R_EBP)));
-              list^.concat(new(pai386,op_reg_reg(A_MOV,S_L,R_ESP,R_EBP)));
+              list^.concat(new(paicpu,op_reg(A_PUSH,S_L,R_EBP)));
+              list^.concat(new(paicpu,op_reg_reg(A_MOV,S_L,R_ESP,R_EBP)));
            end;
            end;
        end;
        end;
 
 
@@ -84,14 +84,14 @@ unit cgcpu;
        offset : longint);
        offset : longint);
 
 
        begin
        begin
-          list^.concat(new(pai386,op_sym(A_CALL,S_NO,newasmsymbol(s))));
+          list^.concat(new(paicpu,op_sym(A_CALL,S_NO,newasmsymbol(s))));
           {!!!!!!!!!1 offset is ignored }
           {!!!!!!!!!1 offset is ignored }
        end;
        end;
 
 
      procedure tcg386.a_push_reg(list : paasmoutput;r : tregister);
      procedure tcg386.a_push_reg(list : paasmoutput;r : tregister);
 
 
        begin
        begin
-          list^.concat(new(pai386,op_reg(A_PUSH,regsize(r),r)));
+          list^.concat(new(paicpu,op_reg(A_PUSH,regsize(r),r)));
        end;
        end;
 
 
      procedure tcg386.a_load_const8_ref(list : paasmoutput;b : byte;const ref : treference);
      procedure tcg386.a_load_const8_ref(list : paasmoutput;b : byte;const ref : treference);
@@ -121,7 +121,7 @@ unit cgcpu;
      procedure tcg386.g_restore_frame_pointer(list : paasmoutput);
      procedure tcg386.g_restore_frame_pointer(list : paasmoutput);
 
 
        begin
        begin
-          list^.concat(new(pai386,op_none(A_LEAVE,S_NO)));
+          list^.concat(new(paicpu,op_none(A_LEAVE,S_NO)));
        end;
        end;
 
 
      procedure tcg386.g_ret_from_proc(list : paasmoutput;para size : aword);
      procedure tcg386.g_ret_from_proc(list : paasmoutput;para size : aword);
@@ -134,15 +134,18 @@ unit cgcpu;
           { Routines with the poclearstack flag set use only a ret.}
           { Routines with the poclearstack flag set use only a ret.}
           { also routines with parasize=0     }
           { also routines with parasize=0     }
           if (parasize=0) or (pocall_clearstack in aktprocsym^.definition^.proccalloptions) then
           if (parasize=0) or (pocall_clearstack in aktprocsym^.definition^.proccalloptions) then
-            list^.concat(new(pai386,op_none(A_RET,S_NO)))
+            list^.concat(new(paicpu,op_none(A_RET,S_NO)))
           else
           else
-            list^.concat(new(pai386,op_const(A_RET,S_NO,parasize)));
+            list^.concat(new(paicpu,op_const(A_RET,S_NO,parasize)));
        end;
        end;
 
 
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.4  1999-08-06 14:15:56  florian
+  Revision 1.5  1999-08-25 12:00:21  jonas
+    * changed pai386, paippc and paiapha (same for tai*) to paicpu (taicpu)
+
+  Revision 1.4  1999/08/06 14:15:56  florian
     * made the alpha version compilable
     * made the alpha version compilable
 
 
   Revision 1.3  1999/08/06 13:26:54  florian
   Revision 1.3  1999/08/06 13:26:54  florian

+ 34 - 31
compiler/new/nmem.pas

@@ -149,7 +149,7 @@ unit nmem;
                       begin
                       begin
                          hregister:=tg.getregisterint;
                          hregister:=tg.getregisterint;
                          location.reference.symbol:=newasmsymbol(symtableentry^.mangledname);
                          location.reference.symbol:=newasmsymbol(symtableentry^.mangledname);
-                         exprasmlist^.concat(new(pai386,op_ref_reg(A_MOV,S_L,newreference(location.reference),hregister)));
+                         exprasmlist^.concat(new(paicpu,op_ref_reg(A_MOV,S_L,newreference(location.reference),hregister)));
                          location.reference.symbol:=nil;
                          location.reference.symbol:=nil;
                          location.reference.base:=hregister;
                          location.reference.base:=hregister;
                       end
                       end
@@ -193,7 +193,7 @@ unit nmem;
                                           procinfo.framepointer_offset);
                                           procinfo.framepointer_offset);
 
 
 
 
-                                        exprasmlist^.concat(new(pai386,op_ref_reg(A_MOV,S_L,hp,hregister)));
+                                        exprasmlist^.concat(new(paicpu,op_ref_reg(A_MOV,S_L,hp,hregister)));
 
 
                                         simple_loadn:=false;
                                         simple_loadn:=false;
                                         i:=lexlevel-1;
                                         i:=lexlevel-1;
@@ -201,7 +201,7 @@ unit nmem;
                                           begin
                                           begin
                                              { make a reference }
                                              { make a reference }
                                              hp:=new_reference(hregister,8);
                                              hp:=new_reference(hregister,8);
-                                             exprasmlist^.concat(new(pai386,op_ref_reg(A_MOV,S_L,hp,hregister)));
+                                             exprasmlist^.concat(new(paicpu,op_ref_reg(A_MOV,S_L,hp,hregister)));
                                              dec(i);
                                              dec(i);
                                           end;
                                           end;
                                         location.reference.base:=hregister;
                                         location.reference.base:=hregister;
@@ -241,7 +241,7 @@ unit nmem;
                                         hp:=new_reference(procinfo.framepointer,
                                         hp:=new_reference(procinfo.framepointer,
                                           symtable^.datasize);
                                           symtable^.datasize);
 
 
-                                        exprasmlist^.concat(new(pai386,op_ref_reg(A_MOV,S_L,hp,hregister)));
+                                        exprasmlist^.concat(new(paicpu,op_ref_reg(A_MOV,S_L,hp,hregister)));
 
 
                                         location.reference.offset:=
                                         location.reference.offset:=
                                           pvarsym(symtableentry)^.address;
                                           pvarsym(symtableentry)^.address;
@@ -270,19 +270,19 @@ unit nmem;
                                      begin
                                      begin
                                         highframepointer:=R_EDI;
                                         highframepointer:=R_EDI;
                                         highoffset:=location.reference.offset;
                                         highoffset:=location.reference.offset;
-                                        exprasmlist^.concat(new(pai386,op_reg_reg(A_MOV,S_L,
+                                        exprasmlist^.concat(new(paicpu,op_reg_reg(A_MOV,S_L,
                                           location.reference.base,R_EDI)));
                                           location.reference.base,R_EDI)));
                                      end;
                                      end;
                                 end;
                                 end;
                               if location.loc=LOC_CREGISTER then
                               if location.loc=LOC_CREGISTER then
                                 begin
                                 begin
-                                   exprasmlist^.concat(new(pai386,op_reg_reg(A_MOV,S_L,
+                                   exprasmlist^.concat(new(paicpu,op_reg_reg(A_MOV,S_L,
                                      location.register,hregister)));
                                      location.register,hregister)));
                                    location.loc:=LOC_REFERENCE;
                                    location.loc:=LOC_REFERENCE;
                                 end
                                 end
                               else
                               else
                                 begin
                                 begin
-                                   exprasmlist^.concat(new(pai386,op_ref_reg(A_MOV,S_L,
+                                   exprasmlist^.concat(new(paicpu,op_ref_reg(A_MOV,S_L,
                                      newreference(location.reference),
                                      newreference(location.reference),
                                      hregister)));
                                      hregister)));
                                 end;
                                 end;
@@ -475,14 +475,14 @@ unit nmem;
                               end;
                               end;
                               if loc=LOC_CREGISTER then
                               if loc=LOC_CREGISTER then
                                 begin
                                 begin
-                                  exprasmlist^.concat(new(pai386,op_ref_reg(A_MOV,opsize,
+                                  exprasmlist^.concat(new(paicpu,op_ref_reg(A_MOV,opsize,
                                     newreference(p^.right^.location.reference),
                                     newreference(p^.right^.location.reference),
                                     p^.left^.location.register)));
                                     p^.left^.location.register)));
                                   if is_64bitint(p^.right^.resulttype) then
                                   if is_64bitint(p^.right^.resulttype) then
                                     begin
                                     begin
                                        r:=newreference(p^.right^.location.reference);
                                        r:=newreference(p^.right^.location.reference);
                                        inc(r^.offset,4);
                                        inc(r^.offset,4);
-                                       exprasmlist^.concat(new(pai386,op_ref_reg(A_MOV,opsize,r,
+                                       exprasmlist^.concat(new(paicpu,op_ref_reg(A_MOV,opsize,r,
                                          p^.left^.location.registerhigh)));
                                          p^.left^.location.registerhigh)));
                                     end;
                                     end;
 {$IfDef regallocfix}
 {$IfDef regallocfix}
@@ -491,20 +491,20 @@ unit nmem;
                                 end
                                 end
                               else
                               else
                                 begin
                                 begin
-                                  exprasmlist^.concat(new(pai386,op_const_ref(A_MOV,opsize,
+                                  exprasmlist^.concat(new(paicpu,op_const_ref(A_MOV,opsize,
                                     p^.right^.location.reference.offset,
                                     p^.right^.location.reference.offset,
                                     newreference(p^.left^.location.reference))));
                                     newreference(p^.left^.location.reference))));
                                   if is_64bitint(p^.right^.resulttype) then
                                   if is_64bitint(p^.right^.resulttype) then
                                     begin
                                     begin
                                        r:=newreference(p^.left^.location.reference);
                                        r:=newreference(p^.left^.location.reference);
                                        inc(r^.offset,4);
                                        inc(r^.offset,4);
-                                       exprasmlist^.concat(new(pai386,op_const_ref(A_MOV,opsize,
+                                       exprasmlist^.concat(new(paicpu,op_const_ref(A_MOV,opsize,
                                          0,r)));
                                          0,r)));
                                     end;
                                     end;
 {$IfDef regallocfix}
 {$IfDef regallocfix}
                                   del_reference(p^.left^.location.reference);
                                   del_reference(p^.left^.location.reference);
 {$EndIf regallocfix}
 {$EndIf regallocfix}
-                                {exprasmlist^.concat(new(pai386,op_const_loc(A_MOV,opsize,
+                                {exprasmlist^.concat(new(paicpu,op_const_loc(A_MOV,opsize,
                                     p^.right^.location.reference.offset,
                                     p^.right^.location.reference.offset,
                                     p^.left^.location)));}
                                     p^.left^.location)));}
                                 end;
                                 end;
@@ -513,9 +513,9 @@ unit nmem;
                          else if loc=LOC_CFPUREGISTER then
                          else if loc=LOC_CFPUREGISTER then
                            begin
                            begin
                               floatloadops(pfloatdef(p^.right^.resulttype)^.typ,op,opsize);
                               floatloadops(pfloatdef(p^.right^.resulttype)^.typ,op,opsize);
-                              exprasmlist^.concat(new(pai386,op_ref(op,opsize,
+                              exprasmlist^.concat(new(paicpu,op_ref(op,opsize,
                                 newreference(p^.right^.location.reference))));
                                 newreference(p^.right^.location.reference))));
-                              exprasmlist^.concat(new(pai386,op_reg(A_FSTP,S_NO,
+                              exprasmlist^.concat(new(paicpu,op_reg(A_FSTP,S_NO,
                                 correct_fpuregister(p^.left^.location.register,fpuvaroffset+1))));
                                 correct_fpuregister(p^.left^.location.register,fpuvaroffset+1))));
                            end
                            end
                          else
                          else
@@ -553,10 +553,10 @@ unit nmem;
             LOC_MMXREGISTER:
             LOC_MMXREGISTER:
               begin
               begin
                  if loc=LOC_CMMXREGISTER then
                  if loc=LOC_CMMXREGISTER then
-                   exprasmlist^.concat(new(pai386,op_reg_reg(A_MOVQ,S_NO,
+                   exprasmlist^.concat(new(paicpu,op_reg_reg(A_MOVQ,S_NO,
                    p^.right^.location.register,p^.left^.location.register)))
                    p^.right^.location.register,p^.left^.location.register)))
                  else
                  else
-                   exprasmlist^.concat(new(pai386,op_reg_ref(A_MOVQ,S_NO,
+                   exprasmlist^.concat(new(paicpu,op_reg_ref(A_MOVQ,S_NO,
                      p^.right^.location.register,newreference(p^.left^.location.reference))));
                      p^.right^.location.register,newreference(p^.left^.location.reference))));
               end;
               end;
 {$endif SUPPORT_MMX}
 {$endif SUPPORT_MMX}
@@ -571,7 +571,7 @@ unit nmem;
                               { simplified with op_reg_loc       }
                               { simplified with op_reg_loc       }
                               if loc=LOC_CREGISTER then
                               if loc=LOC_CREGISTER then
                                 begin
                                 begin
-                                  exprasmlist^.concat(new(pai386,op_reg_reg(A_MOV,opsize,
+                                  exprasmlist^.concat(new(paicpu,op_reg_reg(A_MOV,opsize,
                                     p^.right^.location.register,
                                     p^.right^.location.register,
                                     p^.left^.location.register)));
                                     p^.left^.location.register)));
 {$IfDef regallocfix}
 {$IfDef regallocfix}
@@ -580,7 +580,7 @@ unit nmem;
                                 end
                                 end
                               else
                               else
                                 Begin
                                 Begin
-                                  exprasmlist^.concat(new(pai386,op_reg_ref(A_MOV,opsize,
+                                  exprasmlist^.concat(new(paicpu,op_reg_ref(A_MOV,opsize,
                                     p^.right^.location.register,
                                     p^.right^.location.register,
                                     newreference(p^.left^.location.reference))));
                                     newreference(p^.left^.location.reference))));
 {$IfDef regallocfix}
 {$IfDef regallocfix}
@@ -592,18 +592,18 @@ unit nmem;
                                 begin
                                 begin
                                    { simplified with op_reg_loc  }
                                    { simplified with op_reg_loc  }
                                    if loc=LOC_CREGISTER then
                                    if loc=LOC_CREGISTER then
-                                     exprasmlist^.concat(new(pai386,op_reg_reg(A_MOV,opsize,
+                                     exprasmlist^.concat(new(paicpu,op_reg_reg(A_MOV,opsize,
                                        p^.right^.location.registerhigh,
                                        p^.right^.location.registerhigh,
                                        p^.left^.location.registerhigh)))
                                        p^.left^.location.registerhigh)))
                                    else
                                    else
                                      begin
                                      begin
                                         r:=newreference(p^.left^.location.reference);
                                         r:=newreference(p^.left^.location.reference);
                                         inc(r^.offset,4);
                                         inc(r^.offset,4);
-                                        exprasmlist^.concat(new(pai386,op_reg_ref(A_MOV,opsize,
+                                        exprasmlist^.concat(new(paicpu,op_reg_ref(A_MOV,opsize,
                                           p^.right^.location.registerhigh,r)));
                                           p^.right^.location.registerhigh,r)));
                                      end;
                                      end;
                                 end;
                                 end;
-                              {exprasmlist^.concat(new(pai386,op_reg_loc(A_MOV,opsize,
+                              {exprasmlist^.concat(new(paicpu,op_reg_loc(A_MOV,opsize,
                                   p^.right^.location.register,
                                   p^.right^.location.register,
                                   p^.left^.location)));      }
                                   p^.left^.location)));      }
 
 
@@ -623,7 +623,7 @@ unit nmem;
                               case loc of
                               case loc of
                                  LOC_CFPUREGISTER:
                                  LOC_CFPUREGISTER:
                                    begin
                                    begin
-                                      exprasmlist^.concat(new(pai386,op_reg(A_FSTP,S_NO,
+                                      exprasmlist^.concat(new(paicpu,op_reg(A_FSTP,S_NO,
                                         correct_fpuregister(p^.left^.location.register,fpuvaroffset))));
                                         correct_fpuregister(p^.left^.location.register,fpuvaroffset))));
                                       dec(fpuvaroffset);
                                       dec(fpuvaroffset);
                                    end;
                                    end;
@@ -645,13 +645,13 @@ unit nmem;
                                 fputyp:=pfloatdef(p^.right^.left^.resulttype)^.typ
                                 fputyp:=pfloatdef(p^.right^.left^.resulttype)^.typ
                               else
                               else
                                 fputyp:=s32real;
                                 fputyp:=s32real;
-                              exprasmlist^.concat(new(pai386,op_reg(A_FLD,S_NO,
+                              exprasmlist^.concat(new(paicpu,op_reg(A_FLD,S_NO,
                                 correct_fpuregister(p^.right^.location.register,fpuvaroffset))));
                                 correct_fpuregister(p^.right^.location.register,fpuvaroffset))));
                               inc(fpuvaroffset);
                               inc(fpuvaroffset);
                               case loc of
                               case loc of
                                  LOC_CFPUREGISTER:
                                  LOC_CFPUREGISTER:
                                    begin
                                    begin
-                                      exprasmlist^.concat(new(pai386,op_reg(A_FSTP,S_NO,
+                                      exprasmlist^.concat(new(paicpu,op_reg(A_FSTP,S_NO,
                                         correct_fpuregister(p^.right^.location.register,fpuvaroffset))));
                                         correct_fpuregister(p^.right^.location.register,fpuvaroffset))));
                                       dec(fpuvaroffset);
                                       dec(fpuvaroffset);
                                    end;
                                    end;
@@ -665,22 +665,22 @@ unit nmem;
                               getlabel(hlabel);
                               getlabel(hlabel);
                               emitlab(truelabel);
                               emitlab(truelabel);
                               if loc=LOC_CREGISTER then
                               if loc=LOC_CREGISTER then
-                                exprasmlist^.concat(new(pai386,op_const_reg(A_MOV,S_B,
+                                exprasmlist^.concat(new(paicpu,op_const_reg(A_MOV,S_B,
                                   1,p^.left^.location.register)))
                                   1,p^.left^.location.register)))
                               else
                               else
-                                exprasmlist^.concat(new(pai386,op_const_ref(A_MOV,S_B,
+                                exprasmlist^.concat(new(paicpu,op_const_ref(A_MOV,S_B,
                                   1,newreference(p^.left^.location.reference))));
                                   1,newreference(p^.left^.location.reference))));
-                              {exprasmlist^.concat(new(pai386,op_const_loc(A_MOV,S_B,
+                              {exprasmlist^.concat(new(paicpu,op_const_loc(A_MOV,S_B,
                                   1,p^.left^.location)));}
                                   1,p^.left^.location)));}
                               emitjmp(C_None,hlabel);
                               emitjmp(C_None,hlabel);
                               emitlab(falselabel);
                               emitlab(falselabel);
                               if loc=LOC_CREGISTER then
                               if loc=LOC_CREGISTER then
-                                exprasmlist^.concat(new(pai386,op_reg_reg(A_XOR,S_B,
+                                exprasmlist^.concat(new(paicpu,op_reg_reg(A_XOR,S_B,
                                   p^.left^.location.register,
                                   p^.left^.location.register,
                                   p^.left^.location.register)))
                                   p^.left^.location.register)))
                               else
                               else
                                 begin
                                 begin
-                                  exprasmlist^.concat(new(pai386,op_const_ref(A_MOV,S_B,
+                                  exprasmlist^.concat(new(paicpu,op_const_ref(A_MOV,S_B,
                                     0,newreference(p^.left^.location.reference))));
                                     0,newreference(p^.left^.location.reference))));
 {$IfDef regallocfix}
 {$IfDef regallocfix}
                                   del_reference(p^.left^.location.reference);
                                   del_reference(p^.left^.location.reference);
@@ -693,7 +693,7 @@ unit nmem;
                                 emit_flag2reg(p^.right^.location.resflags,p^.left^.location.register)
                                 emit_flag2reg(p^.right^.location.resflags,p^.left^.location.register)
                               else
                               else
                                 begin
                                 begin
-                                  ai:=new(pai386,op_ref(A_Setcc,S_B,newreference(p^.left^.location.reference)));
+                                  ai:=new(paicpu,op_ref(A_Setcc,S_B,newreference(p^.left^.location.reference)));
                                   ai^.SetCondition(flag_2_cond[p^.right^.location.resflags]);
                                   ai^.SetCondition(flag_2_cond[p^.right^.location.resflags]);
                                   exprasmlist^.concat(ai);
                                   exprasmlist^.concat(ai);
                                 end;
                                 end;
@@ -709,7 +709,10 @@ unit nmem;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.10  1999-08-18 17:05:56  florian
+  Revision 1.11  1999-08-25 12:00:12  jonas
+    * changed pai386, paippc and paiapha (same for tai*) to paicpu (taicpu)
+
+  Revision 1.10  1999/08/18 17:05:56  florian
     + implemented initilizing of data for the new code generator
     + implemented initilizing of data for the new code generator
       so it should compile now simple programs
       so it should compile now simple programs
 
 

+ 5 - 2
compiler/new/pass_2.pas

@@ -416,7 +416,7 @@ implementation
                                        hr^.offset:=pvarsym(regvars[i])^.address+procinfo.call_offset;
                                        hr^.offset:=pvarsym(regvars[i])^.address+procinfo.call_offset;
                                        hr^.base:=procinfo.framepointer;
                                        hr^.base:=procinfo.framepointer;
 {$ifdef i386}
 {$ifdef i386}
-                                       procinfo.aktentrycode^.concat(new(pai386,op_ref_reg(A_MOV,regsize,
+                                       procinfo.aktentrycode^.concat(new(paicpu,op_ref_reg(A_MOV,regsize,
                                          hr,regvars[i]^.reg)));
                                          hr,regvars[i]^.reg)));
 {$endif i386}
 {$endif i386}
 {$ifdef m68k}
 {$ifdef m68k}
@@ -464,7 +464,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.6  1999-08-05 14:58:15  florian
+  Revision 1.7  1999-08-25 12:00:13  jonas
+    * changed pai386, paippc and paiapha (same for tai*) to paicpu (taicpu)
+
+  Revision 1.6  1999/08/05 14:58:15  florian
     * some fixes for the floating point registers
     * some fixes for the floating point registers
     * more things for the new code generator
     * more things for the new code generator
 
 

+ 13 - 10
compiler/new/powerpc/agas.pas

@@ -445,33 +445,33 @@ unit agas;
            ait_instruction :
            ait_instruction :
              begin
              begin
 
 
-               op:=pai386(hp)^.opcode;
+               op:=paicpu(hp)^.opcode;
                calljmp:=is_calljmp(op);
                calljmp:=is_calljmp(op);
              { call maybe not translated to calll }
              { call maybe not translated to calll }
-               s:=#9+att_op2str[op]+cond2str[pai386(hp)^.condition];
+               s:=#9+att_op2str[op]+cond2str[paicpu(hp)^.condition];
                if (not calljmp) and
                if (not calljmp) and
                   (not att_nosuffix[op]) and
                   (not att_nosuffix[op]) and
                   not(
                   not(
-                   (pai386(hp)^.oper[0].typ=top_reg) and
-                   (pai386(hp)^.oper[0].reg in [R_ST..R_ST7])
+                   (paicpu(hp)^.oper[0].typ=top_reg) and
+                   (paicpu(hp)^.oper[0].reg in [R_ST..R_ST7])
                   ) then
                   ) then
-                s:=s+att_opsize2str[pai386(hp)^.opsize];
+                s:=s+att_opsize2str[paicpu(hp)^.opsize];
              { process operands }
              { process operands }
-               if pai386(hp)^.ops<>0 then
+               if paicpu(hp)^.ops<>0 then
                 begin
                 begin
                 { call and jmp need an extra handling                          }
                 { call and jmp need an extra handling                          }
                 { this code is only called if jmp isn't a labeled instruction }
                 { this code is only called if jmp isn't a labeled instruction }
                   if calljmp then
                   if calljmp then
-                   s:=s+#9+getopstr_jmp(pai386(hp)^.oper[0])
+                   s:=s+#9+getopstr_jmp(paicpu(hp)^.oper[0])
                   else
                   else
                    begin
                    begin
-                     for i:=0to pai386(hp)^.ops-1 do
+                     for i:=0to paicpu(hp)^.ops-1 do
                       begin
                       begin
                         if i=0 then
                         if i=0 then
                          sep:=#9
                          sep:=#9
                         else
                         else
                          sep:=',';
                          sep:=',';
-                        s:=s+sep+getopstr(pai386(hp)^.oper[i])
+                        s:=s+sep+getopstr(paicpu(hp)^.oper[i])
                       end;
                       end;
                    end;
                    end;
                 end;
                 end;
@@ -617,7 +617,10 @@ unit agas;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.1  1999-08-03 23:37:52  jonas
+  Revision 1.2  1999-08-25 12:00:22  jonas
+    * changed pai386, paippc and paiapha (same for tai*) to paicpu (taicpu)
+
+  Revision 1.1  1999/08/03 23:37:52  jonas
     + initial implementation for PowerPC based on the Alpha stuff
     + initial implementation for PowerPC based on the Alpha stuff
 
 
 }
 }

+ 33 - 30
compiler/new/powerpc/cgcpu.pas

@@ -86,10 +86,10 @@ const
       begin
       begin
  { save our RTOC register value. Only necessary when doing pointer based    }
  { save our RTOC register value. Only necessary when doing pointer based    }
  { calls or cross TOC calls, but currently done always                      }
  { calls or cross TOC calls, but currently done always                      }
-         list^.concat(new(paippc,op_reg_ref(A_STW,R_RTOC,
+         list^.concat(new(paicpu,op_reg_ref(A_STW,R_RTOC,
            new_reference(stack_pointer,LA_RTOC))));
            new_reference(stack_pointer,LA_RTOC))));
-         list^.concat(new(paippc,op_sym(A_BL,newasmsymbol(s))));
-         list^.concat(new(paippc,op_reg_ref(A_LWZ,R_RTOC,
+         list^.concat(new(paicpu,op_sym(A_BL,newasmsymbol(s))));
+         list^.concat(new(paicpu,op_reg_ref(A_LWZ,R_RTOC,
            new_reference(stack_pointer,LA_RTOC))));
            new_reference(stack_pointer,LA_RTOC))));
       end;
       end;
 
 
@@ -100,12 +100,12 @@ const
        begin
        begin
           If (a and $ffff) <> 0 Then
           If (a and $ffff) <> 0 Then
             Begin
             Begin
-              list^.concat(new(paippc,op_reg_const(A_LI,reg,a and $ffff)));
+              list^.concat(new(paicpu,op_reg_const(A_LI,reg,a and $ffff)));
               If (a shr 16) <> 0 Then
               If (a shr 16) <> 0 Then
-                list^.concat(new(paippc,op_reg_const(A_ORIS,reg,a shr 16)))
+                list^.concat(new(paicpu,op_reg_const(A_ORIS,reg,a shr 16)))
             End
             End
           Else
           Else
-            list^.concat(new(paippc,op_reg_const(A_LIS,reg,a shr 16)));
+            list^.concat(new(paicpu,op_reg_const(A_LIS,reg,a shr 16)));
        end;
        end;
 
 
        procedure tcgppc.a_load_reg_ref(list : paasmoutput; size: TCGSize; reg : tregister;const ref2 : treference);
        procedure tcgppc.a_load_reg_ref(list : paasmoutput; size: TCGSize; reg : tregister;const ref2 : treference);
@@ -123,7 +123,7 @@ const
              OS_32: op := A_STW;
              OS_32: op := A_STW;
              Else InternalError(68993)
              Else InternalError(68993)
            End;
            End;
-           list^.concat(new(paippc,op_reg_ref(op,reg,newreference(ref))));
+           list^.concat(new(paicpu,op_reg_ref(op,reg,newreference(ref))));
          End;
          End;
 
 
      procedure tcgppc.a_load_ref_reg(list : paasmoutput;size : tcgsize;const ref2: treference;reg : tregister);
      procedure tcgppc.a_load_ref_reg(list : paasmoutput;size : tcgsize;const ref2: treference;reg : tregister);
@@ -141,13 +141,13 @@ const
            OS_32: op := A_LWZ
            OS_32: op := A_LWZ
            Else InternalError(68994)
            Else InternalError(68994)
          End;
          End;
-         list^.concat(new(paippc,op_reg_ref(op,reg,newreference(ref))));
+         list^.concat(new(paicpu,op_reg_ref(op,reg,newreference(ref))));
        end;
        end;
 
 
      procedure tcgppc.a_load_reg_reg(list : paasmoutput;size : tcgsize;reg1,reg2 : tregister);
      procedure tcgppc.a_load_reg_reg(list : paasmoutput;size : tcgsize;reg1,reg2 : tregister);
 
 
        begin
        begin
-         list^.concat(new(paippc,op_reg_reg(A_MR,reg2,reg1)));
+         list^.concat(new(paicpu,op_reg_reg(A_MR,reg2,reg1)));
        end;
        end;
 
 
      procedure tcgppc.a_op_reg_const(list : paasmoutput; Op: TOpCG; size: TCGSize; reg: TRegister; a: AWord);
      procedure tcgppc.a_op_reg_const(list : paasmoutput; Op: TOpCG; size: TCGSize; reg: TRegister; a: AWord);
@@ -159,12 +159,12 @@ const
            OP_DIV, OP_IDIV, OP_IMUL, OP_MUL:
            OP_DIV, OP_IDIV, OP_IMUL, OP_MUL:
              If (Op = OP_IMUL) And (longint(a) >= -32768) And
              If (Op = OP_IMUL) And (longint(a) >= -32768) And
                 (longint(a) <= 32767) Then
                 (longint(a) <= 32767) Then
-               list^.concat(new(paippc,op_reg_reg_const(A_MULLI,reg,reg,a)))
+               list^.concat(new(paicpu,op_reg_reg_const(A_MULLI,reg,reg,a)))
              Else
              Else
                Begin
                Begin
                  scratch_register := get_scratch_reg(list);
                  scratch_register := get_scratch_reg(list);
                  a_load_const_reg(list, OS_32, a, scratch_register);
                  a_load_const_reg(list, OS_32, a, scratch_register);
-                 list^.concat(new(paippc,op_reg_reg_reg(TOpCG2AsmOpLo[Op],
+                 list^.concat(new(paicpu,op_reg_reg_reg(TOpCG2AsmOpLo[Op],
                    reg,reg,scratch_register)));
                    reg,reg,scratch_register)));
                  free_scratch_reg(list,scratch_register);
                  free_scratch_reg(list,scratch_register);
                End;
                End;
@@ -174,7 +174,7 @@ const
            OP_SHL,OP_SHR,OP_SAR:
            OP_SHL,OP_SHR,OP_SAR:
              Begin
              Begin
                if (a and $ffff) <> 0 Then
                if (a and $ffff) <> 0 Then
-                 list^.concat(new(paippc,op_reg_reg_const(
+                 list^.concat(new(paicpu,op_reg_reg_const(
                    TOpCG2AsmOpLo[Op],reg,reg,a and $ffff)));
                    TOpCG2AsmOpLo[Op],reg,reg,a and $ffff)));
                If (a shr 16) <> 0 Then
                If (a shr 16) <> 0 Then
                  InternalError(68991);
                  InternalError(68991);
@@ -197,26 +197,26 @@ const
           signed := cmp_op in [OC_GT,OC_LT,OC_GTE,OC_LTE];
           signed := cmp_op in [OC_GT,OC_LT,OC_GTE,OC_LTE];
           If signed Then
           If signed Then
             If (longint(a) >= -32768) and (longint(a) <= 32767) Then
             If (longint(a) >= -32768) and (longint(a) <= 32767) Then
-              list^.concat(new(paippc,op_const_reg_const(A_CMPI,0,reg,a)))
+              list^.concat(new(paicpu,op_const_reg_const(A_CMPI,0,reg,a)))
             else
             else
               begin
               begin
                 scratch_register := get_scratch_reg(list);
                 scratch_register := get_scratch_reg(list);
                 a_load_const_reg(list,OS_32,a,scratch_register);
                 a_load_const_reg(list,OS_32,a,scratch_register);
-                list^.concat(new(paippc,op_const_reg_reg(A_CMP,0,reg,scratch_register)));
+                list^.concat(new(paicpu,op_const_reg_reg(A_CMP,0,reg,scratch_register)));
                 free_scratch_reg(list,scratch_register);
                 free_scratch_reg(list,scratch_register);
              end
              end
            else
            else
              if (a <= $ffff) then
              if (a <= $ffff) then
-              list^.concat(new(paippc,op_const_reg_const(A_CMPLI,0,reg,a)))
+              list^.concat(new(paicpu,op_const_reg_const(A_CMPLI,0,reg,a)))
             else
             else
               begin
               begin
                 scratch_register := get_scratch_reg(list);
                 scratch_register := get_scratch_reg(list);
                 a_load_const_reg(list,OS_32,a,scratch_register);
                 a_load_const_reg(list,OS_32,a,scratch_register);
-                list^.concat(new(paippc,op_const_reg_reg(A_CMPL,0,reg,scratch_register)));
+                list^.concat(new(paicpu,op_const_reg_reg(A_CMPL,0,reg,scratch_register)));
                 free_scratch_reg(list,scratch_register);
                 free_scratch_reg(list,scratch_register);
              end;
              end;
            AsmCond := TOpCmp2AsmCond[cmp_op];
            AsmCond := TOpCmp2AsmCond[cmp_op];
-           list^.concat(new(paippc,op_const_const_sym(A_BC,AsmCond2BO[AsmCond],
+           list^.concat(new(paicpu,op_const_const_sym(A_BC,AsmCond2BO[AsmCond],
              AsmCond2BI[AsmCond],newasmsymbol(l^.name))));
              AsmCond2BI[AsmCond],newasmsymbol(l^.name))));
         end;
         end;
 
 
@@ -227,9 +227,9 @@ const
       var AsmCond: TAsmCond;
       var AsmCond: TAsmCond;
 
 
       begin
       begin
-        list^.concat(new(paippc,op_const_reg_reg(A_CMPL,0,reg1,reg2)));
+        list^.concat(new(paicpu,op_const_reg_reg(A_CMPL,0,reg1,reg2)));
         AsmCond := TOpCmp2AsmCond[cmp_op];
         AsmCond := TOpCmp2AsmCond[cmp_op];
-        list^.concat(new(paippc,op_const_const_sym(A_BC,AsmCond2BO[AsmCond],
+        list^.concat(new(paicpu,op_const_const_sym(A_BC,AsmCond2BO[AsmCond],
           AsmCond2BI[AsmCond],newasmsymbol(l^.name))));
           AsmCond2BI[AsmCond],newasmsymbol(l^.name))));
       end;
       end;
 {
 {
@@ -272,8 +272,8 @@ const
            else a_load_const_reg(list, OS_32, ref.offset, r)
            else a_load_const_reg(list, OS_32, ref.offset, r)
          else
          else
            if ref.index <> R_NO Then
            if ref.index <> R_NO Then
-             list^.concat(new(paippc,op_reg_reg_reg(A_ADD,r,ref.base,ref.index)))
-           else list^.concat(new(paippc,op_reg_reg(A_MR,r,ref.base)))
+             list^.concat(new(paicpu,op_reg_reg_reg(A_ADD,r,ref.base,ref.index)))
+           else list^.concat(new(paicpu,op_reg_reg(A_MR,r,ref.base)))
        end;
        end;
 
 
 { *********** entry/exit code and address loading ************ }
 { *********** entry/exit code and address loading ************ }
@@ -290,14 +290,14 @@ const
  { CR and LR only have to be saved in case they are modified by the current }
  { CR and LR only have to be saved in case they are modified by the current }
  { procedure, but currently this isn't checked, so save them always         }
  { procedure, but currently this isn't checked, so save them always         }
         scratch_register := get_scratch_reg(list);
         scratch_register := get_scratch_reg(list);
-        list^.concat(new(paippc,op_reg(A_MFCR,scratch_register)));
-        list^.concat(new(paippc,op_reg_ref(A_STW,scratch_register,
+        list^.concat(new(paicpu,op_reg(A_MFCR,scratch_register)));
+        list^.concat(new(paicpu,op_reg_ref(A_STW,scratch_register,
           new_reference(stack_pointer,LA_CR))));
           new_reference(stack_pointer,LA_CR))));
         free_scratch_reg(list,scratch_register);
         free_scratch_reg(list,scratch_register);
         scratch_register := get_scratch_reg(list);
         scratch_register := get_scratch_reg(list);
-        list^.concat(new(paippc,op_reg_reg(A_MFSPR,scratch_register,
+        list^.concat(new(paicpu,op_reg_reg(A_MFSPR,scratch_register,
           R_LR)));
           R_LR)));
-        list^.concat(new(paippc,op_reg_ref(A_STW,scratch_register,
+        list^.concat(new(paicpu,op_reg_ref(A_STW,scratch_register,
           new_reference(stack_pointer,LA_LR))));
           new_reference(stack_pointer,LA_LR))));
         free_scratch_reg(list,scratch_register);
         free_scratch_reg(list,scratch_register);
 { if the current procedure is a leaf procedure, we can use the Red Zone,    }
 { if the current procedure is a leaf procedure, we can use the Red Zone,    }
@@ -309,14 +309,14 @@ const
  { allocate space for the local variable, parameter and linkage area and   }
  { allocate space for the local variable, parameter and linkage area and   }
  { save the stack pointer at the end of the linkage area                   }
  { save the stack pointer at the end of the linkage area                   }
                  if localsize <= $ffff Then
                  if localsize <= $ffff Then
-                   list^.concat(new(paippc,op_reg_ref
+                   list^.concat(new(paicpu,op_reg_ref
                      (A_STWU,stack_pointer, new_reference(stack_pointer,localsize+
                      (A_STWU,stack_pointer, new_reference(stack_pointer,localsize+
                       LinkageAreaSize))))
                       LinkageAreaSize))))
                  else
                  else
                    Begin
                    Begin
                      scratch_register := get_scratch_reg(list);
                      scratch_register := get_scratch_reg(list);
                      a_load_const_reg(list,OS_32,localsize,scratch_register);
                      a_load_const_reg(list,OS_32,localsize,scratch_register);
-                     list^.concat(new(paippc,op_reg_reg_reg(A_STWUX,stack_pointer,
+                     list^.concat(new(paicpu,op_reg_reg_reg(A_STWUX,stack_pointer,
                        stack_pointer,scratch_register)));
                        stack_pointer,scratch_register)));
                      free_scratch_reg(list,scratch_register);
                      free_scratch_reg(list,scratch_register);
                   End;
                   End;
@@ -358,15 +358,18 @@ const
 
 
      Begin
      Begin
        if (a and $ffff) <> 0 Then
        if (a and $ffff) <> 0 Then
-         list^.concat(new(paippc,op_reg_reg_const(OpLo,reg1,reg2,a and $ffff)));
+         list^.concat(new(paicpu,op_reg_reg_const(OpLo,reg1,reg2,a and $ffff)));
        If (a shr 16) <> 0 Then
        If (a shr 16) <> 0 Then
-         list^.concat(new(paippc,op_reg_reg_const(OpHi,reg1,reg2,a shr 16)))
+         list^.concat(new(paicpu,op_reg_reg_const(OpHi,reg1,reg2,a shr 16)))
      End;
      End;
 
 
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.2  1999-08-18 17:05:57  florian
+  Revision 1.3  1999-08-25 12:00:23  jonas
+    * changed pai386, paippc and paiapha (same for tai*) to paicpu (taicpu)
+
+  Revision 1.2  1999/08/18 17:05:57  florian
     + implemented initilizing of data for the new code generator
     + implemented initilizing of data for the new code generator
       so it should compile now simple programs
       so it should compile now simple programs
 
 

+ 33 - 30
compiler/new/powerpc/cpuasm.pas

@@ -31,8 +31,8 @@ uses
 
 
 type
 type
 
 
-  paippc = ^taippc;
-  taippc = object(tainstruction)
+  paicpu = ^taicpu;
+  taicpu = object(tainstruction)
 
 
      constructor op_none(op : tasmop);
      constructor op_none(op : tasmop);
 
 
@@ -80,10 +80,10 @@ type
 implementation
 implementation
 
 
 {*****************************************************************************
 {*****************************************************************************
-                                 taippc Constructors
+                                 taicpu Constructors
 *****************************************************************************}
 *****************************************************************************}
 
 
-    procedure taippc.loadbool(opidx:longint;_b:boolean);
+    procedure taicpu.loadbool(opidx:longint;_b:boolean);
       begin
       begin
         if opidx>=ops then
         if opidx>=ops then
          ops:=opidx+1;
          ops:=opidx+1;
@@ -97,13 +97,13 @@ implementation
       end;
       end;
 
 
 
 
-    constructor taippc.op_none(op : tasmop);
+    constructor taicpu.op_none(op : tasmop);
       begin
       begin
          inherited init(op);
          inherited init(op);
       end;
       end;
 
 
 
 
-    constructor taippc.op_reg(op : tasmop;_op1 : tregister);
+    constructor taicpu.op_reg(op : tasmop;_op1 : tregister);
       begin
       begin
          inherited init(op);
          inherited init(op);
          ops:=1;
          ops:=1;
@@ -111,7 +111,7 @@ implementation
       end;
       end;
 
 
 
 
-    constructor taippc.op_const(op : tasmop;_op1 : longint);
+    constructor taicpu.op_const(op : tasmop;_op1 : longint);
       begin
       begin
          inherited init(op);
          inherited init(op);
          ops:=1;
          ops:=1;
@@ -119,7 +119,7 @@ implementation
       end;
       end;
 
 
 
 
-    constructor taippc.op_reg_reg(op : tasmop;_op1,_op2 : tregister);
+    constructor taicpu.op_reg_reg(op : tasmop;_op1,_op2 : tregister);
       begin
       begin
          inherited init(op);
          inherited init(op);
          ops:=2;
          ops:=2;
@@ -127,7 +127,7 @@ implementation
          loadreg(1,_op2);
          loadreg(1,_op2);
       end;
       end;
 
 
-    constructor taippc.op_reg_const(op:tasmop; _op1: tregister; _op2: longint);
+    constructor taicpu.op_reg_const(op:tasmop; _op1: tregister; _op2: longint);
       begin
       begin
          inherited init(op);
          inherited init(op);
          ops:=2;
          ops:=2;
@@ -135,7 +135,7 @@ implementation
          loadconst(1,_op2);
          loadconst(1,_op2);
       end;
       end;
 
 
-     constructor taippc.op_const_reg(op:tasmop; _op1: longint; _op2: tregister);
+     constructor taicpu.op_const_reg(op:tasmop; _op1: longint; _op2: tregister);
       begin
       begin
          inherited init(op);
          inherited init(op);
          ops:=2;
          ops:=2;
@@ -144,7 +144,7 @@ implementation
       end;
       end;
 
 
 
 
-    constructor taippc.op_reg_ref(op : tasmop;_op1 : tregister;_op2 : preference);
+    constructor taicpu.op_reg_ref(op : tasmop;_op1 : tregister;_op2 : preference);
       begin
       begin
          inherited init(op);
          inherited init(op);
          ops:=2;
          ops:=2;
@@ -153,7 +153,7 @@ implementation
       end;
       end;
 
 
 
 
-    constructor taippc.op_const_const(op : tasmop;_op1,_op2 : longint);
+    constructor taicpu.op_const_const(op : tasmop;_op1,_op2 : longint);
       begin
       begin
          inherited init(op);
          inherited init(op);
          ops:=2;
          ops:=2;
@@ -162,7 +162,7 @@ implementation
       end;
       end;
 
 
 
 
-    constructor taippc.op_reg_reg_reg(op : tasmop;_op1,_op2,_op3 : tregister);
+    constructor taicpu.op_reg_reg_reg(op : tasmop;_op1,_op2,_op3 : tregister);
       begin
       begin
          inherited init(op);
          inherited init(op);
          ops:=3;
          ops:=3;
@@ -171,7 +171,7 @@ implementation
          loadreg(2,_op3);
          loadreg(2,_op3);
       end;
       end;
 
 
-     constructor taippc.op_reg_reg_const(op : tasmop;_op1,_op2 : tregister; _op3: Longint);
+     constructor taicpu.op_reg_reg_const(op : tasmop;_op1,_op2 : tregister; _op3: Longint);
        begin
        begin
          inherited init(op);
          inherited init(op);
          ops:=3;
          ops:=3;
@@ -180,7 +180,7 @@ implementation
          loadconst(2,_op3);
          loadconst(2,_op3);
       end;
       end;
 
 
-     constructor taippc.op_reg_reg_sym_ofs(op : tasmop;_op1,_op2 : tregister; _op3: pasmsymbol;_op3ofs: longint);
+     constructor taicpu.op_reg_reg_sym_ofs(op : tasmop;_op1,_op2 : tregister; _op3: pasmsymbol;_op3ofs: longint);
        begin
        begin
          inherited init(op);
          inherited init(op);
          ops:=3;
          ops:=3;
@@ -189,7 +189,7 @@ implementation
          loadsymbol(0,_op3,_op3ofs);
          loadsymbol(0,_op3,_op3ofs);
       end;
       end;
 
 
-     constructor taippc.op_reg_reg_ref(op : tasmop;_op1,_op2 : tregister;  _op3: preference);
+     constructor taicpu.op_reg_reg_ref(op : tasmop;_op1,_op2 : tregister;  _op3: preference);
        begin
        begin
          inherited init(op);
          inherited init(op);
          ops:=3;
          ops:=3;
@@ -198,7 +198,7 @@ implementation
          loadref(2,_op3);
          loadref(2,_op3);
       end;
       end;
 
 
-    constructor taippc.op_const_reg_reg(op : tasmop;_op1 : longint;_op2, _op3 : tregister);
+    constructor taicpu.op_const_reg_reg(op : tasmop;_op1 : longint;_op2, _op3 : tregister);
       begin
       begin
          inherited init(op);
          inherited init(op);
          ops:=3;
          ops:=3;
@@ -207,7 +207,7 @@ implementation
          loadreg(2,_op3);
          loadreg(2,_op3);
       end;
       end;
 
 
-     constructor taippc.op_const_reg_const(op : tasmop;_op1 : longint;_op2 : tregister;_op3 : longint);
+     constructor taicpu.op_const_reg_const(op : tasmop;_op1 : longint;_op2 : tregister;_op3 : longint);
       begin
       begin
          inherited init(op);
          inherited init(op);
          ops:=3;
          ops:=3;
@@ -217,7 +217,7 @@ implementation
       end;
       end;
 
 
 
 
-     constructor taippc.op_reg_reg_reg_reg(op : tasmop;_op1,_op2,_op3,_op4 : tregister);
+     constructor taicpu.op_reg_reg_reg_reg(op : tasmop;_op1,_op2,_op3,_op4 : tregister);
       begin
       begin
          inherited init(op);
          inherited init(op);
          ops:=4;
          ops:=4;
@@ -227,7 +227,7 @@ implementation
          loadreg(3,_op4);
          loadreg(3,_op4);
       end;
       end;
 
 
-     constructor taippc.op_reg_bool_reg_reg(op : tasmop;_op1: tregister;_op2:boolean;_op3,_op4:tregister);
+     constructor taicpu.op_reg_bool_reg_reg(op : tasmop;_op1: tregister;_op2:boolean;_op3,_op4:tregister);
       begin
       begin
          inherited init(op);
          inherited init(op);
          ops:=4;
          ops:=4;
@@ -237,7 +237,7 @@ implementation
          loadreg(3,_op4);
          loadreg(3,_op4);
       end;
       end;
 
 
-     constructor taippc.op_reg_bool_reg_const(op : tasmop;_op1: tregister;_op2:boolean;_op3:tregister;_op4: longint);
+     constructor taicpu.op_reg_bool_reg_const(op : tasmop;_op1: tregister;_op2:boolean;_op3:tregister;_op4: longint);
       begin
       begin
          inherited init(op);
          inherited init(op);
          ops:=4;
          ops:=4;
@@ -247,7 +247,7 @@ implementation
          loadconst(0,_op4);
          loadconst(0,_op4);
       end;
       end;
 
 
-     constructor taippc.op_reg_reg_const_const_const(op : tasmop;_op1,_op2 : tregister;_op3,_op4,_op5 : Longint);
+     constructor taicpu.op_reg_reg_const_const_const(op : tasmop;_op1,_op2 : tregister;_op3,_op4,_op5 : Longint);
       begin
       begin
          inherited init(op);
          inherited init(op);
          ops:=5;
          ops:=5;
@@ -258,7 +258,7 @@ implementation
          loadconst(4,_op5);
          loadconst(4,_op5);
       end;
       end;
 
 
-    constructor taippc.op_cond_sym(op : tasmop;cond:TAsmCond;_op1 : pasmsymbol);
+    constructor taicpu.op_cond_sym(op : tasmop;cond:TAsmCond;_op1 : pasmsymbol);
       begin
       begin
          inherited init(op);
          inherited init(op);
          condition:=cond;
          condition:=cond;
@@ -266,7 +266,7 @@ implementation
          loadsymbol(0,_op1,0);
          loadsymbol(0,_op1,0);
       end;
       end;
 
 
-     constructor taippc.op_const_const_sym(op : tasmop;_op1,_op2 : longint; _op3: pasmsymbol);
+     constructor taicpu.op_const_const_sym(op : tasmop;_op1,_op2 : longint; _op3: pasmsymbol);
       begin
       begin
          inherited init(op);
          inherited init(op);
          ops:=3;
          ops:=3;
@@ -276,7 +276,7 @@ implementation
       end;
       end;
 
 
 
 
-    constructor taippc.op_sym(op : tasmop;_op1 : pasmsymbol);
+    constructor taicpu.op_sym(op : tasmop;_op1 : pasmsymbol);
       begin
       begin
          inherited init(op);
          inherited init(op);
          ops:=1;
          ops:=1;
@@ -284,7 +284,7 @@ implementation
       end;
       end;
 
 
 
 
-    constructor taippc.op_sym_ofs(op : tasmop;_op1 : pasmsymbol;_op1ofs:longint);
+    constructor taicpu.op_sym_ofs(op : tasmop;_op1 : pasmsymbol;_op1ofs:longint);
       begin
       begin
          inherited init(op);
          inherited init(op);
          ops:=1;
          ops:=1;
@@ -292,7 +292,7 @@ implementation
       end;
       end;
 
 
 
 
-     constructor taippc.op_reg_sym_ofs(op : tasmop;_op1 : tregister;_op2:pasmsymbol;_op2ofs : longint);
+     constructor taicpu.op_reg_sym_ofs(op : tasmop;_op1 : tregister;_op2:pasmsymbol;_op2ofs : longint);
       begin
       begin
          inherited init(op);
          inherited init(op);
          ops:=2;
          ops:=2;
@@ -301,7 +301,7 @@ implementation
       end;
       end;
 
 
 
 
-    constructor taippc.op_sym_ofs_ref(op : tasmop;_op1 : pasmsymbol;_op1ofs:longint;_op2 : preference);
+    constructor taicpu.op_sym_ofs_ref(op : tasmop;_op1 : pasmsymbol;_op1ofs:longint;_op2 : preference);
       begin
       begin
          inherited init(op);
          inherited init(op);
          ops:=2;
          ops:=2;
@@ -309,7 +309,7 @@ implementation
          loadref(1,_op2);
          loadref(1,_op2);
       end;
       end;
 
 
-    destructor taippc.done;
+    destructor taicpu.done;
       var
       var
         i : longint;
         i : longint;
       begin
       begin
@@ -322,7 +322,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.3  1999-08-06 16:41:11  jonas
+  Revision 1.4  1999-08-25 12:00:24  jonas
+    * changed pai386, paippc and paiapha (same for tai*) to paicpu (taicpu)
+
+  Revision 1.3  1999/08/06 16:41:11  jonas
     * PowerPC compiles again, several routines implemented in cgcpu.pas
     * PowerPC compiles again, several routines implemented in cgcpu.pas
     * added constant to cpubase of alpha and powerpc for maximum
     * added constant to cpubase of alpha and powerpc for maximum
       number of operands
       number of operands

+ 9 - 6
compiler/pass_2.pas

@@ -135,10 +135,10 @@ implementation
                   ait_instruction :
                   ait_instruction :
                      begin
                      begin
                        { fixup the references }
                        { fixup the references }
-                       for i:=1 to pai386(hp2)^.ops do
-                        if pai386(hp2)^.oper[i-1].typ=top_ref then
+                       for i:=1 to paicpu(hp2)^.ops do
+                        if paicpu(hp2)^.oper[i-1].typ=top_ref then
                          begin
                          begin
-                           r:=pai386(hp2)^.oper[i-1].ref;
+                           r:=paicpu(hp2)^.oper[i-1].ref;
                            case r^.options of
                            case r^.options of
                              ref_parafixup :
                              ref_parafixup :
                                r^.offsetfixup:=parafixup;
                                r^.offsetfixup:=parafixup;
@@ -547,7 +547,7 @@ implementation
                                        hr^.offset:=pvarsym(regvars[i])^.address+procinfo.call_offset;
                                        hr^.offset:=pvarsym(regvars[i])^.address+procinfo.call_offset;
                                        hr^.base:=procinfo.framepointer;
                                        hr^.base:=procinfo.framepointer;
 {$ifdef i386}
 {$ifdef i386}
-                                       procinfo.aktentrycode^.concat(new(pai386,op_ref_reg(A_MOV,regsize,
+                                       procinfo.aktentrycode^.concat(new(paicpu,op_ref_reg(A_MOV,regsize,
                                          hr,regvars[i]^.reg)));
                                          hr,regvars[i]^.reg)));
 {$endif i386}
 {$endif i386}
 {$ifdef m68k}
 {$ifdef m68k}
@@ -615,7 +615,7 @@ implementation
                                        hr^.offset:=pvarsym(regvars[i])^.address+procinfo.call_offset;
                                        hr^.offset:=pvarsym(regvars[i])^.address+procinfo.call_offset;
                                        hr^.base:=procinfo.framepointer;
                                        hr^.base:=procinfo.framepointer;
 {$ifdef i386}
 {$ifdef i386}
-                                       procinfo.aktentrycode^.concat(new(pai386,op_ref_reg(A_MOV,regsize,
+                                       procinfo.aktentrycode^.concat(new(paicpu,op_ref_reg(A_MOV,regsize,
                                          hr,regvars[i]^.reg)));
                                          hr,regvars[i]^.reg)));
 {$endif i386}
 {$endif i386}
 {$ifdef m68k}
 {$ifdef m68k}
@@ -664,7 +664,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.33  1999-08-24 09:07:04  pierre
+  Revision 1.34  1999-08-25 12:00:01  jonas
+    * changed pai386, paippc and paiapha (same for tai*) to paicpu (taicpu)
+
+  Revision 1.33  1999/08/24 09:07:04  pierre
    * wrong testregisters32 placement corrected
    * wrong testregisters32 placement corrected
 
 
   Revision 1.32  1999/08/23 23:25:59  pierre
   Revision 1.32  1999/08/23 23:25:59  pierre

Файловите разлики са ограничени, защото са твърде много
+ 291 - 291
compiler/popt386.pas


+ 6 - 3
compiler/ra386.pas

@@ -295,7 +295,7 @@ procedure T386Instruction.ConcatInstruction(p : paasmoutput);
 var
 var
   siz  : topsize;
   siz  : topsize;
   i    : longint;
   i    : longint;
-  ai   : pai386;
+  ai   : paicpu;
 begin
 begin
 { Get Opsize }
 { Get Opsize }
   if (opsize<>S_NO) or (Ops=0) then
   if (opsize<>S_NO) or (Ops=0) then
@@ -308,7 +308,7 @@ begin
       siz:=operands[Ops]^.size;
       siz:=operands[Ops]^.size;
    end;
    end;
 
 
-  ai:=new(pai386,op_none(opcode,siz));
+  ai:=new(paicpu,op_none(opcode,siz));
   ai^.Ops:=Ops;
   ai^.Ops:=Ops;
   for i:=1to Ops do
   for i:=1to Ops do
    begin
    begin
@@ -338,7 +338,10 @@ end;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.8  1999-08-04 00:23:23  florian
+  Revision 1.9  1999-08-25 12:00:05  jonas
+    * changed pai386, paippc and paiapha (same for tai*) to paicpu (taicpu)
+
+  Revision 1.8  1999/08/04 00:23:23  florian
     * renamed i386asm and i386base to cpuasm and cpubase
     * renamed i386asm and i386base to cpuasm and cpubase
 
 
   Revision 1.7  1999/05/27 19:44:55  peter
   Revision 1.7  1999/05/27 19:44:55  peter

+ 14 - 11
compiler/tgeni386.pas

@@ -128,7 +128,7 @@ implementation
                    if not(r in unused) then
                    if not(r in unused) then
                      begin
                      begin
                         { then save it }
                         { then save it }
-                        exprasmlist^.concat(new(pai386,op_reg(A_PUSH,S_L,r)));
+                        exprasmlist^.concat(new(paicpu,op_reg(A_PUSH,S_L,r)));
 
 
                         { here was a big problem  !!!!!}
                         { here was a big problem  !!!!!}
                         { you cannot do that for a register that is
                         { you cannot do that for a register that is
@@ -154,12 +154,12 @@ implementation
               { if the mmx register is in use, save it }
               { if the mmx register is in use, save it }
               if not(r in unused) then
               if not(r in unused) then
                 begin
                 begin
-                   exprasmlist^.concat(new(pai386,op_const_reg(
+                   exprasmlist^.concat(new(paicpu,op_const_reg(
                      A_SUB,S_L,8,R_ESP)));
                      A_SUB,S_L,8,R_ESP)));
                    new(hr);
                    new(hr);
                    reset_reference(hr^);
                    reset_reference(hr^);
                    hr^.base:=R_ESP;
                    hr^.base:=R_ESP;
-                   exprasmlist^.concat(new(pai386,op_reg_ref(
+                   exprasmlist^.concat(new(paicpu,op_reg_ref(
                      A_MOVQ,S_NO,r,hr)));
                      A_MOVQ,S_NO,r,hr)));
                    if not(is_reg_var[r]) then
                    if not(is_reg_var[r]) then
                      begin
                      begin
@@ -197,7 +197,7 @@ implementation
                         { then save it }
                         { then save it }
                         gettempofsizereference(4,hr);
                         gettempofsizereference(4,hr);
                         saved[r]:=hr.offset;
                         saved[r]:=hr.offset;
-                        exprasmlist^.concat(new(pai386,op_reg_ref(A_MOV,S_L,r,newreference(hr))));
+                        exprasmlist^.concat(new(paicpu,op_reg_ref(A_MOV,S_L,r,newreference(hr))));
                         { here was a big problem  !!!!!}
                         { here was a big problem  !!!!!}
                         { you cannot do that for a register that is
                         { you cannot do that for a register that is
                         globally assigned to a var
                         globally assigned to a var
@@ -222,7 +222,7 @@ implementation
               if not(r in unused) then
               if not(r in unused) then
                 begin
                 begin
                    gettempofsizereference(8,hr);
                    gettempofsizereference(8,hr);
-                   exprasmlist^.concat(new(pai386,op_reg_ref(
+                   exprasmlist^.concat(new(paicpu,op_reg_ref(
                      A_MOVQ,S_NO,r,newreference(hr))));
                      A_MOVQ,S_NO,r,newreference(hr))));
                    if not(is_reg_var[r]) then
                    if not(is_reg_var[r]) then
                      begin
                      begin
@@ -257,9 +257,9 @@ implementation
                    new(hr);
                    new(hr);
                    reset_reference(hr^);
                    reset_reference(hr^);
                    hr^.base:=R_ESP;
                    hr^.base:=R_ESP;
-                   exprasmlist^.concat(new(pai386,op_ref_reg(
+                   exprasmlist^.concat(new(paicpu,op_ref_reg(
                      A_MOVQ,S_NO,hr,r)));
                      A_MOVQ,S_NO,hr,r)));
-                   exprasmlist^.concat(new(pai386,op_const_reg(
+                   exprasmlist^.concat(new(paicpu,op_const_reg(
                      A_ADD,S_L,8,R_ESP)));
                      A_ADD,S_L,8,R_ESP)));
                    unused:=unused-[r];
                    unused:=unused-[r];
 {$ifdef TEMPREGDEBUG}
 {$ifdef TEMPREGDEBUG}
@@ -271,7 +271,7 @@ implementation
          for r:=R_EBX downto R_EAX do
          for r:=R_EBX downto R_EAX do
            if pushed[r] then
            if pushed[r] then
              begin
              begin
-                exprasmlist^.concat(new(pai386,op_reg(A_POP,S_L,r)));
+                exprasmlist^.concat(new(paicpu,op_reg(A_POP,S_L,r)));
 {$ifdef TEMPREGDEBUG}
 {$ifdef TEMPREGDEBUG}
                 if not (r in unused) then
                 if not (r in unused) then
                   { internalerror(10)
                   { internalerror(10)
@@ -303,7 +303,7 @@ implementation
                    reset_reference(hr);
                    reset_reference(hr);
                    hr.base:=frame_pointer;
                    hr.base:=frame_pointer;
                    hr.offset:=saved[r];
                    hr.offset:=saved[r];
-                   exprasmlist^.concat(new(pai386,op_ref_reg(
+                   exprasmlist^.concat(new(paicpu,op_ref_reg(
                      A_MOVQ,S_NO,newreference(hr),r)));
                      A_MOVQ,S_NO,newreference(hr),r)));
                    unused:=unused-[r];
                    unused:=unused-[r];
 {$ifdef TEMPREGDEBUG}
 {$ifdef TEMPREGDEBUG}
@@ -319,7 +319,7 @@ implementation
                 reset_reference(hr);
                 reset_reference(hr);
                 hr.base:=frame_pointer;
                 hr.base:=frame_pointer;
                 hr.offset:=saved[r];
                 hr.offset:=saved[r];
-                exprasmlist^.concat(new(pai386,op_ref_reg(A_MOV,S_L,newreference(hr),r)));
+                exprasmlist^.concat(new(paicpu,op_ref_reg(A_MOV,S_L,newreference(hr),r)));
 {$ifdef TEMPREGDEBUG}
 {$ifdef TEMPREGDEBUG}
                 if not (r in unused) then
                 if not (r in unused) then
                   internalerror(10)
                   internalerror(10)
@@ -606,7 +606,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.32  1999-08-23 23:25:58  pierre
+  Revision 1.33  1999-08-25 12:00:06  jonas
+    * changed pai386, paippc and paiapha (same for tai*) to paicpu (taicpu)
+
+  Revision 1.32  1999/08/23 23:25:58  pierre
     + TEMPREGDEBUG code, test of register allocation
     + TEMPREGDEBUG code, test of register allocation
       if a tree uses more than registers32 regs then
       if a tree uses more than registers32 regs then
       internalerror(10) is issued
       internalerror(10) is issued

+ 6 - 3
compiler/win_targ.pas

@@ -221,7 +221,7 @@ unit win_targ;
 {$EndIf GDB}
 {$EndIf GDB}
                      importssection^.concat(new(pai_align,init_op(4,$90)));
                      importssection^.concat(new(pai_align,init_op(4,$90)));
                      importssection^.concat(new(pai_symbol,initname_global(hp2^.func^,0)));
                      importssection^.concat(new(pai_symbol,initname_global(hp2^.func^,0)));
-                     importssection^.concat(new(pai386,op_ref(A_JMP,S_NO,r)));
+                     importssection^.concat(new(paicpu,op_ref(A_JMP,S_NO,r)));
                    end;
                    end;
                   { create head link }
                   { create head link }
                   importssection^.concat(new(pai_section,init(sec_idata7)));
                   importssection^.concat(new(pai_section,init(sec_idata7)));
@@ -331,7 +331,7 @@ unit win_targ;
                       { place jump in codesegment }
                       { place jump in codesegment }
                       codesegment^.concat(new(pai_align,init_op(4,$90)));
                       codesegment^.concat(new(pai_align,init_op(4,$90)));
                       codesegment^.concat(new(pai_symbol,initname_global(hp2^.func^,0)));
                       codesegment^.concat(new(pai_symbol,initname_global(hp2^.func^,0)));
-                      codesegment^.concat(new(pai386,op_ref(A_JMP,S_NO,r)));
+                      codesegment^.concat(new(paicpu,op_ref(A_JMP,S_NO,r)));
                       { add jump field to importsection }
                       { add jump field to importsection }
                       importssection^.concat(new(pai_label,init(l4)));
                       importssection^.concat(new(pai_label,init(l4)));
                     end
                     end
@@ -799,7 +799,10 @@ unit win_targ;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.32  1999-08-11 17:26:38  peter
+  Revision 1.33  1999-08-25 12:00:07  jonas
+    * changed pai386, paippc and paiapha (same for tai*) to paicpu (taicpu)
+
+  Revision 1.32  1999/08/11 17:26:38  peter
     * tlinker object is now inherited for win32 and dos
     * tlinker object is now inherited for win32 and dos
     * postprocessexecutable is now a method of tlinker
     * postprocessexecutable is now a method of tlinker
 
 

Някои файлове не бяха показани, защото твърде много файлове са промени