This is the mail archive of the 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: [discuss] When is RBX used for base pointer?


> Honza said:
> I am bit confused here.  If I wanted a free register in prologue only,
> would probably look at the caller saved ones.  But I gues it is just
> typo.

> I don't see much value in making the register callee-saved especially
> you say that virtual reg (pseudo?) is used afterward.
I'm sorry for the confusing word. But I did mean callee-save register,
in case none caller-save register is available. For i386, eax, edx and
ecx can all be used to pass register parameters. So there must be a
callee-save register in stock. Due to faked bug we said only callee-save
register can be used. It has been clarified now.

> When you just need a temporary in prologue, I think you can go with
> in most cases getting shortest code. It is used by x86-64 stdargs
> prologue and by i386 regparm. You can improve bit broken
> ix86_eax_live_at_start_p to test this. Using alternative choice if RAX
> is taken.
In case callee-save registers are available, ECX is a good candidate for
i386 because it is the latest register to use for parameter passing. RAX
is a good candiate for x86_64.

Thanks - Joey

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