diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-02-07 11:18:32 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-02-07 11:18:32 +0000 |
commit | 717db2f5f33ade59217393f9169f49019962cdf1 (patch) | |
tree | cadeaae83c8f6e5a757c9f73fc245dc908c74d1b /gcc/config/i386/i386.h | |
parent | 1ba3670e13d1cbeb249759cf9795b9fea0af48d8 (diff) | |
download | gcc-717db2f5f33ade59217393f9169f49019962cdf1.tar.gz |
* i386-protos.h (x86_order_regs_for_local_alloc): Declare
* i386.c (x86_order_regs_for_local_alloc): New global function.
* i386.h (REG_ALLOC_ORDER): CLeanup.
(ORDER_REGS_FOR_LOCAL_ALLOC): New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49574 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/i386/i386.h')
-rw-r--r-- | gcc/config/i386/i386.h | 39 |
1 files changed, 11 insertions, 28 deletions
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 01510473c98..e5a04ec9347 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -926,38 +926,21 @@ extern int ix86_arch; registers listed in CALL_USED_REGISTERS, keeping the others available for storage of persistent values. - Three different versions of REG_ALLOC_ORDER have been tried: + The ORDER_REGS_FOR_LOCAL_ALLOC actually overwrite the order, + so this is just empty initializer for array. */ - If the order is edx, ecx, eax, ... it produces a slightly faster compiler, - but slower code on simple functions returning values in eax. +#define REG_ALLOC_ORDER \ +{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,\ + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, \ + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, \ + 48, 49, 50, 51, 52 } - If the order is eax, ecx, edx, ... it causes reload to abort when compiling - perl 4.036 due to not being able to create a DImode register (to hold a 2 - word union). +/* ORDER_REGS_FOR_LOCAL_ALLOC is a macro which permits reg_alloc_order + to be rearranged based on a particular function. When using sse math, + we want to allocase SSE before x87 registers and vice vera. */ - If the order is eax, edx, ecx, ... it produces better code for simple - functions, and a slightly slower compiler. Users complained about the code - generated by allocating edx first, so restore the 'natural' order of things. */ +#define ORDER_REGS_FOR_LOCAL_ALLOC x86_order_regs_for_local_alloc () -#define REG_ALLOC_ORDER \ -/*ax,dx,cx,*/ \ -{ 0, 1, 2, \ -/* bx,si,di,bp,sp,*/ \ - 3, 4, 5, 6, 7, \ -/*r8,r9,r10,r11,*/ \ - 37,38, 39, 40, \ -/*r12,r15,r14,r13*/ \ - 41, 44, 43, 42, \ -/*xmm0,xmm1,xmm2,xmm3,xmm4,xmm5,xmm6,xmm7*/ \ - 21, 22, 23, 24, 25, 26, 27, 28, \ -/*xmm8,xmm9,xmm10,xmm11,xmm12,xmm13,xmm14,xmm15*/ \ - 45, 46, 47, 48, 49, 50, 51, 52, \ -/*st,st1,st2,st3,st4,st5,st6,st7*/ \ - 8, 9, 10, 11, 12, 13, 14, 15, \ -/*,arg,cc,fpsr,dir,frame*/ \ - 16,17, 18, 19, 20, \ -/*mmx0,mmx1,mmx2,mmx3,mmx4,mmx5,mmx6,mmx7*/ \ - 29, 30, 31, 32, 33, 34, 35, 36 } /* Macro to conditionally modify fixed_regs/call_used_regs. */ #define CONDITIONAL_REGISTER_USAGE \ |