On Fri, Oct 10, 2014 at 1:42 PM, Richard Henderson <r...@redhat.com> wrote: > > So instead I thought about how I'd add some support for Go directly > into libffi. After all, we've got some custom code in libffi for > Java, why couldn't Go have the same treatment? > > The stickler, as far as I could see, is __go_set_context. I didn't > like the idea of libffi needing a callback into libgo in order to > accomplish the goal. > > But the comment immediately before __go_set_closure itself says > that it would be better to use the static chain register. So I set > about to see how easy that would be to accomplish. (And not for > nothing such a change would make gccgo compiled programs faster > by avoiding the library calls.) > > The following patch set enables this for x86_64, i386, and aarch64[3].
... > Before I go too much farther down this road, I wanted to get some > feedback. FWIW, a complete tree can be found at [4]. I think this is a great idea. Thanks. Ian