PATCH: Fix builtin-constant.c on Thumb
Mark Mitchell
mark@codesourcery.com
Wed Dec 31 10:28:00 GMT 2003
When CONSTANT_P_RTX was added to the compiler, nobody fixed
THUMB_LEGITIMATE_CONSTANT_P to accept CONSTANT_P_RTX. That causes
builtin-constant.c to fail on Thumb.
Tested on arm-none-elf, compiling with -mthumb, applied on the
csl-arm-branch.
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
2003-12-30 Mark Mitchell <mark@codesourcery.com>
* config/arm/arm.h (THUMB_LEGITIMATE_CONSTANT_P): Accept
CONSTANT_P_RTX.
Index: config/arm/arm.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arm/arm.h,v
retrieving revision 1.210.2.8
diff -c -5 -p -r1.210.2.8 arm.h
*** config/arm/arm.h 31 Dec 2003 00:44:18 -0000 1.210.2.8
--- config/arm/arm.h 31 Dec 2003 03:29:27 -0000
*************** typedef struct
*** 2189,2198 ****
--- 2196,2206 ----
#define ARM_LEGITIMATE_CONSTANT_P(X) (flag_pic || ! label_mentioned_p (X))
#define THUMB_LEGITIMATE_CONSTANT_P(X) \
( GET_CODE (X) == CONST_INT \
|| GET_CODE (X) == CONST_DOUBLE \
+ || GET_CODE (X) == CONSTANT_P_RTX \
|| CONSTANT_ADDRESS_P (X) \
|| flag_pic)
#define LEGITIMATE_CONSTANT_P(X) \
(TARGET_ARM ? ARM_LEGITIMATE_CONSTANT_P (X) : THUMB_LEGITIMATE_CONSTANT_P (X))
More information about the Gcc-patches
mailing list