On Sat, Oct 10, 2026 at 5:07 PM Richard Henderson
<[email protected]> wrote:
>
> On 10/10/26 10:53, Yonggang Luo wrote:
> > On Sat, Oct 10, 2026 at 3:45 PM Richard Henderson
> > <[email protected]> wrote:
> >>
> >> On 10/1/26 18:51, Pierrick Bouvier wrote:
> >>> On 9/30/2026 12:39 AM, Yonggang Luo wrote:
> >>>> Use target-specific assembler names and helper metadata for TCG helpers
> >>>> when multiple targets share a binary. The generated prototype maps the
> >>>> generic C helper name to a target-specific linker symbol, for example:
> >>>>
> >>>> helper_raise_exception
> >>>> __asm__("helper_i386_raise_exception")
> >>>>
> >>>> This lets target helper definitions keep generic C names while avoiding
> >>>> linker symbol collisions between targets.
> >>>>
> >>> Hi Richard, do you have an opinion on this patch?
> >>>
> >>> We are trying to see if we do renaming per helper, or if we introduce a
> >>> "generic" way to deal with it. I don't have a strong opinion, renaming
> >>> things or adding more macros and build system soup are both ok on my
> >>> side, so direction would depend on your culinary taste.
> >> I think the general direction is good. Perhaps the specifics need
> >> adjustment. In particular, using __asm__ to rename symbols is suspect
> >> and likely non-portable to non-ELF hosts like Darwin and Windows.
> >
> > I have already tested on windows, only not sure about Darwin, let's me
> > create a test on Darwin,
> > because I do not have a CI for Darwin to test it.
> In particular, I saw no use of __USER_LABEL_PREFIX__, which is required
> for portability.
What does this mean?
I am using TCG_HELPER_PREFIX to identify different base_arch
+ '-DTCG_HELPER_PREFIX=' + target_base_arch.to_lower()
>
>
> r~
--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo