This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Richard Sandiford wrote:It remains to be seen whether:
/* In mips16 mode, we permit the $t temporary registers to be used for reload. We prohibit the unused $s registers, since they are caller saved, and saving them via a mips16 register would probably waste more time than just reloading the value. */ if (TARGET_MIPS16) { fixed_regs[18] = call_used_regs[18] = 1; fixed_regs[19] = call_used_regs[19] = 1; fixed_regs[20] = call_used_regs[20] = 1; fixed_regs[21] = call_used_regs[21] = 1; fixed_regs[22] = call_used_regs[22] = 1; fixed_regs[23] = call_used_regs[23] = 1; fixed_regs[26] = call_used_regs[26] = 1; fixed_regs[27] = call_used_regs[27] = 1; fixed_regs[30] = call_used_regs[30] = 1; }
still makes sense when GENERATE_MIPS16E_SAVE_RESTORE, since saving and
restoring these registers is now so cheap.
Yes, we thought so too, but when we tried that in gcc3.4 we got less than impressive results for code size. IIRC this was due to excessive reloads -- because "spilling" to registers wasn't supported in the same way as spilling to stack, instead variables would get allocated to the s2-8 registers and then need reloading to MIPS16 registers before each use. Could be worth trying again in gcc 4 though, in case any improvements to the register allocator help us here.
if (TARGET_MIPS16) { 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; fixed_regs[18] = call_used_regs[18] = 1; fixed_regs[19] = call_used_regs[19] = 1; fixed_regs[20] = call_used_regs[20] = 1; fixed_regs[21] = call_used_regs[21] = 1; fixed_regs[22] = call_used_regs[22] = 1; fixed_regs[23] = call_used_regs[23] = 1; fixed_regs[30] = call_used_regs[30] = 1; }
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |