Răsfoiți Sursa

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

Jonas Maebe 26 ani în urmă
părinte
comite
5fc1435036

+ 14 - 11
compiler/ag386att.pas

@@ -669,33 +669,33 @@ unit ag386att;
 
            ait_instruction :
              begin
-               op:=pai386(hp)^.opcode;
+               op:=paicpu(hp)^.opcode;
                calljmp:=is_calljmp(op);
              { 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
                   (not att_nosuffix[op]) and
                   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
-                s:=s+att_opsize2str[pai386(hp)^.opsize];
+                s:=s+att_opsize2str[paicpu(hp)^.opsize];
              { process operands }
-               if pai386(hp)^.ops<>0 then
+               if paicpu(hp)^.ops<>0 then
                 begin
                 { call and jmp need an extra handling                          }
                 { this code is only called if jmp isn't a labeled instruction }
                   if calljmp then
-                   s:=s+#9+getopstr_jmp(pai386(hp)^.oper[0])
+                   s:=s+#9+getopstr_jmp(paicpu(hp)^.oper[0])
                   else
                    begin
-                     for i:=0to pai386(hp)^.ops-1 do
+                     for i:=0to paicpu(hp)^.ops-1 do
                       begin
                         if i=0 then
                          sep:=#9
                         else
                          sep:=',';
-                        s:=s+sep+getopstr(pai386(hp)^.oper[i])
+                        s:=s+sep+getopstr(paicpu(hp)^.oper[i])
                       end;
                    end;
                 end;
@@ -844,7 +844,10 @@ unit ag386att;
 end.
 {
   $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
 
   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
     + 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
       (check in tests/tbs0123.pp)
 

+ 7 - 4
compiler/ag386bin.pas

@@ -433,7 +433,7 @@ unit ag386bin;
              ait_string :
                objectalloc^.sectionalloc(pai_string(hp)^.len);
              ait_instruction :
-               objectalloc^.sectionalloc(pai386(hp)^.Pass1(objectalloc^.sectionsize));
+               objectalloc^.sectionalloc(paicpu(hp)^.Pass1(objectalloc^.sectionsize));
              ait_cut :
                if SmartAsm then
                 begin
@@ -584,7 +584,7 @@ unit ag386bin;
              ait_string :
                objectalloc^.sectionalloc(pai_string(hp)^.len);
              ait_instruction :
-               objectalloc^.sectionalloc(pai386(hp)^.Pass1(objectalloc^.sectionsize));
+               objectalloc^.sectionalloc(paicpu(hp)^.Pass1(objectalloc^.sectionsize));
              ait_direct :
                Message(asmw_f_direct_not_supported);
              ait_cut :
@@ -707,7 +707,7 @@ unit ag386bin;
              ait_label :
                objectoutput^.writesymbol(pai_label(hp)^.l);
              ait_instruction :
-               pai386(hp)^.Pass2;
+               paicpu(hp)^.Pass2;
 {$ifdef GDB}
              ait_stabn :
                convertstabs(pai_stabn(hp)^.str);
@@ -905,7 +905,10 @@ unit ag386bin;
 end.
 {
   $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
 
   Revision 1.22  1999/08/04 00:22:35  florian

+ 20 - 17
compiler/ag386int.pas

@@ -477,21 +477,21 @@ unit ag386int;
                      end;
    ait_instruction : begin
                      { We need intel order, no At&t }
-                       pai386(hp)^.SwapOperands;
+                       paicpu(hp)^.SwapOperands;
                      { Reset }
                        suffix:='';
                        prefix:= '';
                        s:='';
                      { 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
-                          prefix:=int_op2str[pai386(hp)^.opcode]+#9;
+                          prefix:=int_op2str[paicpu(hp)^.opcode]+#9;
                           hp:=Pai(hp^.next);
                         { this is theorically impossible... }
                           if hp=nil then
@@ -506,23 +506,23 @@ unit ag386int;
                         end
                        else
                         prefix:= '';
-                       if pai386(hp)^.ops<>0 then
+                       if paicpu(hp)^.ops<>0 then
                         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
                            begin
-                             for i:=0to pai386(hp)^.ops-1 do
+                             for i:=0to paicpu(hp)^.ops-1 do
                               begin
                                 if i=0 then
                                  sep:=#9
                                 else
                                  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;
-                       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;
 {$ifdef GDB}
              ait_stabn,
@@ -627,7 +627,10 @@ ait_stab_function_name : ;
 end.
 {
   $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
 
   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
     + 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
       (check in tests/tbs0123.pp)
 

+ 15 - 12
compiler/ag386nsm.pas

@@ -481,33 +481,33 @@ unit ag386nsm;
                      end;
    ait_instruction : begin
                      { We need intel order, no At&t }
-                       pai386(hp)^.SwapOperands;
+                       paicpu(hp)^.SwapOperands;
                      { Reset }
                        suffix:='';
                        prefix:='';
                        s:='';
-                       if pai386(hp)^.ops<>0 then
+                       if paicpu(hp)^.ops<>0 then
                         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
                            begin
-                             for i:=0to pai386(hp)^.ops-1 do
+                             for i:=0to paicpu(hp)^.ops-1 do
                               begin
                                 if i=0 then
                                  sep:=#9
                                 else
                                  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;
-                       if pai386(hp)^.opcode=A_FWAIT then
+                       if paicpu(hp)^.opcode=A_FWAIT then
                         AsmWriteln(#9#9'DB'#9'09bh')
                        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;
 {$ifdef GDB}
              ait_stabn,
@@ -602,7 +602,10 @@ ait_stab_function_name : ;
 end.
 {
   $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
 
   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
     + 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
       (check in tests/tbs0123.pp)
 

+ 5 - 2
compiler/cg386cal.pas

@@ -221,7 +221,7 @@ implementation
          inlinecode : ptree;
          para_offset : longint;
          { instruction for alignement correction }
-{        corr : pai386;}
+{        corr : paicpu;}
          { we must pop this size also after !! }
 {        must_pop : boolean; }
          pop_size : longint;
@@ -1211,7 +1211,10 @@ implementation
 end.
 {
   $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
 
   Revision 1.100  1999/08/19 13:08:45  pierre

+ 5 - 2
compiler/cg386flw.pas

@@ -796,12 +796,15 @@ do_jmp:
 end.
 {
   $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
       and reset VMT field on static instances
       (not yet tested for classes, is it allowed ?)
     + 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
     * renamed i386asm and i386base to cpuasm and cpubase

+ 6 - 3
compiler/cg386ld.pas

@@ -377,7 +377,7 @@ implementation
          fputyp : tfloattype;
          loc : tloc;
          r : preference;
-         ai : pai386;
+         ai : paicpu;
          op : tasmop;
       begin
          otlabel:=truelabel;
@@ -740,7 +740,7 @@ implementation
                                 emit_flag2reg(p^.right^.location.resflags,p^.left^.location.register)
                               else
                                 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]);
                                   exprasmlist^.concat(ai);
                                 end;
@@ -968,7 +968,10 @@ implementation
 end.
 {
   $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
 
   Revision 1.76  1999/08/23 11:45:39  michael

+ 8 - 5
compiler/cg386mem.pas

@@ -412,7 +412,7 @@ implementation
          t   : ptree;
          hp  : preference;
          href : treference;
-         tai : Pai386;
+         tai : Paicpu;
          pushed : tpushed;
          hightree : ptree;
 
@@ -685,9 +685,9 @@ implementation
                        { Booleans are stored in an 8 bit memory location, so
                          the use of MOVL is not correct }
                        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;
                        exprasmlist^.concat(tai);
                     end;
@@ -851,7 +851,10 @@ implementation
 end.
 {
   $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
 
   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);
            { !!!!! generate tables
              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)));
              last:=min_;
@@ -919,7 +919,10 @@ implementation
 end.
 {
   $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
 
   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
 +          comp
 +           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}
           clear_location(p^.location);
           p^.location.loc := LOC_FPU;
@@ -1090,9 +1090,9 @@ implementation
 { !!!!!!!!
                         case porddef(p^.resulttype)^.typ of
                   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,
-              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;
            LOC_JUMP : begin
@@ -1144,11 +1144,11 @@ implementation
 
           bool16bit : begin
                         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;
           bool32bit : begin
                         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; }
          else
           internalerror(10064);
@@ -1190,11 +1190,11 @@ implementation
          getlabel(l2);
          case hp^.location.loc of
             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)));
             LOC_MEM,LOC_REFERENCE:
               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))));
                   del_reference(hp^.location.reference);
                   p^.location.register:=getregister32;
