Commit 27bd251b by Ian Bolton Committed by Marcus Shawcroft

[AArch64,PATCH] Adjust preferred_reload_class of SP+C

Co-Authored-By: Marcus Shawcroft <marcus.shawcroft@arm.com>

From-SVN: r204018
parent ac63f305
2013-10-17 Ian Bolton <ian.bolton@arm.com>
Marcus Shawcroft <marcus.shawcroft@arm.com>
* config/aarch64/aarch64.c (aarch64_preferred_reload_class):
Special case reload SP+C into none GENERAL_REGS.
2013-10-24 Michael Matz <matz@suse.de> 2013-10-24 Michael Matz <matz@suse.de>
* gengtype.c (is_file_equal): Check that files will be same * gengtype.c (is_file_equal): Check that files will be same
...@@ -4263,6 +4263,24 @@ aarch64_preferred_reload_class (rtx x, reg_class_t regclass) ...@@ -4263,6 +4263,24 @@ aarch64_preferred_reload_class (rtx x, reg_class_t regclass)
&& !aarch64_simd_imm_scalar_p (x, GET_MODE (x))) && !aarch64_simd_imm_scalar_p (x, GET_MODE (x)))
return NO_REGS; return NO_REGS;
/* Register eliminiation can result in a request for
SP+constant->FP_REGS. We cannot support such operations which
use SP as source and an FP_REG as destination, so reject out
right now. */
if (! reg_class_subset_p (regclass, GENERAL_REGS) && GET_CODE (x) == PLUS)
{
rtx lhs = XEXP (x, 0);
/* Look through a possible SUBREG introduced by ILP32. */
if (GET_CODE (lhs) == SUBREG)
lhs = SUBREG_REG (lhs);
gcc_assert (REG_P (lhs));
gcc_assert (reg_class_subset_p (REGNO_REG_CLASS (REGNO (lhs)),
POINTER_REGS));
return NO_REGS;
}
return regclass; return regclass;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment