Use ppc_r12 for some global call sequences
authorMichael Matz <matz@suse.de>
Wed, 5 Nov 2014 11:47:28 +0000 (09:47 -0200)
committerMauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
Mon, 17 Nov 2014 02:34:11 +0000 (02:34 +0000)
commit5785fd898a27fe132128098f25093511181200f1
tree0ea1df82c55c51c523cd257846ceff33b1a7b602
parent02cdf6abca826279530ff9d89715a743130d127c
Use ppc_r12 for some global call sequences

After the mechanical exchange of ppc_r11 and ppc_r12 we now can use
ppc_r12 for global calls to hold the callees address without clobbering
r11 (which potentially contains IMT_REG, VTABLE_REG and RGCTX_REG).
We don't need to change all indirect calls, only those potentially reaching
functions containing a TOC setup based on r12 (in particular functions
in shared libs).  As the instruction sequence patcher can only deal
with one destination register we also need to make some additional
calls use r12.  We probably should convert all calls that currently
use r0 to use r12 if no other conflicts arise but this is enough to build.

Author: Michael Matz <matz@suse.de>
Origin: https://build.opensuse.org/request/show/225490
Changes: Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>

Signed-off-by: Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
mono/mini/exceptions-ppc.c
mono/mini/mini-ppc.c
mono/mini/mini-ppc.h
mono/mini/tramp-ppc.c