diff options
| author | Mike Pall <mike> | 2013-06-03 17:32:09 +0200 |
|---|---|---|
| committer | Mike Pall <mike> | 2013-06-03 17:32:09 +0200 |
| commit | e92d64a841a068a29364a58357063b71c5b774a2 (patch) | |
| tree | 0c7a57105e03ad61e832414ff97980ad1e25611a | |
| parent | 45f3ee87945e69f9e601dbe5d5f3708d00926e4d (diff) | |
| parent | 338e9863c220462201fde0e725aba4002310c849 (diff) | |
| download | luajit-e92d64a841a068a29364a58357063b71c5b774a2.tar.gz luajit-e92d64a841a068a29364a58357063b71c5b774a2.tar.bz2 luajit-e92d64a841a068a29364a58357063b71c5b774a2.zip | |
Merge branch 'master' into v2.1
| -rw-r--r-- | src/host/buildvm.c | 6 | ||||
| -rw-r--r-- | src/vm_ppc.dasc | 4 | ||||
| -rw-r--r-- | src/vm_ppcspe.dasc | 14 |
3 files changed, 15 insertions, 9 deletions
diff --git a/src/host/buildvm.c b/src/host/buildvm.c index ef5f7fb9..ce892006 100644 --- a/src/host/buildvm.c +++ b/src/host/buildvm.c | |||
| @@ -108,10 +108,16 @@ static const char *sym_decorate(BuildCtx *ctx, | |||
| 108 | sprintf(name, "%s%s%s", symprefix, prefix, suffix); | 108 | sprintf(name, "%s%s%s", symprefix, prefix, suffix); |
| 109 | p = strchr(name, '@'); | 109 | p = strchr(name, '@'); |
| 110 | if (p) { | 110 | if (p) { |
| 111 | #if LJ_TARGET_X86ORX64 | ||
| 111 | if (!LJ_64 && (ctx->mode == BUILD_coffasm || ctx->mode == BUILD_peobj)) | 112 | if (!LJ_64 && (ctx->mode == BUILD_coffasm || ctx->mode == BUILD_peobj)) |
| 112 | name[0] = '@'; | 113 | name[0] = '@'; |
| 113 | else | 114 | else |
| 114 | *p = '\0'; | 115 | *p = '\0'; |
| 116 | #elif (LJ_TARGET_PPC || LJ_TARGET_PPCSPE) && !LJ_TARGET_CONSOLE | ||
| 117 | /* Keep @plt. */ | ||
| 118 | #else | ||
| 119 | *p = '\0'; | ||
| 120 | #endif | ||
| 115 | } | 121 | } |
| 116 | p = (char *)malloc(strlen(name)+1); /* MSVC doesn't like strdup. */ | 122 | p = (char *)malloc(strlen(name)+1); /* MSVC doesn't like strdup. */ |
| 117 | strcpy(p, name); | 123 | strcpy(p, name); |
diff --git a/src/vm_ppc.dasc b/src/vm_ppc.dasc index 6bceff9c..a7707ccc 100644 --- a/src/vm_ppc.dasc +++ b/src/vm_ppc.dasc | |||
| @@ -49,7 +49,7 @@ | |||
| 49 | |// Convenience macros for TOC handling. | 49 | |// Convenience macros for TOC handling. |
| 50 | |.if TOC | 50 | |.if TOC |
| 51 | |// Linker needs a TOC patch area for every external call relocation. | 51 | |// Linker needs a TOC patch area for every external call relocation. |
| 52 | |.macro blex, target; bl extern target; nop; .endmacro | 52 | |.macro blex, target; bl extern target@plt; nop; .endmacro |
| 53 | |.macro .toc, a, b; a, b; .endmacro | 53 | |.macro .toc, a, b; a, b; .endmacro |
| 54 | |.if P64 | 54 | |.if P64 |
| 55 | |.define TOC_OFS, 8 | 55 | |.define TOC_OFS, 8 |
| @@ -59,7 +59,7 @@ | |||
| 59 | |.define ENV_OFS, 8 | 59 | |.define ENV_OFS, 8 |
| 60 | |.endif | 60 | |.endif |
| 61 | |.else // No TOC. | 61 | |.else // No TOC. |
| 62 | |.macro blex, target; bl extern target; .endmacro | 62 | |.macro blex, target; bl extern target@plt; .endmacro |
| 63 | |.macro .toc, a, b; .endmacro | 63 | |.macro .toc, a, b; .endmacro |
| 64 | |.endif | 64 | |.endif |
| 65 | |.macro .tocenv, a, b; .if TOCENV; a, b; .endif; .endmacro | 65 | |.macro .tocenv, a, b; .if TOCENV; a, b; .endif; .endmacro |
diff --git a/src/vm_ppcspe.dasc b/src/vm_ppcspe.dasc index b443f1b3..50139612 100644 --- a/src/vm_ppcspe.dasc +++ b/src/vm_ppcspe.dasc | |||
| @@ -1390,7 +1390,7 @@ static void build_subroutines(BuildCtx *ctx) | |||
| 1390 | | checknum CARG2 | 1390 | | checknum CARG2 |
| 1391 | | evmergehi CARG1, CARG2, CARG2 | 1391 | | evmergehi CARG1, CARG2, CARG2 |
| 1392 | | checkfail ->fff_fallback | 1392 | | checkfail ->fff_fallback |
| 1393 | | bl extern func | 1393 | | bl extern func@plt |
| 1394 | | evmergelo CRET1, CRET1, CRET2 | 1394 | | evmergelo CRET1, CRET1, CRET2 |
| 1395 | | b ->fff_restv | 1395 | | b ->fff_restv |
| 1396 | |.endmacro | 1396 | |.endmacro |
| @@ -1405,7 +1405,7 @@ static void build_subroutines(BuildCtx *ctx) | |||
| 1405 | | checknum CARG1 | 1405 | | checknum CARG1 |
| 1406 | | evmergehi CARG3, CARG4, CARG4 | 1406 | | evmergehi CARG3, CARG4, CARG4 |
| 1407 | | checkanyfail ->fff_fallback | 1407 | | checkanyfail ->fff_fallback |
| 1408 | | bl extern func | 1408 | | bl extern func@plt |
| 1409 | | evmergelo CRET1, CRET1, CRET2 | 1409 | | evmergelo CRET1, CRET1, CRET2 |
| 1410 | | b ->fff_restv | 1410 | | b ->fff_restv |
| 1411 | |.endmacro | 1411 | |.endmacro |
| @@ -1437,7 +1437,7 @@ static void build_subroutines(BuildCtx *ctx) | |||
| 1437 | | checknum CARG2 | 1437 | | checknum CARG2 |
| 1438 | | evmergehi CARG1, CARG2, CARG2 | 1438 | | evmergehi CARG1, CARG2, CARG2 |
| 1439 | | checkfail ->fff_fallback | 1439 | | checkfail ->fff_fallback |
| 1440 | | bl extern log | 1440 | | bl extern log@plt |
| 1441 | | evmergelo CRET1, CRET1, CRET2 | 1441 | | evmergelo CRET1, CRET1, CRET2 |
| 1442 | | b ->fff_restv | 1442 | | b ->fff_restv |
| 1443 | | | 1443 | | |
| @@ -1465,7 +1465,7 @@ static void build_subroutines(BuildCtx *ctx) | |||
| 1465 | | checknum CARG1 | 1465 | | checknum CARG1 |
| 1466 | | checkanyfail ->fff_fallback | 1466 | | checkanyfail ->fff_fallback |
| 1467 | | efdctsi CARG3, CARG4 | 1467 | | efdctsi CARG3, CARG4 |
| 1468 | | bl extern ldexp | 1468 | | bl extern ldexp@plt |
| 1469 | | evmergelo CRET1, CRET1, CRET2 | 1469 | | evmergelo CRET1, CRET1, CRET2 |
| 1470 | | b ->fff_restv | 1470 | | b ->fff_restv |
| 1471 | | | 1471 | | |
| @@ -1478,7 +1478,7 @@ static void build_subroutines(BuildCtx *ctx) | |||
| 1478 | | checkfail ->fff_fallback | 1478 | | checkfail ->fff_fallback |
| 1479 | | la CARG3, DISPATCH_GL(tmptv)(DISPATCH) | 1479 | | la CARG3, DISPATCH_GL(tmptv)(DISPATCH) |
| 1480 | | lwz PC, FRAME_PC(BASE) | 1480 | | lwz PC, FRAME_PC(BASE) |
| 1481 | | bl extern frexp | 1481 | | bl extern frexp@plt |
| 1482 | | lwz TMP1, DISPATCH_GL(tmptv)(DISPATCH) | 1482 | | lwz TMP1, DISPATCH_GL(tmptv)(DISPATCH) |
| 1483 | | evmergelo CRET1, CRET1, CRET2 | 1483 | | evmergelo CRET1, CRET1, CRET2 |
| 1484 | | efdcfsi CRET2, TMP1 | 1484 | | efdcfsi CRET2, TMP1 |
| @@ -1497,7 +1497,7 @@ static void build_subroutines(BuildCtx *ctx) | |||
| 1497 | | checkfail ->fff_fallback | 1497 | | checkfail ->fff_fallback |
| 1498 | | la CARG3, -8(BASE) | 1498 | | la CARG3, -8(BASE) |
| 1499 | | lwz PC, FRAME_PC(BASE) | 1499 | | lwz PC, FRAME_PC(BASE) |
| 1500 | | bl extern modf | 1500 | | bl extern modf@plt |
| 1501 | | evmergelo CRET1, CRET1, CRET2 | 1501 | | evmergelo CRET1, CRET1, CRET2 |
| 1502 | | la RA, -8(BASE) | 1502 | | la RA, -8(BASE) |
| 1503 | | evstdd CRET1, 0(BASE) | 1503 | | evstdd CRET1, 0(BASE) |
| @@ -2393,7 +2393,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) | |||
| 2393 | | checknum CARG1 | 2393 | | checknum CARG1 |
| 2394 | | evmergehi CARG3, CARG4, CARG4 | 2394 | | evmergehi CARG3, CARG4, CARG4 |
| 2395 | | checkanyfail ->vmeta_arith_vv | 2395 | | checkanyfail ->vmeta_arith_vv |
| 2396 | | bl extern pow | 2396 | | bl extern pow@plt |
| 2397 | | evmergelo CRET2, CRET1, CRET2 | 2397 | | evmergelo CRET2, CRET1, CRET2 |
| 2398 | | evstddx CRET2, BASE, RA | 2398 | | evstddx CRET2, BASE, RA |
| 2399 | | ins_next | 2399 | | ins_next |
