* fixed pushing of words in intel assembler (indirectly related to

wrong bug report 7808)

git-svn-id: trunk@6274 -
This commit is contained in:
Jonas Maebe 2007-01-30 21:52:11 +00:00
parent b16b9d5251
commit 1a32e4fdf5
3 changed files with 23 additions and 0 deletions

1
.gitattributes vendored
View File

@ -7980,6 +7980,7 @@ tests/webtbs/tw7719.pp svneol=native#text/plain
tests/webtbs/tw7756.pp svneol=native#text/plain
tests/webtbs/tw7803.pp svneol=native#text/plain
tests/webtbs/tw7806.pp svneol=native#text/plain
tests/webtbs/tw7808.pp svneol=native#text/plain
tests/webtbs/tw7817a.pp svneol=native#text/plain
tests/webtbs/tw7817b.pp svneol=native#text/plain
tests/webtbs/tw7847.pp svneol=native#text/plain

View File

@ -1972,6 +1972,10 @@ Unit Rax86int;
if instr.operands[i].opr.typ=OPR_NONE then
Message(asmr_e_syntax_error);
end;
{ e.g. for "push dword 1", "push word 6" }
if (instr.ops=1) and
(instr.operands[1].typesize<>0) then
instr.operands[1].setsize(instr.operands[1].typesize,false);
end;

18
tests/webtbs/tw7808.pp Normal file
View File

@ -0,0 +1,18 @@
{ %cpu=i386 }
{ %opt=-Sew }
{$mode delphi}
procedure test(l: longint); stdcall;
begin
if l<>longint($deadbeef) then
halt(1);
end;
begin
asm
push word $dead
push word $beef
call test
end;
end.