diff options
Diffstat (limited to 'compiler/powerpc')
-rw-r--r-- | compiler/powerpc/agppcvasm.pas | 2 | ||||
-rw-r--r-- | compiler/powerpc/cpuinfo.pas | 20 | ||||
-rw-r--r-- | compiler/powerpc/cpupara.pas | 6 | ||||
-rw-r--r-- | compiler/powerpc/nppcadd.pas | 5 | ||||
-rw-r--r-- | compiler/powerpc/nppcmat.pas | 1 | ||||
-rw-r--r-- | compiler/powerpc/symcpu.pas | 14 |
6 files changed, 42 insertions, 6 deletions
diff --git a/compiler/powerpc/agppcvasm.pas b/compiler/powerpc/agppcvasm.pas index 39e93ad29d..4b01f28885 100644 --- a/compiler/powerpc/agppcvasm.pas +++ b/compiler/powerpc/agppcvasm.pas @@ -165,7 +165,7 @@ unit agppcvasm; top_ref : begin if o.ref^.refaddr<>addr_full then - internalerror(200402262); + internalerror(200402264); hs:=o.ref^.symbol.name; if o.ref^.offset>0 then hs:=hs+'+'+tostr(o.ref^.offset) diff --git a/compiler/powerpc/cpuinfo.pas b/compiler/powerpc/cpuinfo.pas index 340faf7fd4..ac7b4e3cd1 100644 --- a/compiler/powerpc/cpuinfo.pas +++ b/compiler/powerpc/cpuinfo.pas @@ -21,6 +21,9 @@ Interface Type bestreal = double; +{$if FPC_FULLVERSION>20700} + bestrealrec = TDoubleRec; +{$endif FPC_FULLVERSION>20700} ts32real = single; ts64real = double; ts80real = extended; @@ -44,8 +47,25 @@ Type fpu_standard ); + tcontrollertype = + (ct_none + ); + Const + { Is there support for dealing with multiple microcontrollers available } + { for this platform? } + ControllerSupport = false; + + { We know that there are fields after sramsize + but we don't care about this warning } + {$PUSH} + {$WARN 3177 OFF} + embedded_controllers : array [tcontrollertype] of tcontrollerdatatype = + ( + (controllertypestr:''; controllerunitstr:''; flashbase:0; flashsize:0; srambase:0; sramsize:0)); + {$POP} + { calling conventions supported by the code generator } supported_calling_conventions : tproccalloptions = [ pocall_internproc, diff --git a/compiler/powerpc/cpupara.pas b/compiler/powerpc/cpupara.pas index 410a623642..c06ce6d45d 100644 --- a/compiler/powerpc/cpupara.pas +++ b/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 } diff --git a/compiler/powerpc/nppcadd.pas b/compiler/powerpc/nppcadd.pas index 7b38f363de..a1f33a7bcd 100644 --- a/compiler/powerpc/nppcadd.pas +++ b/compiler/powerpc/nppcadd.pas @@ -73,6 +73,7 @@ interface tmpreg : tregister; useconst : boolean; begin + tmpreg:=NR_NO; // get the constant on the right if there is one if (left.location.loc = LOC_CONSTANT) then swapleftright; @@ -512,6 +513,8 @@ interface op1 := A_MULLW; op2 := A_MULHWU end; + else + internalerror(2014082040); end; end; current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg_reg(op1,location.register64.reglo, @@ -663,6 +666,8 @@ interface cgop := OP_OR; andn: cgop := OP_AND; + else + internalerror(2014082041); end; if (left.location.loc = LOC_CONSTANT) then swapleftright; diff --git a/compiler/powerpc/nppcmat.pas b/compiler/powerpc/nppcmat.pas index 8359e65372..8f937a6302 100644 --- a/compiler/powerpc/nppcmat.pas +++ b/compiler/powerpc/nppcmat.pas @@ -419,6 +419,7 @@ implementation op: tasmop; begin + src1:=NR_NO; secondpass(left); if is_64bit(left.resultdef) then begin diff --git a/compiler/powerpc/symcpu.pas b/compiler/powerpc/symcpu.pas index 0e76662a88..30bbefe212 100644 --- a/compiler/powerpc/symcpu.pas +++ b/compiler/powerpc/symcpu.pas @@ -186,14 +186,16 @@ implementation procedure tcpuprocdef.ppuload_platform(ppufile: tcompilerppufile); begin inherited; - ppufile.getderef(libsymderef); + if po_syscall_has_libsym in procoptions then + ppufile.getderef(libsymderef); end; procedure tcpuprocdef.ppuwrite_platform(ppufile: tcompilerppufile); begin inherited; - ppufile.putderef(libsymderef); + if po_syscall_has_libsym in procoptions then + ppufile.putderef(libsymderef); end; @@ -208,14 +210,18 @@ implementation procedure tcpuprocdef.buildderef; begin inherited; - libsymderef.build(libsym); + if po_syscall_has_libsym in procoptions then + libsymderef.build(libsym); end; procedure tcpuprocdef.deref; begin inherited; - libsym:=tsym(libsymderef.resolve); + if po_syscall_has_libsym in procoptions then + libsym:=tsym(libsymderef.resolve) + else + libsym:=nil; end; begin |