mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 13:49:29 +02:00
* fixes cardinal in reg -> real on x86-64, resolves #8225
git-svn-id: trunk@6588 -
This commit is contained in:
parent
9a37c04131
commit
05e0a804cc
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -8050,6 +8050,7 @@ tests/webtbs/tw8199.pp svneol=native#text/plain
|
||||
tests/webtbs/tw8222.pp svneol=native#text/plain
|
||||
tests/webtbs/tw8222a.pp svneol=native#text/plain
|
||||
tests/webtbs/tw8222b.pp svneol=native#text/plain
|
||||
tests/webtbs/tw8225.pp -text
|
||||
tests/webtbs/tw8229.pp svneol=native#text/plain
|
||||
tests/webtbs/tw8232.pp svneol=native#text/plain
|
||||
tests/webtbs/tw8258.pp svneol=native#text/plain
|
||||
|
@ -241,16 +241,18 @@ implementation
|
||||
|
||||
{ Get sign bit }
|
||||
if (left.location.loc=LOC_REGISTER) then
|
||||
emit_const_reg(A_BT,S_Q,63,left.location.register)
|
||||
begin
|
||||
emit_const_reg(A_BT,S_Q,63,left.location.register);
|
||||
current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(op,S_Q,left.location.register,location.register));
|
||||
end
|
||||
else
|
||||
begin
|
||||
inc(left.location.reference.offset,4);
|
||||
emit_const_ref(A_BT,S_L,31,left.location.reference);
|
||||
dec(left.location.reference.offset,4);
|
||||
current_asmdata.CurrAsmList.concat(taicpu.op_ref_reg(op,S_Q,left.location.reference,location.register));
|
||||
end;
|
||||
|
||||
current_asmdata.CurrAsmList.concat(taicpu.op_ref_reg(op,S_Q,left.location.reference,location.register));
|
||||
|
||||
cg.a_jmp_flags(current_asmdata.CurrAsmList,F_NC,l2);
|
||||
current_asmdata.asmlists[al_typedconsts].concat(Tai_label.Create(l1));
|
||||
reference_reset_symbol(href,l1,0);
|
||||
|
22
tests/webtbs/tw8225.pp
Normal file
22
tests/webtbs/tw8225.pp
Normal file
@ -0,0 +1,22 @@
|
||||
program test;
|
||||
|
||||
const
|
||||
factor : double = 1.0;
|
||||
|
||||
|
||||
function CheckLongint(count,wcount:longint):double;
|
||||
begin
|
||||
result:=(count+wcount)*factor;
|
||||
end;
|
||||
|
||||
|
||||
function CheckCardinal(count,wcount:cardinal):double;
|
||||
begin
|
||||
result:=(count+wcount)*factor;
|
||||
end;
|
||||
|
||||
|
||||
begin
|
||||
writeln('LONGINT: ',CheckLongint(3,1));
|
||||
writeln('CARDINAL: ',CheckCardinal(3,1));
|
||||
end.
|
Loading…
Reference in New Issue
Block a user