diff options
author | Mike Pall <mike> | 2012-06-10 01:38:44 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2012-06-10 02:01:25 +0200 |
commit | b8f5727ab4ab5656b19cdb2c71a92611836b5458 (patch) | |
tree | afff6234da61ae8d3a513359a68c88cdb7b6159c /src/host | |
parent | 37be8a54785b893f531679adb0b479a426938504 (diff) | |
download | luajit2-b8f5727ab4ab5656b19cdb2c71a92611836b5458.tar.gz |
CONSOLE: Fix PS3 build.
Diffstat (limited to 'src/host')
-rw-r--r-- | src/host/buildvm_asm.c | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/src/host/buildvm_asm.c b/src/host/buildvm_asm.c index f975eadc..5fc31287 100644 --- a/src/host/buildvm_asm.c +++ b/src/host/buildvm_asm.c @@ -141,6 +141,24 @@ static void emit_asm_label(BuildCtx *ctx, const char *name, int size, int isfunc { switch (ctx->mode) { case BUILD_elfasm: +#if LJ_TARGET_PS3 + if (!strncmp(name, "lj_vm_", 6)) { + fprintf(ctx->fp, + "\n\t.globl %s\n" + "\n\t.section \".opd\",\"aw\"\n" + "%s:\n" + "\t.long .%s,.TOC.@tocbase32\n" + "\t.size %s,8\n" + "\t.previous\n" + "\t.globl .%s\n" + "\t.hidden .%s\n" + "\t.type .%s, " ELFASM_PX "function\n" + "\t.size .%s, %d\n" + ".%s:\n", + name, name, name, name, name, name, name, name, size, name); + break; + } +#endif fprintf(ctx->fp, "\n\t.globl %s\n" "\t.hidden %s\n" @@ -196,7 +214,7 @@ void emit_asm(BuildCtx *ctx) if (ctx->mode != BUILD_machasm) fprintf(ctx->fp, ".Lbegin:\n"); -#if LJ_TARGET_ARM && defined(__GNUC__) && !defined(LUAJIT_NO_UNWIND) +#if LJ_TARGET_ARM && defined(__GNUC__) && !LJ_NO_UNWIND /* This should really be moved into buildvm_arm.dasc. */ fprintf(ctx->fp, ".fnstart\n" @@ -210,8 +228,7 @@ void emit_asm(BuildCtx *ctx) for (i = rel = 0; i < ctx->nsym; i++) { int32_t ofs = ctx->sym[i].ofs; int32_t next = ctx->sym[i+1].ofs; -#if LJ_TARGET_ARM && defined(__GNUC__) && !defined(LUAJIT_NO_UNWIND) && \ - LJ_HASFFI +#if LJ_TARGET_ARM && defined(__GNUC__) && !LJ_NO_UNWIND && LJ_HASFFI if (!strcmp(ctx->sym[i].name, "lj_vm_ffi_call")) fprintf(ctx->fp, ".globl lj_err_unwind_arm\n" @@ -246,7 +263,7 @@ void emit_asm(BuildCtx *ctx) #endif } -#if LJ_TARGET_ARM && defined(__GNUC__) && !defined(LUAJIT_NO_UNWIND) +#if LJ_TARGET_ARM && defined(__GNUC__) && !LJ_NO_UNWIND fprintf(ctx->fp, #if !LJ_HASFFI ".globl lj_err_unwind_arm\n" @@ -262,7 +279,7 @@ void emit_asm(BuildCtx *ctx) #if LJ_TARGET_PPCSPE /* Soft-float ABI + SPE. */ fprintf(ctx->fp, "\t.gnu_attribute 4, 2\n\t.gnu_attribute 8, 3\n"); -#elif LJ_TARGET_PPC +#elif LJ_TARGET_PPC && !LJ_TARGET_PS3 /* Hard-float ABI. */ fprintf(ctx->fp, "\t.gnu_attribute 4, 1\n"); #endif |