mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 13:59:07 +02:00
* patch Christo Crause: Use LDS for 8 bit references, resolves #38173
git-svn-id: trunk@47700 -
This commit is contained in:
parent
4f3271500a
commit
c0d75c1c69
@ -2001,7 +2001,9 @@ implementation
|
|||||||
if assigned(ref.symbol)
|
if assigned(ref.symbol)
|
||||||
{ for avrtiny, the code generator generates a ref which is Z relative and while using it,
|
{ for avrtiny, the code generator generates a ref which is Z relative and while using it,
|
||||||
Z is changed, so the following code breaks }
|
Z is changed, so the following code breaks }
|
||||||
{$ifdef avr}and not(CPUAVR_16_REGS in cpu_capabilities[current_settings.cputype]){$endif avr} then
|
{$ifdef avr}
|
||||||
|
and not((CPUAVR_16_REGS in cpu_capabilities[current_settings.cputype]) or (tcgsize2size[size]=1))
|
||||||
|
{$endif avr} then
|
||||||
begin
|
begin
|
||||||
tmpreg:=getaddressregister(list);
|
tmpreg:=getaddressregister(list);
|
||||||
a_loadaddr_ref_reg(list,ref,tmpreg);
|
a_loadaddr_ref_reg(list,ref,tmpreg);
|
||||||
@ -2037,7 +2039,9 @@ implementation
|
|||||||
if assigned(ref.symbol)
|
if assigned(ref.symbol)
|
||||||
{ for avrtiny, the code generator generates a ref which is Z relative and while using it,
|
{ for avrtiny, the code generator generates a ref which is Z relative and while using it,
|
||||||
Z is changed, so the following code breaks }
|
Z is changed, so the following code breaks }
|
||||||
{$ifdef avr}and not(CPUAVR_16_REGS in cpu_capabilities[current_settings.cputype]){$endif avr} then
|
{$ifdef avr}
|
||||||
|
and not((CPUAVR_16_REGS in cpu_capabilities[current_settings.cputype]) or (tcgsize2size[size]=1))
|
||||||
|
{$endif avr} then
|
||||||
begin
|
begin
|
||||||
tmpreg:=getaddressregister(list);
|
tmpreg:=getaddressregister(list);
|
||||||
a_loadaddr_ref_reg(list,ref,tmpreg);
|
a_loadaddr_ref_reg(list,ref,tmpreg);
|
||||||
@ -2273,7 +2277,12 @@ implementation
|
|||||||
begin
|
begin
|
||||||
if not (Op in [OP_NOT,OP_NEG]) then
|
if not (Op in [OP_NOT,OP_NEG]) then
|
||||||
internalerror(2020050710);
|
internalerror(2020050710);
|
||||||
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]) or (tcgsize2size[size]=1))
|
||||||
|
{$endif avr} then
|
||||||
begin
|
begin
|
||||||
tmpreg:=getaddressregister(list);
|
tmpreg:=getaddressregister(list);
|
||||||
a_loadaddr_ref_reg(list,ref,tmpreg);
|
a_loadaddr_ref_reg(list,ref,tmpreg);
|
||||||
|
Loading…
Reference in New Issue
Block a user