|
@@ -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);
|