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 năm trước cách đây
mục cha
commit
137f8f340d
2 tập tin đã thay đổi với 5 bổ sung1 xóa
  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;
           R_MMXREGISTER:
             result:='xreg'+nr;
+          R_ADDRESSREGISTER:
+            result:='areg'+nr;
+          R_SPECIALREGISTER:
+            result:='sreg'+nr;
           else
             begin
               result:='INVALID';

+ 1 - 1
compiler/rgobj.pas

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