[parisc-linux] [RFC] using 64bit wide registers with 32bit kernel

John David Anglin dave at hiauly1.hia.nrc.ca
Sat May 13 11:07:06 MDT 2006


> Two options from there:
> 1) we claim what I'm trying to do should not be done on parisc-linux
> => using ldd/std, MAX2 and other insns that rely on 64bit regs should
> be prohibited by binutils for non-wide code (currently gcc/binutils
> happily build my code with -mpa-risc-2-0, which generates level 2.0
> non wide code)

Well, hpux supports using 64-bit registers in non-wide code, so
I don't particularly like the idea that code generation changes
between linux and hpux.  64-bit registers are a PA 2.0 feature
and their use is independent of whether or not the processor is
in wide mode.

> 2) we claim what I'm trying to do should be possible on parisc-linux
> => we need to fix context switching in 32bit kernels.

I believe that's the correct approach.  The context state needs to
be updated for 64-bit userspace anyway.  HP-UX has some horrible
macros like GetSSReg for accessing register values in context data
(see pa/save_state.h).

config.guess for the distinguishes narrow and wide hpux kernels
(hppa2.0, hppa2.0n and hppa2.0w).  The hppa2.0 and hppa2.0n kernels
are narrow and don't support 64-bit context information.  As far
as I know, wide kernels support 64-bit context information for
the 32-bit runtime.

The GMP library is one bit of code that attempts to make use of this
capability.  It's a problem for GCC as there's no way to describe that
a register is partially call clobbered.

Dave
-- 
J. David Anglin                                  dave.anglin at nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)



More information about the parisc-linux mailing list