* don't force OT_BITS32 on x86-64, resolves #16622

git-svn-id: trunk@15595 -
This commit is contained in:
florian 2010-07-17 20:57:06 +00:00
parent c30279cdc8
commit 9affb070b8
3 changed files with 31 additions and 3 deletions

1
.gitattributes vendored
View File

@ -10529,6 +10529,7 @@ tests/webtbs/tw16377.pp svneol=native#text/plain
tests/webtbs/tw16402.pp svneol=native#text/plain
tests/webtbs/tw1658.pp svneol=native#text/plain
tests/webtbs/tw16592.pp svneol=native#text/plain
tests/webtbs/tw16622.pp svneol=native#text/pascal
tests/webtbs/tw16668.pp svneol=native#text/plain
tests/webtbs/tw16700.pp svneol=native#text/plain
tests/webtbs/tw16757.pp svneol=native#text/plain

View File

@ -734,11 +734,16 @@ begin
OS_64,OS_S64:
begin
{ Only FPU operations know about 64bit values, for all
integer operations it is seen as 32bit }
integer operations it is seen as 32bit
this applies only to i386, see tw16622}
if gas_needsuffix[opcode] in [attsufFPU,attsufFPUint] then
asize:=OT_BITS64
{$ifdef i386}
else
asize:=OT_BITS32;
asize:=OT_BITS32
{$endif i386}
;
end;
OS_F64,OS_C64 :
asize:=OT_BITS64;
@ -754,7 +759,7 @@ begin
{ Condition ? }
if condition<>C_None then
ai.SetCondition(condition);
{ Set is_jmp, it enables asmwriter to emit short jumps if appropriate }
if (opcode=A_JMP) or (opcode=A_JCC) then
ai.is_jmp := True;

22
tests/webtbs/tw16622.pp Normal file
View File

@ -0,0 +1,22 @@
{ %cpu=x86_64 }
{$asmmode intel}
procedure test;
var
TestVar : Int64;
begin
TestVar:=1234123412341234;
asm
MOV RAX,0
LEA RBX,TestVar
MOV QWORD [RBX],RAX
end;
writeln(TestVar);
if TestVar<>0 then
halt(1);
end;
begin
test;
writeln('ok');
end.