mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-19 16:19:11 +02:00
* AVR: couple of fixes for CPUs with only 16 registers
git-svn-id: trunk@44177 -
(cherry picked from commit fc50edfe31
)
This commit is contained in:
parent
265783c4b5
commit
9872a8a57a
@ -170,7 +170,7 @@ unit cpupara;
|
|||||||
result:=not(def.size in [1,2,4]);
|
result:=not(def.size in [1,2,4]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (def.size > 8) then
|
if (def.size > 8) or ((CPUAVR_16_REGS in cpu_capabilities[current_settings.cputype]) and (def.size > 4)) then
|
||||||
result:=true
|
result:=true
|
||||||
else
|
else
|
||||||
result:=inherited ret_in_param(def,pd);
|
result:=inherited ret_in_param(def,pd);
|
||||||
@ -343,7 +343,8 @@ unit cpupara;
|
|||||||
case loc of
|
case loc of
|
||||||
LOC_REGISTER:
|
LOC_REGISTER:
|
||||||
begin
|
begin
|
||||||
if nextintreg>=RS_R8 then
|
if ((nextintreg>=RS_R8) and not(CPUAVR_16_REGS in cpu_capabilities[current_settings.cputype])) or
|
||||||
|
(nextintreg>=RS_R20) then
|
||||||
begin
|
begin
|
||||||
paraloc^.loc:=LOC_REGISTER;
|
paraloc^.loc:=LOC_REGISTER;
|
||||||
paraloc^.size:=OS_8;
|
paraloc^.size:=OS_8;
|
||||||
|
Loading…
Reference in New Issue
Block a user