Disable use of cmov instructions in alignment patterns for some i386 targets (it prevents use of some emulators)

git-svn-id: trunk@47257 -
This commit is contained in:
pierre 2020-10-30 16:12:47 +00:00
parent 7966b29b2f
commit f674ed0324
2 changed files with 10 additions and 1 deletions

View File

@ -344,6 +344,14 @@ interface
{ all native nt systems }
systems_nativent = [system_i386_nativent];
{ all i386 systems for which cmov instructions for alignment should not be used.
This is a problem for several emulators }
systems_i386_no_cmov_align = [system_i386_go32v2,
system_i386_watcom, system_i386_wdosx,
system_i386_os2, system_i386_emx,
system_i386_beos, system_i386_haiku,
system_i386_solaris];
{ systems supporting Objective-C }
systems_objc_supported = systems_darwin;

View File

@ -963,7 +963,8 @@ implementation
while (localsize>0) do
begin
{$ifndef i8086}
if CPUX86_HAS_CMOV in cpu_capabilities[current_settings.cputype] then
if (CPUX86_HAS_CMOV in cpu_capabilities[current_settings.cputype])
{$ifdef i386} and not (target_info.system in systems_i386_no_cmov_align) {$endif} then
begin
for j:=low(alignarray_cmovcpus) to high(alignarray_cmovcpus) do
if (localsize>=length(alignarray_cmovcpus[j])) then