aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/arm/arm.c
diff options
context:
space:
mode:
authorTamar Christina <tamar.christina@arm.com>2018-07-05 10:37:36 +0000
committerTamar Christina <tnfchris@gcc.gnu.org>2018-07-05 10:37:36 +0000
commit6fc2658638727f52780fe35c1dfabca402fd9481 (patch)
tree5800f22916975f54073e096d52c35e067e4e9154 /gcc/config/arm/arm.c
parentd6e5a37a0402177713e9496f0d852e2e1147437f (diff)
downloadgcc-6fc2658638727f52780fe35c1dfabca402fd9481.zip
gcc-6fc2658638727f52780fe35c1dfabca402fd9481.tar.gz
gcc-6fc2658638727f52780fe35c1dfabca402fd9481.tar.bz2
Fix can_change_mode_class for big-endian on Arm
gcc/ PR target/84711 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE instead of GET_MODE_SIZE when comparing Units. gcc/testsuite/ PR target/84711 * gcc.target/arm/big-endian-subreg.c: New. From-SVN: r262436
Diffstat (limited to 'gcc/config/arm/arm.c')
-rw-r--r--gcc/config/arm/arm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 8d5897c..ec3abbc 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -31512,8 +31512,8 @@ arm_can_change_mode_class (machine_mode from, machine_mode to,
{
if (TARGET_BIG_END
&& !(GET_MODE_SIZE (from) == 16 && GET_MODE_SIZE (to) == 8)
- && (GET_MODE_SIZE (from) > UNITS_PER_WORD
- || GET_MODE_SIZE (to) > UNITS_PER_WORD)
+ && (GET_MODE_UNIT_SIZE (from) > UNITS_PER_WORD
+ || GET_MODE_UNIT_SIZE (to) > UNITS_PER_WORD)
&& reg_classes_intersect_p (VFP_REGS, rclass))
return false;
return true;