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]

subreg:HI of PSI HW register issue


Hi,

It seems there is an issue around subreg:HI of PSI hardware register,
which occurs either during expand or reload (GCC 4.6.1).

For my big endian target,
(subreg:HI (reg:PSI A0_REGNO) 0) is not representable but
(subreg:HI (reg:PSI A0_REGNO) 2) is (reg:HI A0_REGNO).

The issue occurs when storing a pointer from hardware PSI register
(incoming pointer param) into a misaligned field of a packed structure.
GCC emits (subreg:HI (reg:PSI A0_REGNO) 0) and (subreg:HI (reg:PSI
A0_REGNO) 2) patterns and during reload, (subreg:HI (reg:PSI A0_REGNO)
0) is wrongly simplified  into (reg:HI A0_REGNO).

So:
- Is it correct that gcc emits such a subreg pattern in Pmode=PSI during
expand ? Or should it be in ptr_mode=SImode (in this case, both
(subreg:HI (reg:SI) 0/2) are representable)?

- Or should reload be able to handle unrepresentable subregs?

Thank you by advance,
Aurélien


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