Patch to rs6000/eabispe.h and rs6000/linuxspe.h to disallow -m64
Aldy Hernandez
aldyh@redhat.com
Fri Oct 15 17:30:00 GMT 2004
> > FAIL: gcc.c-torture/compile/930623-1.c (test for excess errors)
> > Excess errors:
> > /source/uber/gcc/testsuite/gcc.c-torture/compile/930623-1.c:7: error: insn does
> > not satisfy its constraints:
> > (insn 104 146 58 (set (reg:DI 33 1)
> > (mem:DI (plus:SI (reg/f:SI 31 31)
> > (const_int 48 [0x30])) [0 S8 A8])) 338 {*movdi_internal32} (nil) (nil))
> >
> > But this is much better than the current status. Feel free to commit
> > if you haven't already done so.
>
> reg:DI 33 is fr1. Certainly this should fail its constraints on SPE -
> since that register doesn't exist, and FLOAT_REGS doesn't include it,
> and it's fixed. We'll have to track down how it got chosen...
FUNCTION_ARG_REGNO_P and FUNCTION_VALUE_REGNO_P need to disallow FPRs for
!TARGET_FPRS. Any time we talk about an FPR, we need to talk about
"TARGET_HARD_FLOAT && TARGET_FPR".
In this particular case __builtin_apply wanted to save the FPRs
because FUNCTION_ARG_REGNO_P returned true for the FPR hard registers.
I didn't investigate why this all worked <= 3.4.x.
Will commit once testing on powerpc-eabispe finishes.
Aldy
* config/rs6000/rs6000.h (FUNCTION_ARG_REGNO_P): FPRs are only
available for TARGET_FPRS.
(FUNCTION_VALUE_REGNO_P): Same.
Index: config/rs6000/rs6000.h
===================================================================
RCS file: /cvs/uberbaum/gcc/config/rs6000/rs6000.h,v
retrieving revision 1.341
diff -c -p -r1.341 rs6000.h
*** config/rs6000/rs6000.h 14 Oct 2004 23:47:14 -0000 1.341
--- config/rs6000/rs6000.h 15 Oct 2004 17:21:57 -0000
*************** extern enum rs6000_abi rs6000_current_ab
*** 1622,1628 ****
On RS/6000, this is r3, fp1, and v2 (for AltiVec). */
#define FUNCTION_VALUE_REGNO_P(N) \
((N) == GP_ARG_RETURN \
! || ((N) == FP_ARG_RETURN && TARGET_HARD_FLOAT) \
|| ((N) == ALTIVEC_ARG_RETURN && TARGET_ALTIVEC && TARGET_ALTIVEC_ABI))
/* 1 if N is a possible register number for function argument passing.
--- 1622,1628 ----
On RS/6000, this is r3, fp1, and v2 (for AltiVec). */
#define FUNCTION_VALUE_REGNO_P(N) \
((N) == GP_ARG_RETURN \
! || ((N) == FP_ARG_RETURN && TARGET_HARD_FLOAT && TARGET_FPRS) \
|| ((N) == ALTIVEC_ARG_RETURN && TARGET_ALTIVEC && TARGET_ALTIVEC_ABI))
/* 1 if N is a possible register number for function argument passing.
*************** extern enum rs6000_abi rs6000_current_ab
*** 1633,1639 ****
|| ((unsigned) (N) - ALTIVEC_ARG_MIN_REG < ALTIVEC_ARG_NUM_REG \
&& TARGET_ALTIVEC && TARGET_ALTIVEC_ABI) \
|| ((unsigned) (N) - FP_ARG_MIN_REG < FP_ARG_NUM_REG \
! && TARGET_HARD_FLOAT))
/* A C structure for machine-specific, per-function data.
This is added to the cfun structure. */
--- 1633,1639 ----
|| ((unsigned) (N) - ALTIVEC_ARG_MIN_REG < ALTIVEC_ARG_NUM_REG \
&& TARGET_ALTIVEC && TARGET_ALTIVEC_ABI) \
|| ((unsigned) (N) - FP_ARG_MIN_REG < FP_ARG_NUM_REG \
! && TARGET_HARD_FLOAT && TARGET_FPRS))
/* A C structure for machine-specific, per-function data.
This is added to the cfun structure. */
More information about the Gcc-patches
mailing list