r13 in the kernel

Frank Wille <[email protected]>
Newsgroups gmane.os.netbsd.ports.powerpc
Organization Privates Internet Ostwestfalen/Lippe e.V.
Message-ID <[email protected]>
Hi,

while debugging lock_stubs.S I realized that r13 is always assumed to
contain the thread-id.

Is it really safe to do so? IIRC the V.4-ABI defines r13 as small data base
register, but when small data is not used it should be a normal
non-volatile register, like r14 - r31.
The kernel is compiled with -msdata=none.

What makes you sure that gcc's code generator wouldn't use r13 for storing
non-volatile data during a function?

-- 
Frank Wille
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.