Hello! > The PR is logged against Darwin, and (as Jakub points out in the PR thread) > indeed Darwin is > missing a nonlocal_goto_receiver to restore the PIC reg in code that uses it > (most of the patch). > > However, there is a second issue, and (if I've understood things correctly) > this affects GOT targets > too - thus there is a single non-darwin-specific > hunk for which I need approval for X86 as a whole. >
> PR target/51784 > * config/i386/i386.c (output_set_got, DARWIN): Adjust to emit a second label > for nonlocal You can write this as: * config/i386/i386.c (output_set_got) [TARGET_MACHO]: ... cf: http://www.gnu.org/prep/standards/html_node/Conditional-Changes.html#Conditional-Changes +(define_insn_and_split "nonlocal_goto_receiver" + [(unspec_volatile [(const_int 0)] UNSPECV_NLGR)] + "TARGET_MACHO && !TARGET_64BIT && flag_pic" This should be implemented as an expander. You also won't need UNSPEC_NLGR that way. Uros.