Browse Source

* -Or fix for absolute

peter 21 years ago
parent
commit
a2cbf27e96
3 changed files with 21 additions and 7 deletions
  1. 6 1
      compiler/ncgcnv.pas
  2. 8 5
      compiler/ncgmem.pas
  3. 7 1
      compiler/ncnv.pas

+ 6 - 1
compiler/ncgcnv.pas

@@ -478,6 +478,8 @@ interface
 
         { but use the new size, but we don't know the size of all arrays }
         location.size:=def_cgsize(resulttype.def);
+        if location.loc in [LOC_REGISTER,LOC_CREGISTER] then
+          location.register:=cg.makeregsize(exprasmlist,location.register,location.size);
       end;
 
 
@@ -529,7 +531,10 @@ end.
 
 {
   $Log$
-  Revision 1.61  2004-10-31 21:45:03  peter
+  Revision 1.62  2004-11-01 15:31:58  peter
+    * -Or fix for absolute
+
+  Revision 1.61  2004/10/31 21:45:03  peter
     * generic tlocation
     * move tlocation to cgutils
 

+ 8 - 5
compiler/ncgmem.pas

@@ -78,10 +78,6 @@ interface
 implementation
 
     uses
-{$ifdef GDB}
-      strings,
-      gdb,
-{$endif GDB}
       systems,
       cutils,verbose,globals,
       symconst,symdef,symsym,defutil,paramgr,
@@ -645,6 +641,10 @@ implementation
          else
            location_copy(location,left.location);
 
+         { location must be memory }
+         if not(location.loc in [LOC_REFERENCE,LOC_CREFERENCE]) then
+           internalerror(200411013);
+
          { offset can only differ from 0 if arraydef }
          if (left.resulttype.def.deftype=arraydef) and
             not(is_dynamic_array(left.resulttype.def)) then
@@ -879,7 +879,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.98  2004-10-25 15:38:41  peter
+  Revision 1.99  2004-11-01 15:31:57  peter
+    * -Or fix for absolute
+
+  Revision 1.98  2004/10/25 15:38:41  peter
     * heap and heapsize removed
     * checkpointer fixes
 

+ 7 - 1
compiler/ncnv.pas

@@ -1158,6 +1158,9 @@ implementation
         if (nf_absolute in flags) then
           begin
             convtype:=tc_equal;
+            if not(tstoreddef(resulttype.def).is_intregable) and
+               not(tstoreddef(resulttype.def).is_fpuregable) then
+              make_not_regable(left);
             exit;
           end;
 
@@ -2463,7 +2466,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.157  2004-10-24 11:44:28  peter
+  Revision 1.158  2004-11-01 15:31:58  peter
+    * -Or fix for absolute
+
+  Revision 1.157  2004/10/24 11:44:28  peter
     * small regvar fixes
     * loadref parameter removed from concatcopy,incrrefcount,etc