From patchwork Tue Oct 23 15:54:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [ARM] Fix offset_ok_for_ldrd_strd in Thumb1 Date: Tue, 23 Oct 2012 05:54:50 -0000 From: Greta Yorsh X-Patchwork-Id: 193520 Message-Id: <000001cdb136$bc565fe0$35031fa0$@yorsh@arm.com> To: "GCC Patches" Cc: "Ramana Radhakrishnan" , "Richard Earnshaw" , , The function offset_ok_for_ldrd_strd should return false for Thumb1, because TARGET_LDRD and Thumb1 can be both enabled (for example, the default for cortex-m0). This patch fixes ICE that is caused by gcc r192678 and occurs when building gcc with newlib for arm-none-eabi cortex-m0. Ok for trunk? Thanks, Greta ChangeLog gcc/ 2012-10-23 Greta Yorsh * config/arm/arm.c (offset_ok_for_ldrd_strd): Return false for Thumb1. diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index e9b9463..a94e537 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -12209,7 +12209,7 @@ offset_ok_for_ldrd_strd (HOST_WIDE_INT offset) else if (TARGET_ARM) max_offset = 255; else - gcc_unreachable (); + return false; return ((offset <= max_offset) && (offset >= -max_offset)); }