From 14bc6674a6cd8a7974266635487bf09f384d02bf Mon Sep 17 00:00:00 2001 From: florian Date: Mon, 20 Jul 2020 20:21:44 +0000 Subject: [PATCH] * revert part of r45810 which was accidently committed git-svn-id: trunk@45813 - --- compiler/symdef.pas | 7 +++---- compiler/symsym.pas | 3 +++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/compiler/symdef.pas b/compiler/symdef.pas index a362025297..1a76c5a805 100644 --- a/compiler/symdef.pas +++ b/compiler/symdef.pas @@ -2352,10 +2352,9 @@ implementation not trecorddef(self).contains_cross_aword_field and { records cannot go into registers on 16 bit targets for now } (sizeof(aint)>2) and - (not trecorddef(self).contains_float_field) or - (recsize <= sizeof(aint)) - ) and - not needs_inittable; + not trecorddef(self).contains_float_field + ) and + not needs_inittable; {$endif cpuhighleveltarget} end; else diff --git a/compiler/symsym.pas b/compiler/symsym.pas index f62a85b4f3..8e717e7a69 100644 --- a/compiler/symsym.pas +++ b/compiler/symsym.pas @@ -1728,6 +1728,8 @@ implementation function tabstractvarsym.is_regvar(refpara: boolean):boolean; + var + tempdef : tdef; begin { Register variables are not allowed in the following cases: - regvars are disabled @@ -1746,6 +1748,7 @@ implementation {$if not defined(powerpc) and not defined(powerpc64)} and ((vardef.typ <> recorddef) or (varregable = vr_addr) or + tabstractrecordsymtable(tabstractrecorddef(vardef).symtable).has_single_field(tempdef) or not(varstate in [vs_written,vs_readwritten])); {$endif} end;