This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
question about register pairs
- From: DJ Delorie <dj at redhat dot com>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 24 Oct 2013 02:59:04 -0400
- Subject: question about register pairs
- Authentication-results: sourceware.org; auth=none
The docs say to use HARD_REGNO_MODE_OK to enforce register pairs.
But reload (find_valid_class_1) rejects classes that include such
registers:
for (regno = 0; regno < FIRST_PSEUDO_REGISTER && !bad; regno++)
{
if (in_hard_reg_set_p (reg_class_contents[rclass], mode, regno)
&& !HARD_REGNO_MODE_OK (regno, mode))
{
bad = 1;
In the past, if I use a register class that excludes the second half
of register pairs, it can't do anything because it requires both parts
of the register pair to be in the class (example: in_hard_reg_set_p
checks this).
Which way is the "right" way?