* fixed size of movzx/movsx with 64bit operand in x86-64 Intel asm reader

git-svn-id: trunk@23131 -
This commit is contained in:
Jonas Maebe 2012-12-09 22:42:52 +00:00
parent 14b1c8a99c
commit d180d6f241
3 changed files with 38 additions and 0 deletions

1
.gitattributes vendored
View File

@ -9730,6 +9730,7 @@ tests/tbs/tb0583a.pp svneol=native#text/plain
tests/tbs/tb0584.pp svneol=native#text/pascal
tests/tbs/tb0585.pp svneol=native#text/pascal
tests/tbs/tb0586.pp svneol=native#text/pascal
tests/tbs/tb0587.pp svneol=native#text/plain
tests/tbs/tb205.pp svneol=native#text/plain
tests/tbs/ub0060.pp svneol=native#text/plain
tests/tbs/ub0069.pp svneol=native#text/plain

View File

@ -789,6 +789,10 @@ begin
case tx86operand(operands[2]).opsize of
S_L :
opsize:=S_WL;
{$ifdef x86_64}
S_Q :
opsize:=S_WQ;
{$endif}
end;
S_B :
begin
@ -797,6 +801,10 @@ begin
opsize:=S_BW;
S_L :
opsize:=S_BL;
{$ifdef x86_64}
S_Q :
opsize:=S_BQ;
{$endif}
end;
end;
end;

29
tests/tbs/tb0587.pp Normal file
View File

@ -0,0 +1,29 @@
{ %cpu=x86_64 }
{ %opt=-Aas }
{$asmmode intel}
procedure test;
var
i1,i2: int64;
b: shortint;
begin
b:=-128;
asm
movsx rax, b
mov i1,rax
movzx rax, b
mov i2,rax
end ['rax'];
if i1<>-128 then
halt(1);
if i2<>byte(-128) then
halt(2);
end;
begin
test
end.