Trouble with powerpc64 mfpgpr patch

Greg McGary
Thu Jul 12 21:25:00 GMT 2007

I extracted the MFPGPR hunks from Peter Bergner's "[PATCH] Add POWER6 
machine description", posted on 2006-11-01 and dropped them into 
gcc-4.0.3, but the result fails with "error: insn does not satisfy its 

.../src/gcc-4.0.3/gcc/config/rs6000/darwin-ldouble.c: In function 
.../src/gcc-4.0.3/gcc/config/rs6000/darwin-ldouble.c:127: error: insn 
does not satisfy its constraints:
(insn 193 64 152 4 
.../src/gcc-4.0.3/gcc/config/rs6000/darwin-ldouble.c:110 (set (reg:DF 10 10)
        (plus:DF (reg:DF 34 2 [orig:124 D.1365 ] [124])
            (reg:DF 32 0 [146]))) 177 {*adddf3_fpr} (nil)
    (expr_list:REG_DEAD (reg:DF 34 2 [orig:124 D.1365 ] [124])
        (expr_list:REG_DEAD (reg:DF 32 0 [146])
.../src/gcc-4.0.3/gcc/config/rs6000/darwin-ldouble.c:127: internal 
compiler error: in copyprop_hardreg_forward_1, at regrename.c:1583
Please submit a full bug report,
with preprocessed source if appropriate.

The complaint is about operand[0], which is an integer register with 
DFmode.  FYI, I did my own work to put mftgpr/mffgpr into GCC-4.0.x last 
year, and ran into this same problem.  I solved it by changing the 
operand predicates everywhere I found an "f" constraint so that the 
predicate only allowed FP regs rather than the permissive 
gpc_reg_operand.  Alhough this worked, I didn't like it because the 
change was very invasive, so when I saw that Peter's patch didn't muck 
with the FP operand predicates, I wanted to use it instead.  Alas, I 
have the same problem with integer registers matching gpc_reg_operand, 
but not satisfying the "f" constraint.  What am I missing?  Is there 
something inhospitable about GCC-4.0 vs. the trunk for Peter's 
changes?   The patch I used is attached.

Thanks, Greg

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ibm-mfpgpr
URL: <>

More information about the Gcc mailing list