On 06/08/2015 10:00 AM, Richard Earnshaw wrote:
r12 can *also* be clobbered by interworking calls or calls that span more than the branch range of a call instruction. Rare, but possible.
I can only presume from this that nested functions are not reliable now, for very large programs. Unless you somehow force the nested function to be within N bytes of the parent function. A direct call to a static function, but with a static chain to its parent frame.
That said, most go closures are already called indirectly. It's rare, but possible, for optimization to see through the construction of a closure and produce a direct call.
It ought to be possible to modify the aarch32 backend to force a call to be indirect, and thus not be subject to branch islands, whenever the SYMBOL_REF_DECL has DECL_STATIC_CHAIN set?
r~