tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [PATCH] VAX libstdc++ common runtime - register used but not saved



On Fri, Jul 28, 2023 at 4:59 PM Jan-Benedict Glaw <jbglaw%lug-owl.de@localhost> wrote:
>
> On Fri, 2023-07-28 09:51:07 +0200, Edgar Fuß <ef%math.uni-bonn.de@localhost> wrote:
> > > This 0x0101 seems like two NOPs copy-paste from pre-ELF code:
> > Is it absolutely clear to VAX insiders what these constants mean or why
> > aren't there any #defines (or whatever that is in asm) for it?
>
> Yes, I think so. It's the "Procedure Entry Mask", 16 bits showing
> which registers should be automatically pushed onto the stack before
> starting the actual function code. So it's an ORed value where each
> bit represents one register.
>
>   VAX has 16 registers. r0 and r1 are commonly used to return values
> and are thus not saved for obvious reasone. r12 to r15 have fixed
> purposes (r12 = argument pointer, r13 = frame pointer, r14 = stack
> pointer and r15 = program counter.) Bits 14 and 15 are used not
> actually for registers but to mark for integer/decimal overflow, and
> bits 12 and 13 may not be set.

And we have register number definitions in <vax/asm.h>:
https://nxr.netbsd.org/xref/src/sys/arch/vax/include/asm.h#36

Thanks,
rin


Home | Main Index | Thread Index | Old Index