]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Fix PS3 build.
authorMike Pall <mike>
Fri, 11 Jan 2013 11:19:53 +0000 (12:19 +0100)
committerMike Pall <mike>
Fri, 11 Jan 2013 11:19:53 +0000 (12:19 +0100)
src/host/buildvm_asm.c
src/lj_arch.h

index 08264c8b5462c948e07bb718536e81c014c138f6..2f589aad8157737460ebcc013c89769807bdf89c 100644 (file)
@@ -147,10 +147,12 @@ 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)) {
+    if (!strncmp(name, "lj_vm_", 6) &&
+       strcmp(name, ctx->beginsym) &&
+       !strstr(name, "hook")) {
       fprintf(ctx->fp,
        "\n\t.globl %s\n"
-       "\n\t.section \".opd\",\"aw\"\n"
+       "\t.section \".opd\",\"aw\"\n"
        "%s:\n"
        "\t.long .%s,.TOC.@tocbase32\n"
        "\t.size %s,8\n"
@@ -215,7 +217,11 @@ void emit_asm(BuildCtx *ctx)
   fprintf(ctx->fp, "\t.text\n");
   emit_asm_align(ctx, 4);
 
+#if LJ_TARGET_PS3
+  emit_asm_label(ctx, ctx->beginsym, ctx->codesz, 0);
+#else
   emit_asm_label(ctx, ctx->beginsym, 0, 0);
+#endif
   if (ctx->mode != BUILD_machasm)
     fprintf(ctx->fp, ".Lbegin:\n");
 
index f59b3447485d33cf9c6d4e87d56cfb0e269560ea..960998abc61c8a39aa011c8aaca6edddd136424a 100644 (file)
 #else
 #define LJ_ARCH_VERSION                0
 #endif
-#if __PPC64__ || __powerpc64__ || LJ_TARGET_XBOX360
+#if __PPC64__ || __powerpc64__ || LJ_TARGET_CONSOLE
 #define LJ_ARCH_PPC64          1
 #define LJ_ARCH_NOFFI          1
 #endif