Przeglądaj źródła

* fix sparc compile

peter 22 lat temu
rodzic
commit
7ff85f0779

+ 7 - 1
compiler/sparc/cpubase.pas

@@ -278,6 +278,9 @@ const
   first_supreg = $01;
   last_supreg = $18;
 
+  first_imreg = $19;
+  last_imreg = $ff;
+
   {Subregisters; nothing known about.}
   R_SUBWHOLE=$00;
   R_SUBL=$00;
@@ -660,7 +663,10 @@ END.
 
 {
   $Log$
-  Revision 1.26  2003-04-23 12:35:35  florian
+  Revision 1.27  2003-04-23 13:35:39  peter
+    * fix sparc compile
+
+  Revision 1.26  2003/04/23 12:35:35  florian
     * fixed several issues with powerpc
     + applied a patch from Jonas for nested function calls (PowerPC only)
     * ...

+ 5 - 2
compiler/sparc/cpupara.pas

@@ -54,7 +54,7 @@ function TSparcParaManager.GetIntParaLoc(nr:longint):TParaLocation;
       then{The six first parameters are passed into registers}
         begin
           loc:=LOC_REGISTER;
-          register:=TRegister(LongInt(R_i0)+nr);
+          register.enum:=ToldRegister(LongInt(R_i0)+nr);
         end
       else{The other parameters are passed into the frame}
         begin
@@ -281,7 +281,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.15  2003-04-23 12:35:35  florian
+  Revision 1.16  2003-04-23 13:35:39  peter
+    * fix sparc compile
+
+  Revision 1.15  2003/04/23 12:35:35  florian
     * fixed several issues with powerpc
     + applied a patch from Jonas for nested function calls (PowerPC only)
     * ...

+ 7 - 32
compiler/sparc/ncpucnv.pas

@@ -30,7 +30,7 @@ interface
     type
        TSparcTypeConvNode = class(TCgTypeConvNode)
          protected
-          procedure second_int_to_int;override;
+         { procedure second_int_to_int;override; }
          { procedure second_string_to_string;override; }
          { procedure second_cstring_to_pchar;override; }
          { procedure second_string_to_chararray;override; }
@@ -107,35 +107,7 @@ implementation
 {*****************************************************************************
                              SecondTypeConv
 *****************************************************************************}
-procedure TSparctypeconvnode.second_int_to_int;
-  var
-    newsize:tcgsize;
-    size,leftsize:cardinal;
-  begin
-    newsize:=def_cgsize(resulttype.def);
-    { insert range check if not explicit conversion }
-    if not(nf_explizit in flags)
-    then
-      cg.g_rangecheck(exprasmlist,left,resulttype.def);
-    { is the result size smaller ? }
-    size := resulttype.def.size;
-    leftsize := left.resulttype.def.size;
-    if(size < leftsize)or
-      (((newsize in [OS_64,OS_S64])or
-      (left.location.loc <> LOC_REGISTER))and(size > leftsize))
-    then
-      begin
-        { reuse the left location by default }
-        location_copy(location,left.location);
-        location_force_reg(exprasmlist,location,newsize,false);
-      end
-    else
-      begin
-        { no special loading is required, reuse current location }
-        location_copy(location,left.location);
-        location.size:=newsize;
-      end;
-  end;
+
 procedure TSparctypeconvnode.second_int_to_real;
   type
     tdummyarray = packed array[0..7] of byte;
@@ -275,7 +247,7 @@ procedure TSparctypeconvnode.second_int_to_bool;
   begin
     { byte(boolean) or word(wordbool) or longint(longbool) must }
     { be accepted for var parameters                            }
-    if(nf_explizit in flags)and
+    if(nf_explicit in flags)and
       (left.resulttype.def.size=resulttype.def.size)and
       (left.location.loc in [LOC_REFERENCE,LOC_CREFERENCE,LOC_CREGISTER])
     then
@@ -388,7 +360,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.13  2003-03-10 21:59:54  mazen
+  Revision 1.14  2003-04-23 13:35:39  peter
+    * fix sparc compile
+
+  Revision 1.13  2003/03/10 21:59:54  mazen
   * fixing index overflow in handling new registers arrays.
 
   Revision 1.12  2003/02/19 22:00:17  daniel