This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: register variables: list?
- From: Andrew Haley <aph-gcc at littlepinkcloud dot COM>
- To: skaller <skaller at users dot sourceforge dot net>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Tue, 23 Oct 2007 18:36:30 +0100
- Subject: Re: register variables: list?
- References: <1193160329.5835.77.camel@rosella.wigram>
This is not appropriate for gcc@gcc.gnu.org, which is for gcc
development. I'm redirecting this reply to gcc-help.
skaller writes:
> In
>
> http://gcc.gnu.org/onlinedocs/gcc-4.2.2/gcc/Explicit-Reg-Vars.html#Explicit-Reg-Vars
>
> it explains how to use register variables .. but doesn't list them.
>
> Is there a document somewhere which lists
>
> a) each CPU macro name
> b) all the registers supported
>
> ?
Not as far as I'm aware. All of this information is in the
gcc/config/<cpu> directory, so can fairly easily be extracted.
> I need to get the stack pointer when __builtin_frame_address(0) isn't
> working .. on amd64 this:
>
>
> register void *stack asm ("%rsp");
>
> appears to work. Also this is the current stack pointer .. not
> the frame pointer, which could be different.
Right, and in fact there need not even be a frame pointer, which is
why you have to use __builtin_frame_address.
Andrew.