On 23/10/12 16:54, Greta Yorsh wrote:
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 <greta.yo...@arm.com>
* config/arm/arm.c (offset_ok_for_ldrd_strd): Return false for
Thumb1.
I think we should fix TARGET_LDRD to reject Thumb1.
R.
m0-ice.v2.patch.txt
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));
}