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: [patch] More thorough checking in reg_fits_class_p


On 21/05/12 15:47, Richard Earnshaw wrote:
On 17/05/12 14:23, Jim MacArthur wrote:

Sorry for the delay in responding to this, I had a few problems with end_hard_regno. Here's a new version of the patch, which adds to in_hard_reg_set_p the assert and a check for the hardness of end_regno. end_hard_regno is the exclusive upper bound of the range, so not actually a meaningful reg no. HARD_REGNO_NREGS is required to return a positive value, so (end_regno - 1) is always safe, as I understand it.

I've tested this with an x86 bootstrap which shows no errors, and with
our own AArch64 back end.

Jim

New ChangeLog text:

2012-05-17  Jim MacArthur<jim.macarthur@arm.com>
        * recog.c (reg_fits_class_p): Check both regno and regno + offset are
hard registers.
        * regs.h (in_hard_reg_set_p): Assert that regno is a hard register and
check end_regno - 1 is a hard register.


OK.


R.



Jim, I've committed your patch.


/Marcus


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