Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1318967
| From | Torsten Duwe <duwe@lst.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v6 1/9] ppc64 (le): prepare for -mprofile-kernel |
| Date | 2016-01-27 14:50 +0100 |
| Message-ID | <qVyDU-4eI-13@gated-at.bofh.it> (permalink) |
| References | <qUSOm-7cE-23@gated-at.bofh.it> <qUSOm-7cE-21@gated-at.bofh.it> <qVvmG-1Z6-23@gated-at.bofh.it> <qVxRw-3BF-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Jan 27, 2016 at 11:28:09PM +1030, Alan Modra wrote: > On Wed, Jan 27, 2016 at 09:19:27PM +1100, Michael Ellerman wrote: > > > > Can we use r11 instead? eg: > > > > _GLOBAL(_mcount) > > mflr r11 > > mtctr r11 > > mtlr r0 > > bctr > > Depends on what you need to support. As Torsten says, the code to > call _mcount when -mprofile-kernel is emitted before the prologue of a > function (similar to -m32), but after the ELFv2 global entry point > code. If you trash r11 here you're killing the static chain pointer, > used by C nested functions or other languages that use a static chain, > eg. Pascal. r11 has *not* been saved for ELFv2. Even if nested functions aren't supported in the Linux kernel(?), I think it was an earlier version of mcount when r11 usage ruined my day. > r12 might be a better choice for a temp reg. Good idea. r12 holds the function entry point and is used to calculate the new TOC value just _before_ the call. It should be available. I'll try, thanks for the hint. Torsten
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v6 1/9] ppc64 (le): prepare for -mprofile-kernel Torsten Duwe <duwe@lst.de> - 2016-01-25 18:10 +0100
Re: [PATCH v6 1/9] ppc64 (le): prepare for -mprofile-kernel Michael Ellerman <mpe@ellerman.id.au> - 2016-01-27 11:20 +0100
Re: [PATCH v6 1/9] ppc64 (le): prepare for -mprofile-kernel Torsten Duwe <duwe@lst.de> - 2016-01-27 11:50 +0100
Re: [PATCH v6 1/9] ppc64 (le): prepare for -mprofile-kernel Alan Modra <amodra@gmail.com> - 2016-01-27 14:00 +0100
Re: [PATCH v6 1/9] ppc64 (le): prepare for -mprofile-kernel Torsten Duwe <duwe@lst.de> - 2016-01-27 14:50 +0100
csiph-web