mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 23:29:32 +02:00
* don't force OT_BITS32 on x86-64, resolves #16622
git-svn-id: trunk@15595 -
This commit is contained in:
parent
c30279cdc8
commit
9affb070b8
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -10529,6 +10529,7 @@ tests/webtbs/tw16377.pp svneol=native#text/plain
|
|||||||
tests/webtbs/tw16402.pp svneol=native#text/plain
|
tests/webtbs/tw16402.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw1658.pp svneol=native#text/plain
|
tests/webtbs/tw1658.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw16592.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/tw16668.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw16700.pp svneol=native#text/plain
|
tests/webtbs/tw16700.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw16757.pp svneol=native#text/plain
|
tests/webtbs/tw16757.pp svneol=native#text/plain
|
||||||
|
@ -734,11 +734,16 @@ begin
|
|||||||
OS_64,OS_S64:
|
OS_64,OS_S64:
|
||||||
begin
|
begin
|
||||||
{ Only FPU operations know about 64bit values, for all
|
{ 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
|
if gas_needsuffix[opcode] in [attsufFPU,attsufFPUint] then
|
||||||
asize:=OT_BITS64
|
asize:=OT_BITS64
|
||||||
|
{$ifdef i386}
|
||||||
else
|
else
|
||||||
asize:=OT_BITS32;
|
asize:=OT_BITS32
|
||||||
|
{$endif i386}
|
||||||
|
;
|
||||||
end;
|
end;
|
||||||
OS_F64,OS_C64 :
|
OS_F64,OS_C64 :
|
||||||
asize:=OT_BITS64;
|
asize:=OT_BITS64;
|
||||||
@ -754,7 +759,7 @@ begin
|
|||||||
{ Condition ? }
|
{ Condition ? }
|
||||||
if condition<>C_None then
|
if condition<>C_None then
|
||||||
ai.SetCondition(condition);
|
ai.SetCondition(condition);
|
||||||
|
|
||||||
{ Set is_jmp, it enables asmwriter to emit short jumps if appropriate }
|
{ Set is_jmp, it enables asmwriter to emit short jumps if appropriate }
|
||||||
if (opcode=A_JMP) or (opcode=A_JCC) then
|
if (opcode=A_JMP) or (opcode=A_JCC) then
|
||||||
ai.is_jmp := True;
|
ai.is_jmp := True;
|
||||||
|
22
tests/webtbs/tw16622.pp
Normal file
22
tests/webtbs/tw16622.pp
Normal 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.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user