Re: Puzzle about macro MIPS_PROLOGUE_TEMP_REGNUM

2010-06-06 Thread Amker.Cheng
> > It's not "starting from $3".  It's $3 and nothing else ;-)  It's not > intended to be used as (MIPS_PROLOGUE_TEMP_REGNUM + N). > > $3 was chosen because it's a MIPS16 register, and can therefore > be used for both MIPS16 and normal-mode code.  $2 used to be the > static chain register, which le

Re: Puzzle about macro MIPS_PROLOGUE_TEMP_REGNUM

2010-06-04 Thread Richard Sandiford
"Amker.Cheng" writes: > Hi : >I found the temp register used for saving registers when expanding > prologue is defined by > macro MIPS_PROLOGUE_TEMP_REGNUM on mips target, like: > > #define MIPS_PROLOGUE_TEMP_REGNUM \ > (cfun->machine->interrupt_handler_p ? K0_REG_NUM : GP_REG_FIRST + 3) > >

Re: Puzzle about macro MIPS_PROLOGUE_TEMP_REGNUM

2010-06-04 Thread Ian Lance Taylor
"Amker.Cheng" writes: >I found the temp register used for saving registers when expanding > prologue is defined by > macro MIPS_PROLOGUE_TEMP_REGNUM on mips target, like: > > #define MIPS_PROLOGUE_TEMP_REGNUM \ > (cfun->machine->interrupt_handler_p ? K0_REG_NUM : GP_REG_FIRST + 3) > > I don