Re: r13 in the kernel
Matt Thomas <[email protected]>
| Newsgroups | gmane.os.netbsd.ports.powerpc |
|---|---|
| Message-ID | <[email protected]> |
On Sep 23, 2012, at 7:28 AM, Frank Wille wrote: > 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. Yes. From gcc rs6000.h: On System V implementations, r13 is fixed and not available for use. > What makes you sure that gcc's code generator wouldn't use r13 for storing > non-volatile data during a function? See above.