Commit 76500022 by Steve Ellcey Committed by Steve Ellcey

mips.c (mips_conditional_register_usage): Do not use t[0-7] registers in MIPS16…

mips.c (mips_conditional_register_usage): Do not use t[0-7] registers in MIPS16 mode when optimizing for size.

2013-07-11  Steve Ellcey  <sellcey@mips.com>

	* config/mips/mips.c (mips_conditional_register_usage): Do not
	use t[0-7] registers in MIPS16 mode when optimizing for size.

From-SVN: r200914
parent 78039734
2013-07-11 Steve Ellcey <sellcey@mips.com>
* config/mips/mips.c (mips_conditional_register_usage): Do not
use t[0-7] registers in MIPS16 mode when optimizing for size.
2013-07-11 Sriraman Tallam <tmsriram@google.com> 2013-07-11 Sriraman Tallam <tmsriram@google.com>
* config/i386/i386.c (dispatch_function_versions): Fix array * config/i386/i386.c (dispatch_function_versions): Fix array
......
...@@ -17199,10 +17199,17 @@ mips_conditional_register_usage (void) ...@@ -17199,10 +17199,17 @@ mips_conditional_register_usage (void)
} }
if (TARGET_MIPS16) if (TARGET_MIPS16)
{ {
/* In MIPS16 mode, we permit the $t temporary registers to be used /* In MIPS16 mode, we prohibit the unused $s registers, since they
for reload. We prohibit the unused $s registers, since they
are call-saved, and saving them via a MIPS16 register would are call-saved, and saving them via a MIPS16 register would
probably waste more time than just reloading the value. */ probably waste more time than just reloading the value.
We permit the $t temporary registers when optimizing for speed
but not when optimizing for space because using them results in
code that is larger (but faster) then not using them. We do
allow $24 (t8) because it is used in CMP and CMPI instructions
and $25 (t9) because it is used as the function call address in
SVR4 PIC code. */
fixed_regs[18] = call_used_regs[18] = 1; fixed_regs[18] = call_used_regs[18] = 1;
fixed_regs[19] = call_used_regs[19] = 1; fixed_regs[19] = call_used_regs[19] = 1;
fixed_regs[20] = call_used_regs[20] = 1; fixed_regs[20] = call_used_regs[20] = 1;
...@@ -17212,6 +17219,17 @@ mips_conditional_register_usage (void) ...@@ -17212,6 +17219,17 @@ mips_conditional_register_usage (void)
fixed_regs[26] = call_used_regs[26] = 1; fixed_regs[26] = call_used_regs[26] = 1;
fixed_regs[27] = call_used_regs[27] = 1; fixed_regs[27] = call_used_regs[27] = 1;
fixed_regs[30] = call_used_regs[30] = 1; fixed_regs[30] = call_used_regs[30] = 1;
if (optimize_size)
{
fixed_regs[8] = call_used_regs[8] = 1;
fixed_regs[9] = call_used_regs[9] = 1;
fixed_regs[10] = call_used_regs[10] = 1;
fixed_regs[11] = call_used_regs[11] = 1;
fixed_regs[12] = call_used_regs[12] = 1;
fixed_regs[13] = call_used_regs[13] = 1;
fixed_regs[14] = call_used_regs[14] = 1;
fixed_regs[15] = call_used_regs[15] = 1;
}
/* Do not allow HI and LO to be treated as register operands. /* Do not allow HI and LO to be treated as register operands.
There are no MTHI or MTLO instructions (or any real need There are no MTHI or MTLO instructions (or any real need
......
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