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?

Reply via email to