@@ -1202,7 +1202,7 @@ implementation
          end;
          emitl(A_JZ,l1);
          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),
              p^.location.register)));
          emitl(A_JMP,l2);
@@ -1210,7 +1210,7 @@ implementation
          new(hr);
          reset_reference(hr^);
          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)));
          emitl(A_LABEL,l2); }
       end;
@@ -1363,7 +1363,10 @@ implementation
 end.
 {
   $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
 
   Revision 1.11  1998/11/05 12:02:36  peter

+ 17 - 14
compiler/cg68kflw.pas

@@ -620,12 +620,12 @@ do_jmp:
          getlabel(lastonlabel);
          push_int (1); { push type of exceptionframe }
          emitcall('FPC_PUSHEXCEPTADDR',true);
-         exprasmlist^.concat(new(pai386,
+         exprasmlist^.concat(new(paicpu,
            op_reg(A_PUSH,S_L,R_EAX)));
          emitcall('FPC_SETJMP',true);
-         exprasmlist^.concat(new(pai386,
+         exprasmlist^.concat(new(paicpu,
            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)));
          emitl(A_JNE,exceptlabel);
 
@@ -635,9 +635,9 @@ do_jmp:
            exit;
 
          emitl(A_LABEL,exceptlabel);
-         exprasmlist^.concat(new(pai386,
+         exprasmlist^.concat(new(paicpu,
            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)));
          emitl(A_JNE,doexceptlabel);
          emitcall('FPC_POPADDRSTACK',true);
@@ -678,13 +678,13 @@ do_jmp:
 { !!!!!!!!!!!!!!! }
 (*         getlabel(nextonlabel);
          { 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))));
          maybe_concat_external(p^.excepttype^.owner,
            p^.excepttype^.vmt_mangledname);
 
          emitcall('FPC_CATCHES',true);
-         exprasmlist^.concat(new(pai386,
+         exprasmlist^.concat(new(paicpu,
            op_reg_reg(A_TEST,S_L,R_EAX,R_EAX)));
          emitl(A_JE,nextonlabel);
          ref.symbol:=nil;
@@ -694,7 +694,7 @@ do_jmp:
          if assigned(p^.exceptsymtable) then
            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))));
 
          if assigned(p^.right) then
@@ -726,12 +726,12 @@ do_jmp:
          getlabel(endfinallylabel);
          push_int(1); { Type of stack-frame must be pushed}
          emitcall('FPC_PUSHEXCEPTADDR',true);
-         exprasmlist^.concat(new(pai386,
+         exprasmlist^.concat(new(paicpu,
            op_reg(A_PUSH,S_L,R_EAX)));
          emitcall('FPC_SETJMP',true);
-         exprasmlist^.concat(new(pai386,
+         exprasmlist^.concat(new(paicpu,
            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)));
          emitl(A_JNE,finallylabel);
 
@@ -746,9 +746,9 @@ do_jmp:
          secondpass(p^.right);
          if codegenerror then
            exit;
-         exprasmlist^.concat(new(pai386,
+         exprasmlist^.concat(new(paicpu,
            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)));
          emitl(A_JE,noreraiselabel);
          emitcall('FPC_RERAISE',true);
@@ -779,7 +779,10 @@ do_jmp:
 end.
 {
   $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
 
   Revision 1.7  1998/10/14 11:28:19  florian

+ 7 - 4
compiler/cg68kinl.pas

@@ -873,14 +873,14 @@ implementation
                            else
                              begin
                                 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)));
                              end;
                           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))))
                           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)));
                         end
                       else
@@ -900,7 +900,10 @@ implementation
 end.
 {
   $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
       cformaldef (this was necessary for double_checksum)
     + small part of double_checksum code

+ 6 - 3
compiler/cg68kmem.pas

@@ -193,7 +193,7 @@ implementation
                      emitpushreferenceaddr(exprasmlist,r^);
                      { push pointer adress }
                      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)));
                         LOC_REFERENCE:
                           emitpushreferenceaddr(exprasmlist,p^.left^.location.reference);
@@ -215,7 +215,7 @@ implementation
                      emitpushreferenceaddr(exprasmlist,r^);
                      { push pointer adress }
                      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)));
                         LOC_REFERENCE:
                           emitpushreferenceaddr(exprasmlist,p^.left^.location.reference);
