This is the mail archive of the
mailing list for the GCC project.
subreg:HI of PSI HW register issue
- From: Aurelien Buhrig <aurelien dot buhrig dot gcc at gmail dot com>
- To: gcc at gcc dot gnu dot org
- Date: Fri, 09 Mar 2012 11:20:45 +0100
- Subject: subreg:HI of PSI HW register issue
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).
- 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,