From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 86474 invoked by alias); 15 May 2019 15:27:44 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 86395 invoked by uid 89); 15 May 2019 15:27:44 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.1 spammy=cfi_endproc, HX-Received:6449, cfi_startproc, transferred X-HELO: mail-pg1-f177.google.com Received: from mail-pg1-f177.google.com (HELO mail-pg1-f177.google.com) (209.85.215.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 15 May 2019 15:27:42 +0000 Received: by mail-pg1-f177.google.com with SMTP id h17so1561357pgv.0 for ; Wed, 15 May 2019 08:27:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=jWQHGE5rCDPREdChFL0pyZHGQEXjSw7ZCOvopp3Pim4=; b=THzbuYz5IZTi9ufe1KWpAaIcUZo5OfNWjE4ZeiwiHhWW3Ze5q6jnDzggNfzdK8CXTH +OvqRdHBuZDMDSxAvT2VAmWMqQO1J4IDgODL5C+sJeUmWHHAgK9EWE7/g4vPJ/s3yjzR /x1pA6tDWVPCw24oI4qTQ9msAYIWfZSGDc10HLaesPRM/vCRx/dQQxfVu20EIWiFftdO b16rOf0NSBYySKbl5Xbgq5kKDNo9GevhWhCFCo+QOCkJG+VKkICPgf5zHlI4PXE34Q0s OEfTGJ/19ZqYvYxqLZcgQcuGaj5X+hKFTwgQ5l9bO6JOOT7y32BLOYQFqK34AeZsSJOu Iy6g== MIME-Version: 1.0 From: Umesh Kalappa Date: Wed, 15 May 2019 15:27:00 -0000 Message-ID: Subject: [PowerPC 64]r12 is not updated to GEP when control transferred from virtual thunk function . To: gcc@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2019-05/txt/msg00116.txt.bz2 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