瀏覽代碼

PowerPC: in MorphOS syscalls the explicit paraloc size should always be OS_ADDR

git-svn-id: trunk@28686 -
Károly Balogh 11 年之前
父節點
當前提交
c22dd6f022
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      compiler/powerpc/cpupara.pas

+ 5 - 1
compiler/powerpc/cpupara.pas

@@ -670,7 +670,11 @@ unit cpupara;
               p.paraloc[callerside].intsize:=tcgsize2size[paracgsize];
               paraloc:=p.paraloc[callerside].add_location;
               paraloc^.loc:=LOC_REFERENCE;
-              paraloc^.size:=paracgsize;
+              { The OS side should be zero extended and the entire "virtual"
+                68k register should be overwritten. This is what the C ppcinline
+                macros do as well, by casting all arguments to ULONG. A call
+                which breaks w/o this is for example exec/RawPutChar (KB) }
+              paraloc^.size:=OS_ADDR;
               paraloc^.def:=p.vardef;
               paraloc^.reference.index:=newreg(R_INTREGISTER,RS_R2,R_SUBWHOLE);
               { pattern is always uppercase'd }