Sfoglia il codice sorgente

* fixed (last?) remaining -tvarsym(X).address to
tg.direction*tvarsym(X).address...

Jonas Maebe 22 anni fa
parent
commit
8acf67d327
3 ha cambiato i file con 20 aggiunte e 12 eliminazioni
  1. 6 6
      compiler/ncgld.pas
  2. 7 3
      compiler/rautils.pas
  3. 7 3
      compiler/regvars.pas

+ 6 - 6
compiler/ncgld.pas

@@ -194,13 +194,9 @@ implementation
                                   location.reference.base:=current_procinfo.framepointer;
                                   if (symtabletype in [inlinelocalsymtable,
                                                        localsymtable])
-{$ifdef powerpc}
-                                    { the ifdef is only for speed reasons }
-                                    and not(target_info.system in [system_powerpc_linux,system_powerpc_macos])
-{$endif powerpc}
                                     then
                                     location.reference.offset:=
-                                      tvarsym(symtableentry).address-symtable.address_fixup
+                                      tvarsym(symtableentry).address+tg.direction*symtable.address_fixup
                                   else
                                     location.reference.offset:=
                                       tvarsym(symtableentry).address+symtable.address_fixup;
@@ -936,7 +932,11 @@ begin
 end.
 {
   $Log$
-  Revision 1.57  2003-05-11 21:37:03  peter
+  Revision 1.58  2003-05-12 17:22:00  jonas
+    * fixed (last?) remaining -tvarsym(X).address to
+      tg.direction*tvarsym(X).address...
+
+  Revision 1.57  2003/05/11 21:37:03  peter
     * moved implicit exception frame from ncgutil to psub
     * constructor/destructor helpers moved from cobj/ncgutil to psub
 

+ 7 - 3
compiler/rautils.pas

@@ -218,7 +218,7 @@ uses
   defutil,systems,verbose,globals,
   symsym,symtable,paramgr,
   aasmcpu,
-  cgbase;
+  cgbase,tgobj;
 
 {*************************************************************************
                               TExprParse
@@ -877,7 +877,7 @@ Begin
                       else
                         message1(asmr_e_local_para_unreachable,s);
                     end;
-                  opr.ref.offset:=-(tvarsym(sym).address);
+                  opr.ref.offset:=tg.direction*(tvarsym(sym).address);
                   if (current_procdef.localst.symtablelevel=tvarsym(sym).owner.symtablelevel) then
                     begin
                       opr.ref.offsetfixup:=current_procdef.localst.address_fixup;
@@ -1574,7 +1574,11 @@ end;
 end.
 {
   $Log$
-  Revision 1.58  2003-04-27 11:21:34  peter
+  Revision 1.59  2003-05-12 17:22:00  jonas
+    * fixed (last?) remaining -tvarsym(X).address to
+      tg.direction*tvarsym(X).address...
+
+  Revision 1.58  2003/04/27 11:21:34  peter
     * aktprocdef renamed to current_procdef
     * procinfo renamed to current_procinfo
     * procinfo will now be stored in current_module so it can be

+ 7 - 3
compiler/regvars.pas

@@ -305,7 +305,7 @@ implementation
                   begin
                     reference_reset(hr);
                     if vsym.owner.symtabletype in [inlinelocalsymtable,localsymtable] then
-                      hr.offset:=-vsym.address+vsym.owner.address_fixup
+                      hr.offset:=tg.direction*vsym.address+vsym.owner.address_fixup
                     else
                       hr.offset:=vsym.address+vsym.owner.address_fixup;
                     hr.base:=current_procinfo.framepointer;
@@ -332,7 +332,7 @@ implementation
           asml.concat(tai_regalloc.alloc(reg));
           reference_reset(hr);
           if vsym.owner.symtabletype in [inlinelocalsymtable,localsymtable] then
-            hr.offset:=-vsym.address+vsym.owner.address_fixup
+            hr.offset:=tg.direction*vsym.address+vsym.owner.address_fixup
           else
             hr.offset:=vsym.address+vsym.owner.address_fixup;
           hr.base:=current_procinfo.framepointer;
@@ -500,7 +500,11 @@ end.
 
 {
   $Log$
-  Revision 1.47  2003-04-27 11:21:34  peter
+  Revision 1.48  2003-05-12 17:22:00  jonas
+    * fixed (last?) remaining -tvarsym(X).address to
+      tg.direction*tvarsym(X).address...
+
+  Revision 1.47  2003/04/27 11:21:34  peter
     * aktprocdef renamed to current_procdef
     * procinfo renamed to current_procinfo
     * procinfo will now be stored in current_module so it can be