Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

Commit

Permalink
[Hook] Add even-odd pair of register support in TARGET_HARD_REGNO_MOD…
Browse files Browse the repository at this point in the history
…E_OK hook
  • Loading branch information
linsinan1995 committed May 31, 2021
1 parent 1759d4c commit 82035e7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions gcc/config/riscv/riscv.c
Original file line number Diff line number Diff line change
Expand Up @@ -4516,6 +4516,14 @@ riscv_hard_regno_mode_ok (unsigned int regno, machine_mode mode)
!= call_used_or_fixed_reg_p (regno + i))
return false;

/* use even/odd pair of registers in rv32 zpsf subset */
if (TARGET_ZPSF && !TARGET_64BIT)
{
if ((GET_MODE_CLASS (mode) == MODE_INT ||
GET_MODE_CLASS (mode) == MODE_VECTOR_INT) &&
GET_MODE_UNIT_SIZE (mode) == GET_MODE_SIZE (DImode))
return !(regno & 1);
}
return true;
}

Expand Down

0 comments on commit 82035e7

Please sign in to comment.