List Info

Thread: {REG,PTR}_{L,S} usage




{REG,PTR}_{L,S} usage
user name
2007-11-13 00:29:10
I have many questions now. 

I think REG_L / REG_R / PTR_L / PTR_S macros are used by the
size of
the memory object size.  Is this correct?

For example, if I want to store a pointer (e.g. return
address; which
is 32-bit on N32) into a call frame RA slot (which is
register_t ==
64-bit on N32) on a stack, I should use REG_S, right?

Masao

Re: {REG,PTR}_{L,S} usage
country flaguser name
Australia
2007-11-13 00:35:22
"Masao Uebayashi" wrote:

> I have many questions now. 
> 
> I think REG_L / REG_R / PTR_L / PTR_S macros are used
by the size of
> the memory object size.  Is this correct?
> 
> For example, if I want to store a pointer (e.g. return
address; which
> is 32-bit on N32) into a call frame RA slot (which is
register_t ==
> 64-bit on N32) on a stack, I should use REG_S, right?

If you want to load/store a pointer, you use PTR_*.  If
you're using n32
or o32 ABI, PTR_S will be "sw" and if you're using
the n64 (or o64 if we
care about it) then PTR_S will be "sd".

You'd use REG_* if you know you want to deal with the full
register.
One example that immediately jumps to mind is say
setjmp()/longjmp().

Cheers,
Simon.

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )