* fixed writing memory references on ppc when there is only an offset

(mantis #12685 and also the error message noted in mantis #12576,
     although in case of the latter it's only a symptom of another bug)

git-svn-id: trunk@12199 -
This commit is contained in:
Jonas Maebe 2008-11-22 15:13:16 +00:00
parent 5b5895b8ff
commit 3d25478436
3 changed files with 30 additions and 2 deletions

1
.gitattributes vendored
View File

@ -8618,6 +8618,7 @@ tests/webtbs/tw1255.pp svneol=native#text/plain
tests/webtbs/tw12575.pp svneol=native#text/plain
tests/webtbs/tw12597.pp svneol=native#text/plain
tests/webtbs/tw12614.pp svneol=native#text/plain
tests/webtbs/tw12685.pp svneol=native#text/plain
tests/webtbs/tw1269.pp svneol=native#text/plain
tests/webtbs/tw1275.pp svneol=native#text/plain
tests/webtbs/tw1279.pp svneol=native#text/plain

View File

@ -132,14 +132,18 @@ unit agppcgas;
s := s + ')@got';
{$endif cpu64bitaddr}
if (index=NR_NO) and (base<>NR_NO) then
if (index=NR_NO) then
begin
if offset=0 then
begin
if not (assigned(symbol)) then
s:=s+'0';
end;
s:=s+'('+gas_regname(base)+')';
if (base<>NR_NO) then
s:=s+'('+gas_regname(base)+')'
else if not assigned(symbol) and
not(refaddr in verbose_refaddrs) then
s:=s+'(0)';
end
else if (index<>NR_NO) and (base<>NR_NO) then
begin

23
tests/webtbs/tw12685.pp Normal file
View File

@ -0,0 +1,23 @@
{ %norun }
program BuggyProgram;
const
SE_SysEvtMask = $144;
SE_SysEvtMask2 = $14422241;
type
intPtr = ^integer;
function GetSystemEventMask: INTEGER;
begin
GetSystemEventMask := intPtr(SE_SysEvtMask)^;
GetSystemEventMask := intPtr(SE_SysEvtMask2)^;
end;
procedure StoreSystemEventMask (theMask: INTEGER);
begin
intPtr(SE_SysEvtMask)^ := theMask;
intPtr(SE_SysEvtMask2)^ := theMask;
end;
begin
end.