altivec fixed and call used regs
Aldy Hernandez
aldyh@redhat.com
Fri Nov 9 13:48:00 GMT 2001
hi david.
this will fix the ICE about VRSAVE. it sets VRSAVE to call used, and
fixed.
the altivec regs should also be fixed/call_used when not generating
altivec code. this is also fixed.
regarding the other ICE while bootstrapping, i'm going to take a look,
but i don't think it's altivec related. the tree also seems to be
broken in more ways than one... ("@" in dwarf info labels, etc).
ok to install?
2001-11-08 Aldy Hernandez <aldyh@redhat.com>
* rs6000.h (REG_CLASS_CONTENTS): Add VRSAVE bit to ALL_REGS.
(CONDITIONAL_REGISTER_USAGE): Disable AltiVec registers unless
generating altivec code.
(FIXED_REGISTERS): VRSAVE is fixed.
(CALL_USED_REGISTERS): VRSAVE is call used.
Index: config/rs6000/rs6000.h
===================================================================
RCS file: /cvs/uberbaum/gcc/config/rs6000/rs6000.h,v
retrieving revision 1.134
diff -c -p -r1.134 rs6000.h
*** rs6000.h 2001/11/08 22:46:23 1.134
--- rs6000.h 2001/11/09 21:42:28
*************** extern int rs6000_debug_arg; /* debug a
*** 687,693 ****
/* AltiVec registers. */ \
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
! 0 \
}
/* 1 for registers not available across function calls.
--- 687,693 ----
/* AltiVec registers. */ \
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
! 1 \
}
/* 1 for registers not available across function calls.
*************** extern int rs6000_debug_arg; /* debug a
*** 706,712 ****
/* AltiVec registers. */ \
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
! 0 \
}
--- 706,712 ----
/* AltiVec registers. */ \
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
! 1 \
}
*************** extern int rs6000_debug_arg; /* debug a
*** 923,934 ****
global_regs[PIC_OFFSET_TABLE_REGNUM] \
= fixed_regs[PIC_OFFSET_TABLE_REGNUM] \
= call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
if (TARGET_ALTIVEC_ABI) \
! { \
! fixed_regs[VRSAVE_REGNO] = call_used_regs[VRSAVE_REGNO] = 1; \
! for (i = FIRST_ALTIVEC_REGNO; i < FIRST_ALTIVEC_REGNO + 20; ++i) \
! call_used_regs[i] = 1; \
! } \
}
/* Specify the registers used for certain standard purposes.
--- 923,934 ----
global_regs[PIC_OFFSET_TABLE_REGNUM] \
= fixed_regs[PIC_OFFSET_TABLE_REGNUM] \
= call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
+ if (! TARGET_ALTIVEC) \
+ for (i = FIRST_ALTIVEC_REGNO; i <= LAST_ALTIVEC_REGNO; ++i) \
+ fixed_regs[i] = call_used_regs[i] = 1; \
if (TARGET_ALTIVEC_ABI) \
! for (i = FIRST_ALTIVEC_REGNO; i < FIRST_ALTIVEC_REGNO + 20; ++i) \
! call_used_regs[i] = 1; \
}
/* Specify the registers used for certain standard purposes.
*************** enum reg_class
*** 1068,1074 ****
{ 0x00000000, 0x00000000, 0x00000ff0, 0x00000000 }, /* CR_REGS */ \
{ 0xffffffff, 0x00000000, 0x0000ffff, 0x00000000 }, /* NON_FLOAT_REGS */ \
{ 0x00000000, 0x00000000, 0x00010000, 0x00000000 }, /* XER_REGS */ \
! { 0xffffffff, 0xffffffff, 0xffffffff, 0x0001ffff } /* ALL_REGS */ \
}
/* The same information, inverted:
--- 1068,1074 ----
{ 0x00000000, 0x00000000, 0x00000ff0, 0x00000000 }, /* CR_REGS */ \
{ 0xffffffff, 0x00000000, 0x0000ffff, 0x00000000 }, /* NON_FLOAT_REGS */ \
{ 0x00000000, 0x00000000, 0x00010000, 0x00000000 }, /* XER_REGS */ \
! { 0xffffffff, 0xffffffff, 0xffffffff, 0x0003ffff } /* ALL_REGS */ \
}
/* The same information, inverted:
More information about the Gcc-patches
mailing list