This is the mail archive of the gcc-patches@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: Still can't make stfiwx actually store directly, but...



On 17/05/2005, at 5:40 PM, Richard Henderson wrote:


On Tue, May 17, 2005 at 05:23:31PM -0700, Geoffrey Keating wrote:

Combine only knows about pseudos, not memory locations, unfortunately.


You're wrong there. For Alpha it's happy to combine


(insn 13 8 15 0 (set (reg:DI 72)
        (fix:DI (reg/v:DF 70 [ d ]))) 124 {*fix_truncdfdi2})

(insn 15 13 16 0 (set (mem:SI (reg/v/f:DI 69 [ x ]) [3 S4 A32])
        (subreg:SI (reg:DI 72) 0)) 239 {*movsi})

into

(insn 15 13 16 0 (parallel [
            (set (mem:SI (reg:DI 16 $16 [ x ]) [3 S4 A32])
                (subreg:SI (fix:DI (reg:DF 49 $f17 [ d ])) 0))
            (clobber (scratch:DI))
        ]) 122 {*fix_truncdfsi_internal})

I have essentially the same hardware constraints on Alpha;
you should be able to make this work on powerpc...

Unfortunately, the powerpc operation is not fix:DI. It's fix:SI but it puts a NaN pattern in the high bits. rs6000 doesn't allow SImode values in FPRs.


Here's what I wish combine would combine, but it doesn't:

(insn 13 8 14 0 (parallel [
            (set (mem/i:SI (plus:SI (reg/f:SI 30 r30)
                        (const_int 24 [0x18])) [3 S4 A32])
                (fix:SI (reg:DF 33 f1 [ d ])))
            (clobber (reg:DI 122))
        ]) 223 {fix_truncdfsi2_internal_gfxopt} (nil)
    (expr_list:REG_DEAD (reg:DF 33 f1 [ d ])
        (expr_list:REG_UNUSED (reg:DI 122)
            (nil))))

(insn 14 13 16 0 (set (reg:SI 121)
(mem/i:SI (plus:SI (reg/f:SI 30 r30)
(const_int 24 [0x18])) [3 S4 A32])) 295 {*movsi_internal1} (nil)
(expr_list:REG_EQUAL (fix:SI (reg/v:DF 119 [ d ]))
(nil)))


(insn 16 14 17 0 (set (mem:SI (reg:SI 3 r3 [ x ]) [3 S4 A32])
(reg:SI 121)) 295 {*movsi_internal1} (insn_list:REG_DEP_TRUE 14 (nil))
(expr_list:REG_DEAD (reg:SI 3 r3 [ x ])
(expr_list:REG_DEAD (reg:SI 121)
(nil))))


I tried making the MEM a pseudo instead, but that doesn't work; reload doesn't know how to force a psuedo into memory, apparently.

Attachment: smime.p7s
Description: S/MIME cryptographic signature


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