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]

Re: PATCH: Darwin specific 1-liners (1)



On Thursday, December 6, 2001, at 05:41 PM, Dale Johannesen wrote:
> It happens
> only with -fpic (the default).  Without -fpic, the instruction that feeds 
> into
> the tablejump is an add, not a mov, so the renamer leaves it alone.

Sorry, wrong analysis; the preceding instruction is a mov in both cases.
The reason the substitution doesn't happen without -fpic is just that
the return-address LR is not saved and restored (it's a leaf function),
so that value of LR is live, so LR is not available to the renamer.
-fpic forces PC-relative addressing, which involves a "call" to the next
instruction, which frees LR for reassignment.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]