mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-13 00:09:32 +02:00
* LDD/STD need always an offset, resolves #33086
git-svn-id: trunk@38072 -
This commit is contained in:
parent
92e616e30c
commit
796eb542be
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -15965,6 +15965,7 @@ tests/webtbs/tw3294a.pp svneol=native#text/plain
|
||||
tests/webtbs/tw3298.pp svneol=native#text/plain
|
||||
tests/webtbs/tw33004.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw3301.pp svneol=native#text/plain
|
||||
tests/webtbs/tw33086.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw3309.pp svneol=native#text/plain
|
||||
tests/webtbs/tw3320.pp svneol=native#text/plain
|
||||
tests/webtbs/tw3324.pp svneol=native#text/plain
|
||||
|
@ -75,6 +75,9 @@ unit agavrgas;
|
||||
|
||||
Procedure TAVRInstrWriter.WriteInstruction(hp : tai);
|
||||
|
||||
var
|
||||
op: TAsmOp;
|
||||
|
||||
function getreferencestring(var ref : treference) : string;
|
||||
var
|
||||
s : string;
|
||||
@ -107,12 +110,14 @@ unit agavrgas;
|
||||
s:=s+gas_regname(base);
|
||||
end;
|
||||
if addressmode=AM_POSTINCREMENT then
|
||||
s:=s+'+';
|
||||
|
||||
if offset>0 then
|
||||
s:=s+'+'+tostr(offset)
|
||||
else if offset<0 then
|
||||
s:=s+tostr(offset);
|
||||
s:=s+'+'
|
||||
else if addressmode = AM_UNCHANGED then
|
||||
begin
|
||||
if (offset>0) or ((offset=0) and (op in [A_LDD,A_STD])) then
|
||||
s:=s+'+'+tostr(offset)
|
||||
else if offset<0 then
|
||||
s:=s+tostr(offset);
|
||||
end;
|
||||
end
|
||||
else if assigned(symbol) or (offset<>0) then
|
||||
begin
|
||||
@ -174,10 +179,10 @@ unit agavrgas;
|
||||
end;
|
||||
end;
|
||||
|
||||
var op: TAsmOp;
|
||||
s: string;
|
||||
i: byte;
|
||||
sep: string[3];
|
||||
var
|
||||
s: string;
|
||||
i: byte;
|
||||
sep: string[3];
|
||||
begin
|
||||
op:=taicpu(hp).opcode;
|
||||
s:=#9+gas_op2str[op]+cond2str[taicpu(hp).condition];
|
||||
|
9
tests/webtbs/tw33086.pp
Normal file
9
tests/webtbs/tw33086.pp
Normal file
@ -0,0 +1,9 @@
|
||||
{ %cpu=avr }
|
||||
program test;
|
||||
|
||||
begin
|
||||
asm
|
||||
ldd r20, z+0
|
||||
std y+0, r20
|
||||
end;
|
||||
end.
|
Loading…
Reference in New Issue
Block a user