From f374b81c12a662e70947c643a62bb92a133075e8 Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Mon, 31 Aug 2015 13:06:42 +0000 Subject: [PATCH] * disabled ARM-specific code for smallset in-operations on big endian targets, as it's also little endian-specific (mantis #28592) git-svn-id: trunk@31466 - --- compiler/arm/narmset.pas | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/compiler/arm/narmset.pas b/compiler/arm/narmset.pas index 66da35d802..092fbcc0b0 100644 --- a/compiler/arm/narmset.pas +++ b/compiler/arm/narmset.pas @@ -51,7 +51,7 @@ interface implementation uses - verbose,globals,constexp,defutil, + verbose,globals,constexp,defutil,systems, aasmbase,aasmtai,aasmdata,aasmcpu, cpubase,cpuinfo, cgutils,cgobj,ncgutil, @@ -72,7 +72,8 @@ implementation if not(assigned(result)) then begin if not(checkgenjumps(setparts,numparts,use_small)) and - use_small then + use_small and + (target_info.endian=endian_little) then expectloc:=LOC_FLAGS; end; end; @@ -82,6 +83,14 @@ implementation so : tshifterop; hregister : tregister; begin + { the code below needs changes for big endian targets (they start + counting from the most significant bit) + } + if target_info.endian=endian_big then + begin + inherited; + exit; + end; location_reset(location,LOC_FLAGS,OS_NO); location.resflags:=F_NE; if (left.location.loc=LOC_CONSTANT) and not(GenerateThumbCode) then