mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-30 19:40:21 +02:00
* handle flag to reg./ref. conversion correctly for boolean64
git-svn-id: trunk@19914 -
This commit is contained in:
parent
7070fef055
commit
c4a5499d2a
3
.gitattributes
vendored
3
.gitattributes
vendored
@ -11975,7 +11975,8 @@ tests/webtbs/tw20836.pp svneol=native#text/pascal
|
|||||||
tests/webtbs/tw20872a.pp svneol=native#text/pascal
|
tests/webtbs/tw20872a.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw20872b.pp svneol=native#text/pascal
|
tests/webtbs/tw20872b.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw20872c.pp svneol=native#text/pascal
|
tests/webtbs/tw20872c.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw20874.pp svneol=native#text/pascal
|
tests/webtbs/tw20874a.pp svneol=native#text/pascal
|
||||||
|
tests/webtbs/tw20874b.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw20889.pp svneol=native#text/pascal
|
tests/webtbs/tw20889.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw2109.pp svneol=native#text/plain
|
tests/webtbs/tw2109.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw2110.pp svneol=native#text/plain
|
tests/webtbs/tw2110.pp svneol=native#text/plain
|
||||||
|
@ -944,6 +944,14 @@ implementation
|
|||||||
begin
|
begin
|
||||||
case left.location.loc of
|
case left.location.loc of
|
||||||
LOC_REGISTER,LOC_CREGISTER:
|
LOC_REGISTER,LOC_CREGISTER:
|
||||||
|
{$ifdef cpu32bitalu}
|
||||||
|
if left.location.size in [OS_S64,OS_64] then
|
||||||
|
begin
|
||||||
|
cg.g_flags2reg(current_asmdata.CurrAsmList,OS_32,right.location.resflags,left.location.register64.reglo);
|
||||||
|
cg.a_load_const_reg(current_asmdata.CurrAsmList,OS_32,0,left.location.register64.reghi);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
{$endif cpu32bitalu}
|
||||||
cg.g_flags2reg(current_asmdata.CurrAsmList,left.location.size,right.location.resflags,left.location.register);
|
cg.g_flags2reg(current_asmdata.CurrAsmList,left.location.size,right.location.resflags,left.location.register);
|
||||||
LOC_REFERENCE:
|
LOC_REFERENCE:
|
||||||
cg.g_flags2ref(current_asmdata.CurrAsmList,left.location.size,right.location.resflags,left.location.reference);
|
cg.g_flags2ref(current_asmdata.CurrAsmList,left.location.size,right.location.resflags,left.location.reference);
|
||||||
|
@ -1787,6 +1787,13 @@ unit cgx86;
|
|||||||
ai:=Taicpu.op_ref(A_SETcc,S_B,tmpref);
|
ai:=Taicpu.op_ref(A_SETcc,S_B,tmpref);
|
||||||
ai.setcondition(flags_to_cond(f));
|
ai.setcondition(flags_to_cond(f));
|
||||||
list.concat(ai);
|
list.concat(ai);
|
||||||
|
{$ifndef cpu64bitalu}
|
||||||
|
if size in [OS_S64,OS_64] then
|
||||||
|
begin
|
||||||
|
inc(tmpref.offset,4);
|
||||||
|
a_load_const_ref(list,OS_32,0,tmpref);
|
||||||
|
end;
|
||||||
|
{$endif cpu64bitalu}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
17
tests/webtbs/tw20874b.pp
Normal file
17
tests/webtbs/tw20874b.pp
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
program qwordbooltest;
|
||||||
|
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
var
|
||||||
|
A, B : Boolean64;
|
||||||
|
begin
|
||||||
|
A := True;
|
||||||
|
|
||||||
|
// here it fails: qwordbooltest.pas(12,3) Fatal: Internal error 200109227
|
||||||
|
B := not A;
|
||||||
|
|
||||||
|
if B then
|
||||||
|
halt(1);
|
||||||
|
|
||||||
|
writeln('ok');
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user