This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: mainline -mcpu=power4


Alan Modra <amodra@bigpond.net.au> writes:

> cat > ret.c <<EOF
> int main (void) {return 0;}
> EOF
> powerpc64-linux-gcc -O2 -mcpu=power4 -S ret.i
> error: insn does not satisfy its constraints:
> (jump_insn 29 28 30 0 (parallel [
>             (return)
>             (use (reg:DI 65 lr))
>         ]) 577 {*return_internal_di} (nil)
>     (expr_list:REG_DEAD (reg:SI 66 ctr)
>         (nil)))
> internal compiler error: in copyprop_hardreg_forward_1, at regrename.c:1545
> 
> Hmm, -mcpu=power4 leaves MASK_POWERPC64 off in target_flags, so
> UNITS_PER_WORD is 4 and HARD_REGNO_NREGS thinks we need two regs for
> DI:lr
> 
> What's the right fix here?  Using TARGET_64BIT in the insn predicate
> doesn't agree with using TARGET_POWERPC64 (indirectly) in
> HARD_REGNO_NREGS.

Add TARGET_POWERPC64 to this line:

         {"power4", PROCESSOR_POWER4, POWERPC_BASE_MASK | MASK_PPC_GFXOPT},

I forgot that POWER4 was also a 64-bit processor.

-- 
- Geoffrey Keating <geoffk@geoffk.org>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]