Browse Source

* handling of address registers in references fixed
* write address registers as areg when compiling with -sr

git-svn-id: trunk@2398 -

florian 19 years ago
parent
commit
137f8f340d
2 changed files with 5 additions and 1 deletions
  1. 4 0
      compiler/cgbase.pas
  2. 1 1
      compiler/rgobj.pas

+ 4 - 0
compiler/cgbase.pas

@@ -520,6 +520,10 @@ implementation
             result:='mreg'+nr;
             result:='mreg'+nr;
           R_MMXREGISTER:
           R_MMXREGISTER:
             result:='xreg'+nr;
             result:='xreg'+nr;
+          R_ADDRESSREGISTER:
+            result:='areg'+nr;
+          R_SPECIALREGISTER:
+            result:='sreg'+nr;
           else
           else
             begin
             begin
               result:='INVALID';
               result:='INVALID';

+ 1 - 1
compiler/rgobj.pas

@@ -1638,7 +1638,7 @@ unit rgobj;
                                setsupreg(reg,reginfo[getsupreg(reg)].colour);
                                setsupreg(reg,reginfo[getsupreg(reg)].colour);
                           Top_ref:
                           Top_ref:
                             begin
                             begin
-                              if regtype=R_INTREGISTER then
+                              if regtype in [R_INTREGISTER,R_ADDRESSREGISTER] then
                                 with ref^ do
                                 with ref^ do
                                   begin
                                   begin
                                     if base<>NR_NO then
                                     if base<>NR_NO then