mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-01 13:09:32 +01:00
* write absolute references correctly on avr, resolves #32040
git-svn-id: trunk@37419 -
This commit is contained in:
parent
d9bc656852
commit
3d3298f64d
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -15786,6 +15786,7 @@ tests/webtbs/tw3185.pp svneol=native#text/plain
|
|||||||
tests/webtbs/tw3190.pp svneol=native#text/plain
|
tests/webtbs/tw3190.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw31945.pp svneol=native#text/pascal
|
tests/webtbs/tw31945.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw3197.pp svneol=native#text/plain
|
tests/webtbs/tw3197.pp svneol=native#text/plain
|
||||||
|
tests/webtbs/tw32040.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw32043.pp svneol=native#text/pascal
|
tests/webtbs/tw32043.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw3207.pp svneol=native#text/plain
|
tests/webtbs/tw3207.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw3210.pp svneol=native#text/plain
|
tests/webtbs/tw3210.pp svneol=native#text/plain
|
||||||
|
|||||||
@ -119,7 +119,9 @@ unit agavrgas;
|
|||||||
if assigned(symbol) then
|
if assigned(symbol) then
|
||||||
s:=ReplaceForbiddenAsmSymbolChars(symbol.name);
|
s:=ReplaceForbiddenAsmSymbolChars(symbol.name);
|
||||||
|
|
||||||
if offset<0 then
|
if s='' then
|
||||||
|
s:=tostr(offset)
|
||||||
|
else if offset<0 then
|
||||||
s:=s+tostr(offset)
|
s:=s+tostr(offset)
|
||||||
else if offset>0 then
|
else if offset>0 then
|
||||||
s:=s+'+'+tostr(offset);
|
s:=s+'+'+tostr(offset);
|
||||||
|
|||||||
40
tests/webtbs/tw32040.pp
Normal file
40
tests/webtbs/tw32040.pp
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
{ %cpu=avr }
|
||||||
|
{ %norun }
|
||||||
|
const
|
||||||
|
c0 = 0;
|
||||||
|
c1 = 1;
|
||||||
|
c2 = $02;
|
||||||
|
c10 = $10;
|
||||||
|
c22 = $22;
|
||||||
|
c100 = $100;
|
||||||
|
c1000 = $1000;
|
||||||
|
c3070 = $3070;
|
||||||
|
|
||||||
|
procedure something; assembler; nostackframe;
|
||||||
|
asm
|
||||||
|
ldi ZL, lo8(c0);
|
||||||
|
ldi ZH, hi8(c0);
|
||||||
|
ldi ZL, lo8(c1);
|
||||||
|
ldi ZH, hi8(c1);
|
||||||
|
ldi ZL, lo8(c2);
|
||||||
|
ldi ZH, hi8(c2);
|
||||||
|
ldi ZL, lo8(c10);
|
||||||
|
ldi ZH, hi8(c10);
|
||||||
|
ldi ZL, lo8(c22);
|
||||||
|
ldi ZH, hi8(c22);
|
||||||
|
ldi ZL, lo8(c100);
|
||||||
|
ldi ZH, hi8(c100);
|
||||||
|
ldi ZL, lo8(c1000);
|
||||||
|
ldi ZH, hi8(c1000);
|
||||||
|
ldi ZL, lo8(c3070);
|
||||||
|
ldi ZH, hi8(c3070);
|
||||||
|
|
||||||
|
ldi ZL, lo8(0x3070);
|
||||||
|
ldi ZH, hi8(0x3070);
|
||||||
|
ldi ZL, lo8(0x300);
|
||||||
|
ldi ZH, hi8(0x300);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
begin
|
||||||
|
end.
|
||||||
Loading…
Reference in New Issue
Block a user