public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* [PowerPC 64]r12 is not updated to GEP when control transferred from virtual thunk function .
@ 2019-05-15 15:27 Umesh Kalappa
  2019-05-15 16:05 ` Eric Botcazou
  2019-05-15 23:37 ` Segher Boessenkool
  0 siblings, 2 replies; 18+ messages in thread
From: Umesh Kalappa @ 2019-05-15 15:27 UTC (permalink / raw)
  To: gcc

Hi All,

We have the situation ,where the R12 is pointing to Thunk GEP ,not the
current function  like

       .size   _ZN12Intermediate1vEv,.-_ZN12Intermediate1vEv
        .set    .LTHUNK0,_ZN12Intermediate1vEv
        .align 2
        .globl _ZThn8_N12Intermediate1vEv
        .type   _ZThn8_N12Intermediate1vEv, @function
_ZThn8_N12Intermediate1vEv:
.LFB27:
        .file 2 "/home/vkumar1/tmp/64_bit/qsp_ppc/gnu/dkmcxx/lib.h"
        .loc 2 13 16
        .cfi_startproc
.LCF2:
0:      addis 2,12,.TOC.-.LCF2@ha
        addi 2,2,.TOC.-.LCF2@l
        .localentry     _ZThn8_N12Intermediate1vEv,.-_ZThn8_N12Intermediate1vEv
        addi 3,3,-8
        b .LTHUNK0
        .cfi_endproc
.LFE27:
        .size   _ZThn8_N12Intermediate1vEv,.-_ZThn8_N12Intermediate1vEv
        .section        ".toc","aw"
        .set .LC1,.LC0

.section        ".text"
        .align 2
        .globl _ZN12Intermediate1vEv
        .type   _ZN12Intermediate1vEv, @function
_ZN12Intermediate1vEv:
.LFB25:
        .loc 1 7 23
        .cfi_startproc
.LCF1:
0:      addis 2,12,.TOC.-.LCF1@ha
        addi 2,2,.TOC.-.LCF1@l
        .localentry     _ZN12Intermediate1vEv,.-_ZN12Intermediate1vEv
        mflr 0
        std 0,16(1)
        std 31,-8(1)
        stdu 1,-64(1)

like above the control  from "_ZThn8_N12Intermediate1vEv" (support
function for this pointer update)  is transferred
"_ZN12Intermediate1vEv" by b  inst (where its not updating the r12)
and in the beginning  of   "_ZN12Intermediate1vEv" we are loading the
toc base from r12 (which is incorrect ) ,we are investigating the
issue and one way to fix the issue is that make THUNK to update the
r12 ,the cal like bctrl  or  load the r12 with the function address in
the _ZN12Intermediate1vEv prologue code .

But before we go ahead ,please share your thoughts or shed some lights
on the same .

Thank you
~Umesh

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2019-05-20  9:48 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-15 15:27 [PowerPC 64]r12 is not updated to GEP when control transferred from virtual thunk function Umesh Kalappa
2019-05-15 16:05 ` Eric Botcazou
2019-05-15 17:47   ` Umesh Kalappa
2019-05-15 18:31     ` Eric Botcazou
2019-05-15 23:52       ` Segher Boessenkool
2019-05-16  3:30         ` Umesh Kalappa
2019-05-16 12:43           ` Umesh Kalappa
2019-05-16 22:52             ` Segher Boessenkool
2019-05-17  3:58               ` Umesh Kalappa
2019-05-20  6:50               ` Alan Modra
2019-05-20  7:55                 ` Segher Boessenkool
2019-05-20  8:19                   ` Alan Modra
2019-05-20  8:39                     ` Segher Boessenkool
2019-05-20  9:48                       ` Alan Modra
2019-05-15 23:37 ` Segher Boessenkool
2019-05-17  6:22   ` Kewen.Lin
2019-05-17  7:24     ` Eric Botcazou
2019-05-17  9:29       ` Kewen.Lin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).