mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-07 09:30:21 +02:00
* do not reuse a loaded reference for avrtiny in a_op_const*, resolves #38142
git-svn-id: trunk@47612 -
This commit is contained in:
parent
b0cbff6463
commit
eb098a3d11
@ -586,7 +586,8 @@ implementation
|
||||
uses
|
||||
globals,systems,fmodule,
|
||||
verbose,paramgr,symsym,symtable,
|
||||
tgobj,cutils,procinfo;
|
||||
tgobj,cutils,procinfo,
|
||||
cpuinfo;
|
||||
|
||||
{*****************************************************************************
|
||||
basic functionallity
|
||||
@ -1997,7 +1998,10 @@ implementation
|
||||
tmpreg : tregister;
|
||||
tmpref : treference;
|
||||
begin
|
||||
if assigned(ref.symbol) then
|
||||
if assigned(ref.symbol)
|
||||
{ for avrtiny, the code generator generates a ref which is Z relative and while using it,
|
||||
Z is changed, so the following code breaks }
|
||||
{$ifdef avr}and not(CPUAVR_16_REGS in cpu_capabilities[current_settings.cputype]){$endif avr} then
|
||||
begin
|
||||
tmpreg:=getaddressregister(list);
|
||||
a_loadaddr_ref_reg(list,ref,tmpreg);
|
||||
@ -2030,7 +2034,10 @@ implementation
|
||||
tmpreg : tregister;
|
||||
tmpref : treference;
|
||||
begin
|
||||
if assigned(ref.symbol) then
|
||||
if assigned(ref.symbol)
|
||||
{ for avrtiny, the code generator generates a ref which is Z relative and while using it,
|
||||
Z is changed, so the following code breaks }
|
||||
{$ifdef avr}and not(CPUAVR_16_REGS in cpu_capabilities[current_settings.cputype]){$endif avr} then
|
||||
begin
|
||||
tmpreg:=getaddressregister(list);
|
||||
a_loadaddr_ref_reg(list,ref,tmpreg);
|
||||
|
Loading…
Reference in New Issue
Block a user