On Mon, Jan 08, 2018 at 03:55:52AM -0800, H.J. Lu wrote: > > I'm wondering whether thunk creation can be a good target-independent > > generalization? I guess > > we can emit the function declaration without direct writes to asm_out_file? > > And the emission > > of function body can be potentially a target hook? > > > > What about emitting body of the function with RTL instructions instead of > > direct assembly write? > > My knowledge of RTL is quite small, but maybe it can bring some > > generalization and reusability > > for other targets? > > Thunks are x86 specific and they are created the same way as 32-bit PIC > thunks. > I don't see how a target hook is used.
Talking about PIC thunks, those have I believe . character in their symbols, so that they can't be confused with user functions. Any reason these retpoline thunks aren't? Jakub