* write align opcode in text sections in case of gas output, fixes #7440

git-svn-id: trunk@4702 -
This commit is contained in:
florian 2006-09-24 07:44:33 +00:00
parent aec8c2a466
commit d15f5871c2
3 changed files with 23 additions and 3 deletions

1
.gitattributes vendored
View File

@ -7332,6 +7332,7 @@ tests/webtbs/tw7276.pp svneol=native#text/plain
tests/webtbs/tw7372.pp svneol=native#text/plain
tests/webtbs/tw7379.pp svneol=native#text/plain
tests/webtbs/tw7425.pp svneol=native#text/plain
tests/webtbs/tw7440.pp svneol=native#text/plain
tests/webtbs/ub1873.pp svneol=native#text/plain
tests/webtbs/ub1883.pp svneol=native#text/plain
tests/webtbs/uw0555.pp svneol=native#text/plain

View File

@ -233,8 +233,8 @@ implementation
// if paratargetdbg = dbg_dwarf then
// result := result + ' --gdwarf-2';
end;
function TGNUAssembler.NextSetLabel: string;
begin
inc(setcount);
@ -529,7 +529,12 @@ implementation
begin
AsmWrite(#9'.balign '+tostr(tai_align_abstract(hp).aligntype));
if tai_align_abstract(hp).use_op then
AsmWrite(','+tostr(tai_align_abstract(hp).fillop))
AsmWrite(','+tostr(tai_align_abstract(hp).fillop))
{$ifdef x86}
{ force NOP as alignment op code }
else if CurrSecType=sec_code then
AsmWrite(',90');
{$endif x86}
end
else
begin

14
tests/webtbs/tw7440.pp Normal file
View File

@ -0,0 +1,14 @@
{ %CPU=i386 %OPT=-S2cgi -OG2 -gl -al }
program bugloop;
{$mode objfpc}
var
d: array[0..0] of double;
i: integer;
begin
for i := low(d) to high(d) do
d[i] := i;
writeln('ok');
end.