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] | |
Hello!
This patch rewrites ix86_conditional_register_usage to improve following things:
- Do not mark REX registers in FIXED_REGISTERS. We know that no 32bit
target supports them, so we can disable REX registers at
ix86_conditional_register_usage as well.
- Use bitmaps in CALL_USED_REGISTERS to conditionally mark used
registers for different ABIs, while still allowing -fcall-used-REG and
-fcall-saved-REG options to be used. This brings TARGET_64BIT_MS_ABI
to the same level as other ABIs and allows future ABIs to be handled.
- Calculate CLOBBERED_REGS for 32bit targets in the same way as for
64bit targets, removing another 32bit/64bit difference. The regclass
definition has to be moved just before GENERAL_REGS, since it is
derived from this register class. We depend on fixed register
definition to avoid allocation of ESP and REX registers for
CLOBBERED_REGS class. This is the same approach as 64bit targets have
to avoid ESP, and the same approach as 32bit targets have to avoid REX
registers in GENERAL_REGS class.
- Some trivial code reorderings, so we don't process non-existing registers.
2012-08-13 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.h (FIXED_REGISTERS): Do not mark REX registers here.
(CALL_USED_REGISTERS): Use bitmaps to mark call-used registers
for different ABIs.
(enum reg_class): Move CLOBBERED_REGS just before GENERAL_REGS.
(REG_CLASS_NAMES): Update.
(REG_CLASS_CONTENTS): Update. Clear CLOBBERED_REGS members.
* config/i386/i386.c (ix86_conditional_register_usage): Disable
REX registers on 32bit targets. Handle bitmaps from
CALL_USED_REGISTERS initializer. Calculate CLOBBERED_REGS register
set from GENERAL_REGS also for 32bit targets. Do not change call
used register set for TARGET_64BIT_MS_ABI separately.
Patch was bootstrapped and regression tested on x86_64-pc-linux-gnu
{,-m32} and i686-pc-linux-gnu.
Patch was committed to mainline SVN.
Uros.
Attachment:
p.diff.txt
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |