Explorar o código

m68k: implement taicpu.spilling_get_operation_type_ref, supports predecrement/postincrement addressing

git-svn-id: trunk@29593 -
Károly Balogh %!s(int64=10) %!d(string=hai) anos
pai
achega
460c4acaee
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      compiler/m68k/aasmcpu.pas

+ 8 - 0
compiler/m68k/aasmcpu.pas

@@ -87,6 +87,7 @@ type
 
      function is_same_reg_move(regtype: Tregistertype):boolean;override;
      function spilling_get_operation_type(opnr: longint): topertype;override;
+     function spilling_get_operation_type_ref(opnr: longint; reg: tregister): topertype;override;
 
   private
      procedure init(_size : topsize); { this need to be called by all constructor }
@@ -501,6 +502,13 @@ type
         end;
       end;
 
+    function taicpu.spilling_get_operation_type_ref(opnr: longint; reg: tregister): topertype;
+      begin
+        result := operand_read;
+        if (oper[opnr]^.ref^.base = reg) and
+          (oper[opnr]^.ref^.direction <> dir_none) then
+           result := operand_readwrite;
+      end;
 
     function spilling_create_load(const ref:treference;r:tregister):Taicpu;
       begin