@@ -725,7 +725,10 @@ implementation
 end.
 {
   $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
 
   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
       R_AX..R_DI : begin
                      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;
       R_AL..R_DL : begin
                      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;
       R_AH..R_DH : begin
                      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;
@@ -1396,7 +1396,10 @@ end;
 end.
 {
   $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
 
   Revision 1.30  1998/11/30 09:43:05  pierre

Fișier diff suprimat deoarece este prea mare
+ 161 - 161
compiler/cgai386.pas


+ 52 - 49
compiler/cpuasm.pas

@@ -54,8 +54,8 @@ type
   end;
 
 
-  pai386 = ^tai386;
-  tai386 = object(tai)
+  paicpu = ^taicpu;
+  taicpu = object(tai)
      is_jmp    : boolean; { is this instruction a jump? (needed for optimizer) }
      opcode    : tasmop;
      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
         if opidx>=ops then
          ops:=opidx+1;
@@ -172,7 +172,7 @@ uses
          end;
       end;
 
-    procedure tai386.loadsymbol(opidx:longint;s:pasmsymbol;sofs:longint);
+    procedure taicpu.loadsymbol(opidx:longint;s:pasmsymbol;sofs:longint);
       begin
         if opidx>=ops then
          ops:=opidx+1;
@@ -189,7 +189,7 @@ uses
          inc(s^.refs);
       end;
 
-    procedure tai386.loadref(opidx:longint;p:preference);
+    procedure taicpu.loadref(opidx:longint;p:preference);
       begin
         if opidx>=ops then
          ops:=opidx+1;
@@ -219,7 +219,7 @@ uses
          end;
       end;
 
-    procedure tai386.loadreg(opidx:longint;r:tregister);
+    procedure taicpu.loadreg(opidx:longint;r:tregister);
       begin
         if opidx>=ops then
          ops:=opidx+1;
@@ -232,7 +232,7 @@ uses
          end;
       end;
 
-    procedure tai386.loadoper(opidx:longint;o:toper);
+    procedure taicpu.loadoper(opidx:longint;o:toper);
       begin
         if opidx>=ops then
          ops:=opidx+1;
@@ -245,13 +245,13 @@ uses
       end;
 
 
-    procedure tai386.changeopsize(siz:topsize);
+    procedure taicpu.changeopsize(siz:topsize);
       begin
         opsize:=siz;
       end;
 
 
-    procedure tai386.init(op : tasmop;_size : topsize);
+    procedure taicpu.init(op : tasmop;_size : topsize);
       begin
          typ:=ait_instruction;
          is_jmp:=false;
@@ -268,14 +268,14 @@ uses
 {$endif}
       end;
 
-    constructor tai386.op_none(op : tasmop;_size : topsize);
+    constructor taicpu.op_none(op : tasmop;_size : topsize);
       begin
          inherited init;
          init(op,_size);
       end;
 
 
-    constructor tai386.op_reg(op : tasmop;_size : topsize;_op1 : tregister);
+    constructor taicpu.op_reg(op : tasmop;_size : topsize;_op1 : tregister);
       begin
          inherited init;
          init(op,_size);
@@ -284,7 +284,7 @@ uses
       end;
 
 
-    constructor tai386.op_const(op : tasmop;_size : topsize;_op1 : longint);
+    constructor taicpu.op_const(op : tasmop;_size : topsize;_op1 : longint);
       begin
          inherited init;
          init(op,_size);
@@ -293,7 +293,7 @@ uses
       end;
 
 
-    constructor tai386.op_ref(op : tasmop;_size : topsize;_op1 : preference);
+    constructor taicpu.op_ref(op : tasmop;_size : topsize;_op1 : preference);
       begin
          inherited init;
          init(op,_size);
@@ -302,7 +302,7 @@ uses
       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
          inherited init;
          init(op,_size);
@@ -312,7 +312,7 @@ uses
       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
          inherited init;
          init(op,_size);
@@ -322,7 +322,7 @@ uses
       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
          inherited init;
          init(op,_size);
@@ -332,7 +332,7 @@ uses
       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
          inherited init;
          init(op,_size);
@@ -342,7 +342,7 @@ uses
       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
          inherited init;
          init(op,_size);
@@ -352,7 +352,7 @@ uses
       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
          inherited init;
          init(op,_size);
@@ -361,7 +361,7 @@ uses
          loadref(1,_op2);
       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
          inherited init;
          init(op,_size);
@@ -371,7 +371,7 @@ uses
       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
          inherited init;
          init(op,_size);
@@ -381,7 +381,7 @@ uses
       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
          inherited init;
          init(op,_size);
@@ -391,7 +391,7 @@ uses
          loadreg(2,_op3);
       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
          inherited init;
          init(op,_size);
@@ -401,7 +401,7 @@ uses
          loadreg(2,_op3);
       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
          inherited init;
          init(op,_size);
@@ -411,7 +411,7 @@ uses
          loadref(2,_op3);
       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
          inherited init;
          init(op,_size);
@@ -421,7 +421,7 @@ uses
          loadreg(2,_op3);
       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
          inherited init;
          init(op,_size);
@@ -432,7 +432,7 @@ uses
       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
          inherited init;
          init(op,_size);
@@ -442,7 +442,7 @@ uses
       end;
 
 
-    constructor tai386.op_sym(op : tasmop;_size : topsize;_op1 : pasmsymbol);
+    constructor taicpu.op_sym(op : tasmop;_size : topsize;_op1 : pasmsymbol);
       begin
          inherited init;
          init(op,_size);
@@ -451,7 +451,7 @@ uses
       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
          inherited init;
          init(op,_size);
@@ -460,7 +460,7 @@ uses
       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
          inherited init;
          init(op,_size);
@@ -470,7 +470,7 @@ uses
       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
          inherited init;
          init(op,_size);
@@ -479,7 +479,7 @@ uses
          loadref(1,_op2);
       end;
 
-    destructor tai386.done;
+    destructor taicpu.done;
       var
         i : longint;
       begin
@@ -494,7 +494,7 @@ uses
         inherited done;
       end;
 
-    function tai386.getcopy:plinkedlist_item;
+    function taicpu.getcopy:plinkedlist_item;
       var
         i : longint;
         p : plinkedlist_item;
@@ -502,22 +502,22 @@ uses
         p:=inherited getcopy;
         { make a copy of the references }
         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
-            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;
         getcopy:=p;
       end;
 
 
-    procedure tai386.SetCondition(c:TAsmCond);
+    procedure taicpu.SetCondition(c:TAsmCond);
       begin
          condition:=c;
       end;
 
 
-    function tai386.GetString:string;
+    function taicpu.GetString:string;
 {$ifdef ASMDEBUG}
       var
         i : longint;
@@ -565,7 +565,7 @@ uses
       end;
 
 
-procedure tai386.SwapOperands;
+procedure taicpu.SwapOperands;
 var
   p : TOper;
 begin
@@ -602,7 +602,7 @@ type
     sib   : byte;
   end;
 
-procedure tai386.create_ot;
+procedure taicpu.create_ot;
 {
   this function will also fix some other fields which only needs to be once
 }
@@ -664,13 +664,13 @@ begin
 end;
 
 
-function tai386.InsEnd:longint;
+function taicpu.InsEnd:longint;
 begin
   InsEnd:=InsOffset+InsSize;
 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
  * explicitly specified by the template is `really' intended to be
  * the same size as the first size-specified operand.
@@ -767,7 +767,7 @@ begin
 end;
 
 
-function tai386.Pass1(offset:longint):longint;
+function taicpu.Pass1(offset:longint):longint;
 var
   m,i,size_prob : longint;
 begin
@@ -839,7 +839,7 @@ begin
 end;
 
 
-procedure tai386.Pass2;
+procedure taicpu.Pass2;
 var
   c : longint;
 begin
@@ -867,7 +867,7 @@ begin
 end;
 
 
-function tai386.NeedAddrPrefix(opidx:byte):boolean;
+function taicpu.NeedAddrPrefix(opidx:byte):boolean;
 var
   i,b : tregister;
 begin
@@ -1066,7 +1066,7 @@ begin
 end;
 
 
-function tai386.calcsize(p:PInsEntry):longint;
+function taicpu.calcsize(p:PInsEntry):longint;
 var
   codes : pchar;
   c     : byte;
@@ -1145,7 +1145,7 @@ begin
 end;
 
 
-procedure tai386.GenCode;
+procedure taicpu.GenCode;
 {
  * the actual codes (C syntax, i.e. octal):
  * \0            - terminates the code. (Unless it's a literal of course.)
@@ -1496,7 +1496,10 @@ end;
 end.
 {
   $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
 
   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
               Assigned(hp2) 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
               (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
 
 {hack to be able to optimize
@@ -130,17 +130,17 @@ Begin {CheckSequence}
      mov (reg), reg
      movzx (reg), reg [*]}
 
-               If (Pai386(hp2)^.opcode = A_MOV)
+               If (Paicpu(hp2)^.opcode = A_MOV)
                  Then
                    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
                          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);
                            TmpResult := True;
                          End
@@ -153,9 +153,9 @@ Begin {CheckSequence}
                    End
                  Else
                    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)
                        Then
                          Begin
@@ -245,28 +245,28 @@ Begin
       Case p^.typ Of
         ait_instruction:
           Begin
-            Case Pai386(p)^.opcode Of
+            Case Paicpu(p)^.opcode Of
               A_CLD: If GetLastInstruction(p, hp1) And
                         (PPaiProp(hp1^.OptInfo)^.DirFlag = F_NotSet) Then
                        PPaiProp(Pai(p)^.OptInfo)^.CanBeRemoved := True;
               A_MOV, A_MOVZX, A_MOVSX:
                 Begin
-                  Case Pai386(p)^.oper[0].typ Of
+                  Case Paicpu(p)^.oper[0].typ Of
 {                    Top_Reg:
-                      Case Pai386(p)^.optype[1] Of
+                      Case Paicpu(p)^.optype[1] Of
                         Top_Reg:;
                         Top_Ref:;
                       End;}
                     Top_Ref:
                       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
                             If (p = StartMod) And
                                GetLastInstruction (p, hp1) And
                                (hp1^.typ <> ait_marker)
                               Then
 {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)
                                  Then
                                    Begin
@@ -291,12 +291,12 @@ Begin
                                      While Cnt2 <= Cnt Do
                                        Begin
                                          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
-                                                (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)))
                                            Then hp1 := p;
 {$ifndef noremove}
@@ -345,7 +345,7 @@ Begin
                                               (RegInfo.New2OldReg[RegCounter] <> RegCounter) Then
 
                                              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}
                                                       RegInfo.New2OldReg[RegCounter], RegCounter));
                                                hp3^.fileinfo := hp2^.fileinfo;
@@ -447,15 +447,15 @@ Begin
                                  Else
                                    If (Cnt > 0) And
                                       (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
                                      Begin
                                        hp2 := p;
                                        Cnt2 := 1;
                                        While Cnt2 <= Cnt Do
                                          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;
                                            Inc(Cnt2);
                                            GetNextInstruction(p, p);
@@ -466,11 +466,11 @@ Begin
                       End;
                     Top_Const:
                       Begin
-                        Case Pai386(p)^.oper[1].typ Of
+                        Case Paicpu(p)^.oper[1].typ Of
                           Top_Reg:
                             Begin
                               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
                                      (StartMod = p) Then
                                     PPaiProp(p^.OptInfo)^.CanBeRemoved := True;
@@ -485,12 +485,12 @@ Begin
                         PPaiProp(Pai(p)^.OptInfo)^.CanBeRemoved := True;
               A_XOR:
                 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
-                     (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
                 End
             End
@@ -553,7 +553,10 @@ End.
 
 {
  $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
 
  Revision 1.22  1999/06/03 15:45:08  jonas

+ 137 - 134
compiler/daopt386.pas

@@ -1085,9 +1085,9 @@ Begin
       Reg := Reg32(Reg);
       Counter := 0;
       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;
         Inc(Counter)
       Until (Counter = 3) or TmpResult;
@@ -1308,19 +1308,19 @@ Begin
         (Counter <= Content.NrOfMods) Do
     Begin
       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
           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
                    (Index = R_NO)
                   Then
                     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;
                     End
                   Else
@@ -1381,12 +1381,12 @@ End;
 Begin
   If (p^.typ = ait_instruction) Then
     Begin
-      Case Pai386(p)^.oper[0].typ Of
+      Case Paicpu(p)^.oper[0].typ Of
         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:
-          With TReference(Pai386(p)^.oper[0]^) Do
+          With TReference(Paicpu(p)^.oper[0]^) Do
             Begin
               If Not(Base in [ProcInfo.FramePointer,R_NO,R_ESP])
                 Then RegSet := RegSet + [Base];
@@ -1394,12 +1394,12 @@ Begin
                 Then RegSet := RegSet + [Index];
             End;
       End;
-      Case Pai386(p)^.oper[1].typ Of
+      Case Paicpu(p)^.oper[1].typ Of
         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:
-          With TReference(Pai386(p)^.oper[1]^) Do
+          With TReference(Paicpu(p)^.oper[1]^) Do
             Begin
               If Not(Base in [ProcInfo.FramePointer,R_NO,R_ESP])
                 Then RegSet := RegSet + [Base];
@@ -1449,31 +1449,31 @@ Function InstructionsEquivalent(p1, p2: Pai; Var RegInfo: TRegInfo): Boolean;
 {$ifdef csdebug}
 var hp: pai;
 {$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
      (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
  {both instructions have the same structure:
   "<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
   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
  {the "new" instruction is also a load of a register with a new value, and
   this value is fetched from the same memory location}
               Begin
-                With Pai386(p2)^.oper[0].ref^ Do
+                With Paicpu(p2)^.oper[0].ref^ Do
                   Begin
                     If Not(Base in [ProcInfo.FramePointer, R_NO, R_ESP])
        {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
   from the reference are the same in the old and in the new instruction
   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}
                 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
  {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"
@@ -1496,10 +1496,10 @@ Begin {checks whether two Pai386 instructions are equal}
         Else
  {load register with a value based on the current value of this register}
           Begin
-            With Pai386(p2)^.oper[0].ref^ Do
+            With Paicpu(p2)^.oper[0].ref^ Do
               Begin
                 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}
                   Then
                     Begin
@@ -1509,7 +1509,7 @@ Begin {checks whether two Pai386 instructions are equal}
 {$endif csdebug}
                     end;
                 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
                     Begin
                       RegInfo.RegsLoadedForRef := RegInfo.RegsLoadedForRef + [Index];
@@ -1519,18 +1519,18 @@ Begin {checks whether two Pai386 instructions are equal}
                     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
                 Begin
                   RegInfo.RegsLoadedForRef := RegInfo.RegsLoadedForRef -
-                                                 [Reg32(Pai386(p2)^.oper[1].reg)];
+                                                 [Reg32(Paicpu(p2)^.oper[1].reg)];
 {$ifdef csdebug}
-                  Writeln(att_reg2str[Reg32(Pai386(p2)^.oper[1].reg)], ' removed');
+                  Writeln(att_reg2str[Reg32(Paicpu(p2)^.oper[1].reg)], ' removed');
 {$endif csdebug}
                 end;
             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
       Else
  {an instruction <> mov, movzx, movsx}
@@ -1543,9 +1543,9 @@ Begin {checks whether two Pai386 instructions are equal}
          p2^.next := hp;
   {$endif csdebug}
          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
  {the instructions haven't even got the same structure, so they're certainly
   not equivalent}
@@ -1571,16 +1571,16 @@ End;
 
 (*
 Function InstructionsEqual(p1, p2: Pai): Boolean;
-Begin {checks whether two Pai386 instructions are equal}
+Begin {checks whether two Paicpu instructions are equal}
   InstructionsEqual :=
     Assigned(p1) And Assigned(p2) 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;
 *)
 
@@ -1591,10 +1591,10 @@ Begin
   TmpResult := False;
   If (p^.typ = ait_instruction) Then
     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;
   RefInInstruction := TmpResult;
 End;
@@ -1652,8 +1652,8 @@ Begin
                  ((Counter <> WhichReg) Or
                   ((NrOfMods <> 1) And
  {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
         {don't destroy if reg contains a parameter, local or global variable}
             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}
 Procedure AddInstr2RegContents({$ifdef statedebug} asml: paasmoutput; {$endif}
-p: pai386; reg: TRegister);
+p: paicpu; reg: TRegister);
 {$ifdef statedebug}
 var hp: pai;
 {$endif statedebug}
@@ -1773,7 +1773,7 @@ Begin
 End;
 
 Procedure AddInstr2OpContents({$ifdef statedebug} asml: paasmoutput; {$endif}
-p: pai386; const oper: TOper);
+p: paicpu; const oper: TOper);
 Begin
   If oper.typ = top_reg Then
     AddInstr2RegContents({$ifdef statedebug} asml, {$endif}p, oper.reg)
@@ -1869,7 +1869,7 @@ Begin
                       Begin
                         If (GetLastInstruction(p, hp) And
                            Not(((hp^.typ = ait_instruction)) And
-                                (pai386_labeled(hp)^.is_jmp))
+                                (paicpu_labeled(hp)^.is_jmp))
                           Then
   {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}
@@ -1886,7 +1886,7 @@ Begin
   already been processed}
                       If GetLastInstruction(p, hp) And
                          Not(hp^.typ = ait_instruction) And
-                            (pai386_labeled(hp)^.opcode = A_JMP))
+                            (paicpu_labeled(hp)^.opcode = A_JMP))
                         Then
   {previous instruction not a jmp, so keep all the registers' contents from the
    previous instruction}
@@ -1903,8 +1903,8 @@ Begin
       been processed}
                             While GetNextInstruction(hp, hp) 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
                                       (LTable^[Pai_Label(hp)^.l^.labelnr-LoLab].RefsFound
                                        = Pai_Label(hp)^.l^.RefCount) And
@@ -1945,13 +1945,13 @@ Begin
 
         ait_instruction:
           Begin
-            if pai386(p)^.is_jmp then
+            if paicpu(p)^.is_jmp then
              begin
 {$IfNDef 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
                 If (InstrCnt < InstrNr)
                   Then
@@ -1977,7 +1977,7 @@ Begin
 {                    If (JmpsProcessed > 0) Or
                        Not(GetLastInstruction(PaiObj, hp) And
                            (hp^.typ = ait_labeled_instruction) And
-                           (pai386_labeled(hp)^.opcode = A_JMP))
+                           (paicpu_labeled(hp)^.opcode = A_JMP))
                       Then}
 {instruction prior to label is not a jmp, or at least one jump to the label
  has yet been processed}
@@ -2035,36 +2035,36 @@ Begin
           end
           else
            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:
                 Begin
-                  Case Pai386(p)^.oper[0].typ Of
+                  Case Paicpu(p)^.oper[0].typ Of
                     Top_Reg:
-                      Case Pai386(p)^.oper[1].typ Of
+                      Case Paicpu(p)^.oper[1].typ Of
                         Top_Reg:
                           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;
                         Top_Ref:
                           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;
                     Top_Ref:
                       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)
                           Then
                             Begin
@@ -2082,7 +2082,7 @@ Begin
                           Else
                             Begin
                               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
                                   Begin
                                     Typ := Con_Ref;
@@ -2098,10 +2098,10 @@ Begin
                       End;
                     Top_Const:
                       Begin
-                        Case Pai386(p)^.oper[1].typ Of
+                        Case Paicpu(p)^.oper[1].typ Of
                           Top_Reg:
                             Begin
-                              TmpReg := Reg32(Pai386(p)^.oper[1].reg);
+                              TmpReg := Reg32(Paicpu(p)^.oper[1].reg);
                               With CurProp^.Regs[TmpReg] Do
                                 Begin
                                   DestroyReg(CurProp, TmpReg);
@@ -2111,8 +2111,8 @@ Begin
                             End;
                           Top_Ref:
                             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;
@@ -2120,19 +2120,19 @@ Begin
                 End;
               A_DIV, A_IDIV, A_MUL:
                 Begin
-                  ReadOp(Curprop, Pai386(p)^.oper[0]);
+                  ReadOp(Curprop, Paicpu(p)^.oper[0]);
                   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);
                   DestroyReg(CurProp, R_EAX)
                 End;
               A_IMUL:
                 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
                         ReadReg(CurProp,R_EAX);
                         DestroyReg(CurProp, R_EAX);
@@ -2140,32 +2140,32 @@ Begin
                       End
                     Else
             {$ifdef arithopt}
-                      AddOp2RegContents(Pai386(p), Pai386(p)^.oper[1])
+                      AddOp2RegContents(Paicpu(p), Paicpu(p)^.oper[1])
             {$else arithopt}
-                      DestroyOp(p, Pai386(p)^.oper[1])
+                      DestroyOp(p, Paicpu(p)^.oper[1])
             {$endif arithopt}
                   Else
             {$ifdef arithopt}
-                    AddOp2RegContents(Pai386(p), Pai386(p)^.oper[2]);
+                    AddOp2RegContents(Paicpu(p), Paicpu(p)^.oper[2]);
             {$else arithopt}
-                    DestroyOp(p, Pai386(p)^.oper[2]);
+                    DestroyOp(p, Paicpu(p)^.oper[2]);
             {$endif arithopt}
                 End;
               A_XOR:
                 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
                       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
                     Else
-                      DestroyOp(p, Pai386(p)^.oper[1]);
+                      DestroyOp(p, Paicpu(p)^.oper[1]);
                 End
               Else
                 Begin
@@ -2184,46 +2184,46 @@ Begin
 {$ifdef arithopt}
                         C_MEAX..C_MEDI:
                           AddInstr2RegContents({$ifdef statedebug} asml, {$endif}
-                                               Pai386(p),
+                                               Paicpu(p),
                                                TCh2Reg(InstrProp.Ch[Cnt]));
 {$endif arithopt}
                         C_CDirFlag: CurProp^.DirFlag := F_NotSet;
                         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:
                           Begin
                             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;
 {$ifdef arithopt}
                         C_Mop1:
                           AddInstr2OpContents({$ifdef statedebug} asml, {$endif}
-                          Pai386(p), Pai386(p)^.oper[0]);
+                          Paicpu(p), Paicpu(p)^.oper[0]);
 {$endif arithopt}
                         C_Wop2..C_RWop2:
                           Begin
                             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;
 {$ifdef arithopt}
                         C_Mop2:
                           AddInstr2OpContents({$ifdef statedebug} asml, {$endif}
-                          Pai386(p), Pai386(p)^.oper[1]);
+                          Paicpu(p), Paicpu(p)^.oper[1]);
 {$endif arithopt}
                         C_WOp3..C_RWOp3:
                           Begin
                             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;
 {$ifdef arithopt}
                         C_Mop3:
                           AddInstr2OpContents({$ifdef statedebug} asml, {$endif}
-                          Pai386(p), Pai386(p)^.oper[2]);
+                          Paicpu(p), Paicpu(p)^.oper[2]);
 {$endif arithopt}
                         C_WMemEDI:
                           Begin
@@ -2276,20 +2276,20 @@ Begin
           End;
         ait_instruction:
           begin
-            if pai386(p)^.is_jmp then
+            if paicpu(p)^.is_jmp then
              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;
 {        ait_instruction:
           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
-               TmpStr := StrPas(PCSymbol(Pai386(p)^.oper[0])^.symbol);
+               TmpStr := StrPas(PCSymbol(Paicpu(p)^.oper[0])^.symbol);
                If}
       End;
 {$EndIf JumpAnal}
@@ -2350,7 +2350,10 @@ End.
 
 {
  $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
 
  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);
         begin
 (*
-               op:=pai386(hp)^.opcode;
+               op:=paicpu(hp)^.opcode;
                calljmp:=is_calljmp(op);
              { 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
                   (not att_nosuffix[op]) and
                   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
-                s:=s+att_opsize2str[pai386(hp)^.opsize];
+                s:=s+att_opsize2str[paicpu(hp)^.opsize];
              { process operands }
-               if pai386(hp)^.ops<>0 then
+               if paicpu(hp)^.ops<>0 then
                 begin
                 { call and jmp need an extra handling                          }
                 { this code is only called if jmp isn't a labeled instruction }
                   if calljmp then
-                   s:=s+#9+getopstr_jmp(pai386(hp)^.oper[0])
+                   s:=s+#9+getopstr_jmp(paicpu(hp)^.oper[0])
                   else
                    begin
-                     for i:=0to pai386(hp)^.ops-1 do
+                     for i:=0to paicpu(hp)^.ops-1 do
                       begin
                         if i=0 then
                          sep:=#9
                         else
                          sep:=',';
-                        s:=s+sep+getopstr(pai386(hp)^.oper[i])
+                        s:=s+sep+getopstr(paicpu(hp)^.oper[i])
                       end;
                    end;
                 end;
@@ -113,7 +113,10 @@ end.
 
 {
   $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
 
 }

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

@@ -69,12 +69,12 @@ procedure tcgalpha.g_stackframe_entry(list : paasmoutput;localsize : longint);
 begin
   With List^ do 
     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
       concat(new(paiframe,Init(Global_pointer,LocalSize,R_27,0)));
     { 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;
 
@@ -84,11 +84,11 @@ begin
   With List^ do
     begin
     { 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}
-    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... }
-    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
     Concat (new(paiend,init(''));
     }
@@ -98,7 +98,7 @@ end;
 procedure tcgalpha.a_call_name(list : paasmoutput;const s : string;  offset : longint);
 
   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 }
      abstract;
   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);
 
   begin
-     { list^.concat(new(pai386,op_reg(A_PUSH,regsize(r),r))); }
+     { list^.concat(new(paicpu,op_reg(A_PUSH,regsize(r),r))); }
      abstract;
   end;
 
@@ -200,7 +200,10 @@ end;
 end.
 {
   $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
 
   Revision 1.5  1999/08/06 14:15:53  florian

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

@@ -44,8 +44,8 @@ type
     end;
 
 
-  paialpha = ^taialpha;
-  taialpha = object(tainstruction)
+  paicpu = ^taicpu;
+  taicpu = object(tainstruction)
      constructor op_none(op : tasmop);
 
      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
          inherited init(op);
       end;
 
 
-    constructor taialpha.op_reg(op : tasmop;_op1 : tregister);
+    constructor taicpu.op_reg(op : tasmop;_op1 : tregister);
       begin
          inherited init(op);
          ops:=1;
       end;
 
 
-    constructor taialpha.op_const(op : tasmop;_op1 : longint);
+    constructor taicpu.op_const(op : tasmop;_op1 : longint);
       begin
          inherited init(op);
          ops:=1;
       end;
 
 
-    constructor taialpha.op_ref(op : tasmop;_op1 : preference);
+    constructor taicpu.op_ref(op : tasmop;_op1 : preference);
       begin
          inherited init(op);
          ops:=1;
       end;
 
 
-    constructor taialpha.op_reg_reg(op : tasmop;_op1,_op2 : tregister);
+    constructor taicpu.op_reg_reg(op : tasmop;_op1,_op2 : tregister);
       begin
          inherited init(op);
          ops:=2;
       end;
 
 
-    constructor taialpha.op_reg_const(op:tasmop; _op1: tregister; _op2: longint);
+    constructor taicpu.op_reg_const(op:tasmop; _op1: tregister; _op2: longint);
       begin
          inherited init(op);
          ops:=2;
       end;
 
 
-    constructor taialpha.op_reg_ref(op : tasmop;_op1 : tregister;_op2 : preference);
+    constructor taicpu.op_reg_ref(op : tasmop;_op1 : tregister;_op2 : preference);
       begin
          inherited init(op);
          ops:=2;
       end;
 
 
-    constructor taialpha.op_const_reg(op : tasmop;_op1 : longint;_op2 : tregister);
+    constructor taicpu.op_const_reg(op : tasmop;_op1 : longint;_op2 : tregister);
       begin
          inherited init(op);
          ops:=2;
       end;
 
 
-    constructor taialpha.op_const_const(op : tasmop;_op1,_op2 : longint);
+    constructor taicpu.op_const_const(op : tasmop;_op1,_op2 : longint);
       begin
          inherited init(op);
          ops:=2;
       end;
 
 
-    constructor taialpha.op_const_ref(op : tasmop;_op1 : longint;_op2 : preference);
+    constructor taicpu.op_const_ref(op : tasmop;_op1 : longint;_op2 : preference);
       begin
          inherited init(op);
          ops:=2;
       end;
 
-    constructor taialpha.op_ref_reg(op : tasmop;_op1 : preference;_op2 : tregister);
+    constructor taicpu.op_ref_reg(op : tasmop;_op1 : preference;_op2 : tregister);
       begin
          inherited init(op);
          ops:=2;
       end;
 
 
-    constructor taialpha.op_ref_ref(op : tasmop;_op1,_op2 : preference);
+    constructor taicpu.op_ref_ref(op : tasmop;_op1,_op2 : preference);
       begin
          inherited init(op);
          ops:=2;
       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
          inherited init(op);
          ops:=3;
       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
          inherited init(op);
          ops:=3;
       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
          inherited init(op);
          ops:=3;
       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
          inherited init(op);
          ops:=3;
       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
          inherited init(op);
          ops:=3;
       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
          inherited init(op);
          ops:=3;
       end;
 
 
-    constructor taialpha.op_cond_sym(op : tasmop;cond:TAsmCond;_op1 : pasmsymbol);
+    constructor taicpu.op_cond_sym(op : tasmop;cond:TAsmCond;_op1 : pasmsymbol);
       begin
          inherited init(op);
          condition:=cond;
@@ -220,34 +220,34 @@ implementation
       end;
 
 
-    constructor taialpha.op_sym(op : tasmop;_op1 : pasmsymbol);
+    constructor taicpu.op_sym(op : tasmop;_op1 : pasmsymbol);
       begin
          inherited init(op);
          ops:=1;
       end;
 
 
-    constructor taialpha.op_sym_ofs(op : tasmop;_op1 : pasmsymbol;_op1ofs:longint);
+    constructor taicpu.op_sym_ofs(op : tasmop;_op1 : pasmsymbol;_op1ofs:longint);
       begin
          inherited init(op);
          ops:=1;
       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
          inherited init(op);
          ops:=2;
       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
          inherited init(op);
          ops:=2;
       end;
 
-    function taialpha.getcopy:plinkedlist_item;
+    function taicpu.getcopy:plinkedlist_item;
       var
         i : longint;
         p : plinkedlist_item;
@@ -255,10 +255,10 @@ implementation
         p:=inherited getcopy;
         { make a copy of the references }
         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
-            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;
         getcopy:=p;
       end;
@@ -285,7 +285,10 @@ implementation
 end.
 {
   $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
 
   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;
               A_XOR:
                 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
-                     (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
                 End
           End;
@@ -850,7 +850,10 @@ End.
 
 {
   $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
 
   Revision 1.1  1999/08/18 14:32:21  jonas

+ 11 - 8
compiler/new/cgobj.pas

@@ -695,16 +695,16 @@ unit cgobj;
            begin
              if procinfo._class^.isclass then
                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
              else
                begin
                  {
                  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))));
-                 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);
                  }
                end;
@@ -884,9 +884,9 @@ unit cgobj;
          if (po_savestdregs in aktprocsym^.definition^.procoptions) then
            begin
              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
                but that is risky because it only works
                if genexitcode is called after genentrycode
@@ -1080,7 +1080,10 @@ unit cgobj;
 end.
 {
   $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
       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);
 
 { type of a normal instruction }
-  TInstr = Tai386;
+  TInstr = Taicpu;
   PInstr = ^TInstr;
 
   TFlag = (DirFlag);
@@ -739,7 +739,10 @@ End.
 
 {
  $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
 
  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
            begin
               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
                 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
          else
            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;
 
@@ -84,14 +84,14 @@ unit cgcpu;
        offset : longint);
 
        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 }
        end;
 
      procedure tcg386.a_push_reg(list : paasmoutput;r : tregister);
 
        begin
-          list^.concat(new(pai386,op_reg(A_PUSH,regsize(r),r)));
+          list^.concat(new(paicpu,op_reg(A_PUSH,regsize(r),r)));
        end;
 
      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);
 
        begin
-          list^.concat(new(pai386,op_none(A_LEAVE,S_NO)));
+          list^.concat(new(paicpu,op_none(A_LEAVE,S_NO)));
        end;
 
      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.}
           { also routines with parasize=0     }
           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
-            list^.concat(new(pai386,op_const(A_RET,S_NO,parasize)));
+            list^.concat(new(paicpu,op_const(A_RET,S_NO,parasize)));
        end;
 
 end.
 {
   $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
 
   Revision 1.3  1999/08/06 13:26:54  florian

+ 34 - 31
compiler/new/nmem.pas

@@ -149,7 +149,7 @@ unit nmem;
                       begin
                          hregister:=tg.getregisterint;
                          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.base:=hregister;
                       end
@@ -193,7 +193,7 @@ unit nmem;
                                           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;
                                         i:=lexlevel-1;
@@ -201,7 +201,7 @@ unit nmem;
                                           begin
                                              { make a reference }
                                              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);
                                           end;
                                         location.reference.base:=hregister;
@@ -241,7 +241,7 @@ unit nmem;
                                         hp:=new_reference(procinfo.framepointer,
                                           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:=
                                           pvarsym(symtableentry)^.address;
@@ -270,19 +270,19 @@ unit nmem;
                                      begin
                                         highframepointer:=R_EDI;
                                         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)));
                                      end;
                                 end;
                               if location.loc=LOC_CREGISTER then
                                 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.loc:=LOC_REFERENCE;
                                 end
                               else
                                 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),
                                      hregister)));
                                 end;
@@ -475,14 +475,14 @@ unit nmem;
                               end;
                               if loc=LOC_CREGISTER then
                                 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),
                                     p^.left^.location.register)));
                                   if is_64bitint(p^.right^.resulttype) then
                                     begin
                                        r:=newreference(p^.right^.location.reference);
                                        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)));
                                     end;
 {$IfDef regallocfix}
@@ -491,20 +491,20 @@ unit nmem;
                                 end
                               else
                                 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,
                                     newreference(p^.left^.location.reference))));
                                   if is_64bitint(p^.right^.resulttype) then
                                     begin
                                        r:=newreference(p^.left^.location.reference);
                                        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)));
                                     end;
 {$IfDef regallocfix}
                                   del_reference(p^.left^.location.reference);
 {$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^.left^.location)));}
                                 end;
@@ -513,9 +513,9 @@ unit nmem;
                          else if loc=LOC_CFPUREGISTER then
                            begin
                               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))));
-                              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))));
                            end
                          else
@@ -553,10 +553,10 @@ unit nmem;
             LOC_MMXREGISTER:
               begin
                  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)))
                  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))));
               end;
 {$endif SUPPORT_MMX}
@@ -571,7 +571,7 @@ unit nmem;
                               { simplified with op_reg_loc       }
                               if loc=LOC_CREGISTER then
                                 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^.left^.location.register)));
 {$IfDef regallocfix}
@@ -580,7 +580,7 @@ unit nmem;
                                 end
                               else
                                 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,
                                     newreference(p^.left^.location.reference))));
 {$IfDef regallocfix}
@@ -592,18 +592,18 @@ unit nmem;
                                 begin
                                    { simplified with op_reg_loc  }
                                    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^.left^.location.registerhigh)))
                                    else
                                      begin
                                         r:=newreference(p^.left^.location.reference);
                                         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)));
                                      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^.left^.location)));      }
 
@@ -623,7 +623,7 @@ unit nmem;
                               case loc of
                                  LOC_CFPUREGISTER:
                                    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))));
                                       dec(fpuvaroffset);
                                    end;
@@ -645,13 +645,13 @@ unit nmem;
                                 fputyp:=pfloatdef(p^.right^.left^.resulttype)^.typ
                               else
                                 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))));
                               inc(fpuvaroffset);
                               case loc of
                                  LOC_CFPUREGISTER:
                                    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))));
                                       dec(fpuvaroffset);
                                    end;
@@ -665,22 +665,22 @@ unit nmem;
                               getlabel(hlabel);
                               emitlab(truelabel);
                               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)))
                               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))));
-                              {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)));}
                               emitjmp(C_None,hlabel);
                               emitlab(falselabel);
                               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)))
                               else
                                 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))));
 {$IfDef regallocfix}
                                   del_reference(p^.left^.location.reference);
@@ -693,7 +693,7 @@ unit nmem;
                                 emit_flag2reg(p^.right^.location.resflags,p^.left^.location.register)
                               else
                                 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]);
                                   exprasmlist^.concat(ai);
                                 end;
@@ -709,7 +709,10 @@ unit nmem;
 end.
 {
   $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
       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^.base:=procinfo.framepointer;
 {$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)));
 {$endif i386}
 {$ifdef m68k}
@@ -464,7 +464,10 @@ implementation
 end.
 {
   $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
     * more things for the new code generator
 

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

@@ -445,33 +445,33 @@ unit agas;
            ait_instruction :
              begin
 
-               op:=pai386(hp)^.opcode;
+               op:=paicpu(hp)^.opcode;
                calljmp:=is_calljmp(op);
              { 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
                   (not att_nosuffix[op]) and
                   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
-                s:=s+att_opsize2str[pai386(hp)^.opsize];
+                s:=s+att_opsize2str[paicpu(hp)^.opsize];
              { process operands }
-               if pai386(hp)^.ops<>0 then
+               if paicpu(hp)^.ops<>0 then
                 begin
                 { call and jmp need an extra handling                          }
                 { this code is only called if jmp isn't a labeled instruction }
                   if calljmp then
-                   s:=s+#9+getopstr_jmp(pai386(hp)^.oper[0])
+                   s:=s+#9+getopstr_jmp(paicpu(hp)^.oper[0])
                   else
                    begin
-                     for i:=0to pai386(hp)^.ops-1 do
+                     for i:=0to paicpu(hp)^.ops-1 do
                       begin
                         if i=0 then
                          sep:=#9
                         else
                          sep:=',';
-                        s:=s+sep+getopstr(pai386(hp)^.oper[i])
+                        s:=s+sep+getopstr(paicpu(hp)^.oper[i])
                       end;
                    end;
                 end;
@@ -617,7 +617,10 @@ unit agas;
 end.
 {
   $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
 
 }

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

@@ -86,10 +86,10 @@ const
       begin
  { save our RTOC register value. Only necessary when doing pointer based    }
  { 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))));
-         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))));
       end;
 
@@ -100,12 +100,12 @@ const
        begin
           If (a and $ffff) <> 0 Then
             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
-                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
           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;
 
        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;
              Else InternalError(68993)
            End;
-           list^.concat(new(paippc,op_reg_ref(op,reg,newreference(ref))));
+           list^.concat(new(paicpu,op_reg_ref(op,reg,newreference(ref))));
          End;
 
      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
            Else InternalError(68994)
          End;
-         list^.concat(new(paippc,op_reg_ref(op,reg,newreference(ref))));
+         list^.concat(new(paicpu,op_reg_ref(op,reg,newreference(ref))));
        end;
 
      procedure tcgppc.a_load_reg_reg(list : paasmoutput;size : tcgsize;reg1,reg2 : tregister);
 
        begin
-         list^.concat(new(paippc,op_reg_reg(A_MR,reg2,reg1)));
+         list^.concat(new(paicpu,op_reg_reg(A_MR,reg2,reg1)));
        end;
 
      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:
              If (Op = OP_IMUL) And (longint(a) >= -32768) And
                 (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
                Begin
                  scratch_register := get_scratch_reg(list);
                  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)));
                  free_scratch_reg(list,scratch_register);
                End;
@@ -174,7 +174,7 @@ const
            OP_SHL,OP_SHR,OP_SAR:
              Begin
                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)));
                If (a shr 16) <> 0 Then
                  InternalError(68991);
@@ -197,26 +197,26 @@ const
           signed := cmp_op in [OC_GT,OC_LT,OC_GTE,OC_LTE];
           If signed 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
               begin
                 scratch_register := get_scratch_reg(list);
                 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);
              end
            else
              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
               begin
                 scratch_register := get_scratch_reg(list);
                 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);
              end;
            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))));
         end;
 
@@ -227,9 +227,9 @@ const
       var AsmCond: TAsmCond;
 
       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];
-        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))));
       end;
 {
@@ -272,8 +272,8 @@ const
            else a_load_const_reg(list, OS_32, ref.offset, r)
          else
            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;
 
 { *********** 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 }
  { procedure, but currently this isn't checked, so save them always         }
         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))));
         free_scratch_reg(list,scratch_register);
         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)));
-        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))));
         free_scratch_reg(list,scratch_register);
 { 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   }
  { save the stack pointer at the end of the linkage area                   }
                  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+
                       LinkageAreaSize))))
                  else
                    Begin
                      scratch_register := get_scratch_reg(list);
                      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)));
                      free_scratch_reg(list,scratch_register);
                   End;
@@ -358,15 +358,18 @@ const
 
      Begin
        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
-         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.
 {
   $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
       so it should compile now simple programs
 

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

@@ -31,8 +31,8 @@ uses
 
 type
 
-  paippc = ^taippc;
-  taippc = object(tainstruction)
+  paicpu = ^taicpu;
+  taicpu = object(tainstruction)
 
      constructor op_none(op : tasmop);
 
@@ -80,10 +80,10 @@ type
 implementation
 
 {*****************************************************************************
-                                 taippc Constructors
+                                 taicpu Constructors
 *****************************************************************************}
 
-    procedure taippc.loadbool(opidx:longint;_b:boolean);
+    procedure taicpu.loadbool(opidx:longint;_b:boolean);
       begin
         if opidx>=ops then
          ops:=opidx+1;
@@ -97,13 +97,13 @@ implementation
       end;
 
 
-    constructor taippc.op_none(op : tasmop);
+    constructor taicpu.op_none(op : tasmop);
       begin
          inherited init(op);
       end;
 
 
-    constructor taippc.op_reg(op : tasmop;_op1 : tregister);
+    constructor taicpu.op_reg(op : tasmop;_op1 : tregister);
       begin
          inherited init(op);
          ops:=1;
@@ -111,7 +111,7 @@ implementation
       end;
 
 
-    constructor taippc.op_const(op : tasmop;_op1 : longint);
+    constructor taicpu.op_const(op : tasmop;_op1 : longint);
       begin
          inherited init(op);
          ops:=1;
@@ -119,7 +119,7 @@ implementation
       end;
 
 
-    constructor taippc.op_reg_reg(op : tasmop;_op1,_op2 : tregister);
+    constructor taicpu.op_reg_reg(op : tasmop;_op1,_op2 : tregister);
       begin
          inherited init(op);
          ops:=2;
@@ -127,7 +127,7 @@ implementation
          loadreg(1,_op2);
       end;
 
-    constructor taippc.op_reg_const(op:tasmop; _op1: tregister; _op2: longint);
+    constructor taicpu.op_reg_const(op:tasmop; _op1: tregister; _op2: longint);
       begin
          inherited init(op);
          ops:=2;
@@ -135,7 +135,7 @@ implementation
          loadconst(1,_op2);
       end;
 
-     constructor taippc.op_const_reg(op:tasmop; _op1: longint; _op2: tregister);
+     constructor taicpu.op_const_reg(op:tasmop; _op1: longint; _op2: tregister);
       begin
          inherited init(op);
          ops:=2;
@@ -144,7 +144,7 @@ implementation
       end;
 
 
-    constructor taippc.op_reg_ref(op : tasmop;_op1 : tregister;_op2 : preference);
+    constructor taicpu.op_reg_ref(op : tasmop;_op1 : tregister;_op2 : preference);
       begin
          inherited init(op);
          ops:=2;
@@ -153,7 +153,7 @@ implementation
       end;
 
 
-    constructor taippc.op_const_const(op : tasmop;_op1,_op2 : longint);
+    constructor taicpu.op_const_const(op : tasmop;_op1,_op2 : longint);
       begin
          inherited init(op);
          ops:=2;
@@ -162,7 +162,7 @@ implementation
       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
          inherited init(op);
          ops:=3;
@@ -171,7 +171,7 @@ implementation
          loadreg(2,_op3);
       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
          inherited init(op);
          ops:=3;
@@ -180,7 +180,7 @@ implementation
          loadconst(2,_op3);
       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
          inherited init(op);
          ops:=3;
@@ -189,7 +189,7 @@ implementation
          loadsymbol(0,_op3,_op3ofs);
       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
          inherited init(op);
          ops:=3;
@@ -198,7 +198,7 @@ implementation
          loadref(2,_op3);
       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
          inherited init(op);
          ops:=3;
@@ -207,7 +207,7 @@ implementation
          loadreg(2,_op3);
       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
          inherited init(op);
          ops:=3;
@@ -217,7 +217,7 @@ implementation
       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
          inherited init(op);
          ops:=4;
@@ -227,7 +227,7 @@ implementation
          loadreg(3,_op4);
       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
          inherited init(op);
          ops:=4;
@@ -237,7 +237,7 @@ implementation
          loadreg(3,_op4);
       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
          inherited init(op);
          ops:=4;
@@ -247,7 +247,7 @@ implementation
          loadconst(0,_op4);
       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
          inherited init(op);
          ops:=5;
@@ -258,7 +258,7 @@ implementation
          loadconst(4,_op5);
       end;
 
-    constructor taippc.op_cond_sym(op : tasmop;cond:TAsmCond;_op1 : pasmsymbol);
+    constructor taicpu.op_cond_sym(op : tasmop;cond:TAsmCond;_op1 : pasmsymbol);
       begin
          inherited init(op);
          condition:=cond;
@@ -266,7 +266,7 @@ implementation
          loadsymbol(0,_op1,0);
       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
          inherited init(op);
          ops:=3;
@@ -276,7 +276,7 @@ implementation
       end;
 
 
-    constructor taippc.op_sym(op : tasmop;_op1 : pasmsymbol);
+    constructor taicpu.op_sym(op : tasmop;_op1 : pasmsymbol);
       begin
          inherited init(op);
          ops:=1;
@@ -284,7 +284,7 @@ implementation
       end;
 
 
-    constructor taippc.op_sym_ofs(op : tasmop;_op1 : pasmsymbol;_op1ofs:longint);
+    constructor taicpu.op_sym_ofs(op : tasmop;_op1 : pasmsymbol;_op1ofs:longint);
       begin
          inherited init(op);
          ops:=1;
@@ -292,7 +292,7 @@ implementation
       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
          inherited init(op);
          ops:=2;
@@ -301,7 +301,7 @@ implementation
       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
          inherited init(op);
          ops:=2;
@@ -309,7 +309,7 @@ implementation
          loadref(1,_op2);
       end;
 
-    destructor taippc.done;
+    destructor taicpu.done;
       var
         i : longint;
       begin
@@ -322,7 +322,10 @@ implementation
 end.
 {
   $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
     * added constant to cpubase of alpha and powerpc for maximum
       number of operands

+ 9 - 6
compiler/pass_2.pas

@@ -135,10 +135,10 @@ implementation
                   ait_instruction :
                      begin
                        { 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
-                           r:=pai386(hp2)^.oper[i-1].ref;
+                           r:=paicpu(hp2)^.oper[i-1].ref;
                            case r^.options of
                              ref_parafixup :
                                r^.offsetfixup:=parafixup;
@@ -547,7 +547,7 @@ implementation
                                        hr^.offset:=pvarsym(regvars[i])^.address+procinfo.call_offset;
                                        hr^.base:=procinfo.framepointer;
 {$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)));
 {$endif i386}
 {$ifdef m68k}
@@ -615,7 +615,7 @@ implementation
                                        hr^.offset:=pvarsym(regvars[i])^.address+procinfo.call_offset;
                                        hr^.base:=procinfo.framepointer;
 {$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)));
 {$endif i386}
 {$ifdef m68k}
@@ -664,7 +664,10 @@ implementation
 end.
 {
   $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
 
   Revision 1.32  1999/08/23 23:25:59  pierre

Fișier diff suprimat deoarece este prea mare
+ 291 - 291
compiler/popt386.pas


+ 6 - 3
compiler/ra386.pas

@@ -295,7 +295,7 @@ procedure T386Instruction.ConcatInstruction(p : paasmoutput);
 var
   siz  : topsize;
   i    : longint;
-  ai   : pai386;
+  ai   : paicpu;
 begin
 { Get Opsize }
   if (opsize<>S_NO) or (Ops=0) then
@@ -308,7 +308,7 @@ begin
       siz:=operands[Ops]^.size;
    end;
 
-  ai:=new(pai386,op_none(opcode,siz));
+  ai:=new(paicpu,op_none(opcode,siz));
   ai^.Ops:=Ops;
   for i:=1to Ops do
    begin
@@ -338,7 +338,10 @@ end;
 end.
 {
   $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
 
   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
                      begin
                         { 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  !!!!!}
                         { you cannot do that for a register that is
@@ -154,12 +154,12 @@ implementation
               { if the mmx register is in use, save it }
               if not(r in unused) then
                 begin
-                   exprasmlist^.concat(new(pai386,op_const_reg(
+                   exprasmlist^.concat(new(paicpu,op_const_reg(
                      A_SUB,S_L,8,R_ESP)));
                    new(hr);
                    reset_reference(hr^);
                    hr^.base:=R_ESP;
-                   exprasmlist^.concat(new(pai386,op_reg_ref(
+                   exprasmlist^.concat(new(paicpu,op_reg_ref(
                      A_MOVQ,S_NO,r,hr)));
                    if not(is_reg_var[r]) then
                      begin
@@ -197,7 +197,7 @@ implementation
                         { then save it }
                         gettempofsizereference(4,hr);
                         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  !!!!!}
                         { you cannot do that for a register that is
                         globally assigned to a var
@@ -222,7 +222,7 @@ implementation
               if not(r in unused) then
                 begin
                    gettempofsizereference(8,hr);
-                   exprasmlist^.concat(new(pai386,op_reg_ref(
+                   exprasmlist^.concat(new(paicpu,op_reg_ref(
                      A_MOVQ,S_NO,r,newreference(hr))));
                    if not(is_reg_var[r]) then
                      begin
@@ -257,9 +257,9 @@ implementation
                    new(hr);
                    reset_reference(hr^);
                    hr^.base:=R_ESP;
-                   exprasmlist^.concat(new(pai386,op_ref_reg(
+                   exprasmlist^.concat(new(paicpu,op_ref_reg(
                      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)));
                    unused:=unused-[r];
 {$ifdef TEMPREGDEBUG}
@@ -271,7 +271,7 @@ implementation
          for r:=R_EBX downto R_EAX do
            if pushed[r] then
              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}
                 if not (r in unused) then
                   { internalerror(10)
@@ -303,7 +303,7 @@ implementation
                    reset_reference(hr);
                    hr.base:=frame_pointer;
                    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)));
                    unused:=unused-[r];
 {$ifdef TEMPREGDEBUG}
@@ -319,7 +319,7 @@ implementation
                 reset_reference(hr);
                 hr.base:=frame_pointer;
                 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}
                 if not (r in unused) then
                   internalerror(10)
@@ -606,7 +606,10 @@ begin
 end.
 {
   $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
       if a tree uses more than registers32 regs then
       internalerror(10) is issued

+ 6 - 3
compiler/win_targ.pas

@@ -221,7 +221,7 @@ unit win_targ;
 {$EndIf GDB}
                      importssection^.concat(new(pai_align,init_op(4,$90)));
                      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;
                   { create head link }
                   importssection^.concat(new(pai_section,init(sec_idata7)));
@@ -331,7 +331,7 @@ unit win_targ;
                       { place jump in codesegment }
                       codesegment^.concat(new(pai_align,init_op(4,$90)));
                       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 }
                       importssection^.concat(new(pai_label,init(l4)));
                     end
@@ -799,7 +799,10 @@ unit win_targ;
 end.
 {
   $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
     * postprocessexecutable is now a method of tlinker
 

Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff