mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-08 07:34:07 +00:00
Merge branch 'master' into v2.1
This commit is contained in:
commit
e92d64a841
@ -108,10 +108,16 @@ static const char *sym_decorate(BuildCtx *ctx,
|
|||||||
sprintf(name, "%s%s%s", symprefix, prefix, suffix);
|
sprintf(name, "%s%s%s", symprefix, prefix, suffix);
|
||||||
p = strchr(name, '@');
|
p = strchr(name, '@');
|
||||||
if (p) {
|
if (p) {
|
||||||
|
#if LJ_TARGET_X86ORX64
|
||||||
if (!LJ_64 && (ctx->mode == BUILD_coffasm || ctx->mode == BUILD_peobj))
|
if (!LJ_64 && (ctx->mode == BUILD_coffasm || ctx->mode == BUILD_peobj))
|
||||||
name[0] = '@';
|
name[0] = '@';
|
||||||
else
|
else
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
|
#elif (LJ_TARGET_PPC || LJ_TARGET_PPCSPE) && !LJ_TARGET_CONSOLE
|
||||||
|
/* Keep @plt. */
|
||||||
|
#else
|
||||||
|
*p = '\0';
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
p = (char *)malloc(strlen(name)+1); /* MSVC doesn't like strdup. */
|
p = (char *)malloc(strlen(name)+1); /* MSVC doesn't like strdup. */
|
||||||
strcpy(p, name);
|
strcpy(p, name);
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
|// Convenience macros for TOC handling.
|
|// Convenience macros for TOC handling.
|
||||||
|.if TOC
|
|.if TOC
|
||||||
|// Linker needs a TOC patch area for every external call relocation.
|
|// Linker needs a TOC patch area for every external call relocation.
|
||||||
|.macro blex, target; bl extern target; nop; .endmacro
|
|.macro blex, target; bl extern target@plt; nop; .endmacro
|
||||||
|.macro .toc, a, b; a, b; .endmacro
|
|.macro .toc, a, b; a, b; .endmacro
|
||||||
|.if P64
|
|.if P64
|
||||||
|.define TOC_OFS, 8
|
|.define TOC_OFS, 8
|
||||||
@ -59,7 +59,7 @@
|
|||||||
|.define ENV_OFS, 8
|
|.define ENV_OFS, 8
|
||||||
|.endif
|
|.endif
|
||||||
|.else // No TOC.
|
|.else // No TOC.
|
||||||
|.macro blex, target; bl extern target; .endmacro
|
|.macro blex, target; bl extern target@plt; .endmacro
|
||||||
|.macro .toc, a, b; .endmacro
|
|.macro .toc, a, b; .endmacro
|
||||||
|.endif
|
|.endif
|
||||||
|.macro .tocenv, a, b; .if TOCENV; a, b; .endif; .endmacro
|
|.macro .tocenv, a, b; .if TOCENV; a, b; .endif; .endmacro
|
||||||
|
@ -1390,7 +1390,7 @@ static void build_subroutines(BuildCtx *ctx)
|
|||||||
| checknum CARG2
|
| checknum CARG2
|
||||||
| evmergehi CARG1, CARG2, CARG2
|
| evmergehi CARG1, CARG2, CARG2
|
||||||
| checkfail ->fff_fallback
|
| checkfail ->fff_fallback
|
||||||
| bl extern func
|
| bl extern func@plt
|
||||||
| evmergelo CRET1, CRET1, CRET2
|
| evmergelo CRET1, CRET1, CRET2
|
||||||
| b ->fff_restv
|
| b ->fff_restv
|
||||||
|.endmacro
|
|.endmacro
|
||||||
@ -1405,7 +1405,7 @@ static void build_subroutines(BuildCtx *ctx)
|
|||||||
| checknum CARG1
|
| checknum CARG1
|
||||||
| evmergehi CARG3, CARG4, CARG4
|
| evmergehi CARG3, CARG4, CARG4
|
||||||
| checkanyfail ->fff_fallback
|
| checkanyfail ->fff_fallback
|
||||||
| bl extern func
|
| bl extern func@plt
|
||||||
| evmergelo CRET1, CRET1, CRET2
|
| evmergelo CRET1, CRET1, CRET2
|
||||||
| b ->fff_restv
|
| b ->fff_restv
|
||||||
|.endmacro
|
|.endmacro
|
||||||
@ -1437,7 +1437,7 @@ static void build_subroutines(BuildCtx *ctx)
|
|||||||
| checknum CARG2
|
| checknum CARG2
|
||||||
| evmergehi CARG1, CARG2, CARG2
|
| evmergehi CARG1, CARG2, CARG2
|
||||||
| checkfail ->fff_fallback
|
| checkfail ->fff_fallback
|
||||||
| bl extern log
|
| bl extern log@plt
|
||||||
| evmergelo CRET1, CRET1, CRET2
|
| evmergelo CRET1, CRET1, CRET2
|
||||||
| b ->fff_restv
|
| b ->fff_restv
|
||||||
|
|
|
|
||||||
@ -1465,7 +1465,7 @@ static void build_subroutines(BuildCtx *ctx)
|
|||||||
| checknum CARG1
|
| checknum CARG1
|
||||||
| checkanyfail ->fff_fallback
|
| checkanyfail ->fff_fallback
|
||||||
| efdctsi CARG3, CARG4
|
| efdctsi CARG3, CARG4
|
||||||
| bl extern ldexp
|
| bl extern ldexp@plt
|
||||||
| evmergelo CRET1, CRET1, CRET2
|
| evmergelo CRET1, CRET1, CRET2
|
||||||
| b ->fff_restv
|
| b ->fff_restv
|
||||||
|
|
|
|
||||||
@ -1478,7 +1478,7 @@ static void build_subroutines(BuildCtx *ctx)
|
|||||||
| checkfail ->fff_fallback
|
| checkfail ->fff_fallback
|
||||||
| la CARG3, DISPATCH_GL(tmptv)(DISPATCH)
|
| la CARG3, DISPATCH_GL(tmptv)(DISPATCH)
|
||||||
| lwz PC, FRAME_PC(BASE)
|
| lwz PC, FRAME_PC(BASE)
|
||||||
| bl extern frexp
|
| bl extern frexp@plt
|
||||||
| lwz TMP1, DISPATCH_GL(tmptv)(DISPATCH)
|
| lwz TMP1, DISPATCH_GL(tmptv)(DISPATCH)
|
||||||
| evmergelo CRET1, CRET1, CRET2
|
| evmergelo CRET1, CRET1, CRET2
|
||||||
| efdcfsi CRET2, TMP1
|
| efdcfsi CRET2, TMP1
|
||||||
@ -1497,7 +1497,7 @@ static void build_subroutines(BuildCtx *ctx)
|
|||||||
| checkfail ->fff_fallback
|
| checkfail ->fff_fallback
|
||||||
| la CARG3, -8(BASE)
|
| la CARG3, -8(BASE)
|
||||||
| lwz PC, FRAME_PC(BASE)
|
| lwz PC, FRAME_PC(BASE)
|
||||||
| bl extern modf
|
| bl extern modf@plt
|
||||||
| evmergelo CRET1, CRET1, CRET2
|
| evmergelo CRET1, CRET1, CRET2
|
||||||
| la RA, -8(BASE)
|
| la RA, -8(BASE)
|
||||||
| evstdd CRET1, 0(BASE)
|
| evstdd CRET1, 0(BASE)
|
||||||
@ -2393,7 +2393,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
|
|||||||
| checknum CARG1
|
| checknum CARG1
|
||||||
| evmergehi CARG3, CARG4, CARG4
|
| evmergehi CARG3, CARG4, CARG4
|
||||||
| checkanyfail ->vmeta_arith_vv
|
| checkanyfail ->vmeta_arith_vv
|
||||||
| bl extern pow
|
| bl extern pow@plt
|
||||||
| evmergelo CRET2, CRET1, CRET2
|
| evmergelo CRET2, CRET1, CRET2
|
||||||
| evstddx CRET2, BASE, RA
|
| evstddx CRET2, BASE, RA
|
||||||
| ins_next
|
| ins_next
|
||||||
|
Loading…
Reference in New Issue
Block a user