diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/host/buildvm_asm.c | 10 | ||||
| -rw-r--r-- | src/lj_arch.h | 2 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/host/buildvm_asm.c b/src/host/buildvm_asm.c index 08264c8b..2f589aad 100644 --- a/src/host/buildvm_asm.c +++ b/src/host/buildvm_asm.c | |||
| @@ -147,10 +147,12 @@ static void emit_asm_label(BuildCtx *ctx, const char *name, int size, int isfunc | |||
| 147 | switch (ctx->mode) { | 147 | switch (ctx->mode) { |
| 148 | case BUILD_elfasm: | 148 | case BUILD_elfasm: |
| 149 | #if LJ_TARGET_PS3 | 149 | #if LJ_TARGET_PS3 |
| 150 | if (!strncmp(name, "lj_vm_", 6)) { | 150 | if (!strncmp(name, "lj_vm_", 6) && |
| 151 | strcmp(name, ctx->beginsym) && | ||
| 152 | !strstr(name, "hook")) { | ||
| 151 | fprintf(ctx->fp, | 153 | fprintf(ctx->fp, |
| 152 | "\n\t.globl %s\n" | 154 | "\n\t.globl %s\n" |
| 153 | "\n\t.section \".opd\",\"aw\"\n" | 155 | "\t.section \".opd\",\"aw\"\n" |
| 154 | "%s:\n" | 156 | "%s:\n" |
| 155 | "\t.long .%s,.TOC.@tocbase32\n" | 157 | "\t.long .%s,.TOC.@tocbase32\n" |
| 156 | "\t.size %s,8\n" | 158 | "\t.size %s,8\n" |
| @@ -215,7 +217,11 @@ void emit_asm(BuildCtx *ctx) | |||
| 215 | fprintf(ctx->fp, "\t.text\n"); | 217 | fprintf(ctx->fp, "\t.text\n"); |
| 216 | emit_asm_align(ctx, 4); | 218 | emit_asm_align(ctx, 4); |
| 217 | 219 | ||
| 220 | #if LJ_TARGET_PS3 | ||
| 221 | emit_asm_label(ctx, ctx->beginsym, ctx->codesz, 0); | ||
| 222 | #else | ||
| 218 | emit_asm_label(ctx, ctx->beginsym, 0, 0); | 223 | emit_asm_label(ctx, ctx->beginsym, 0, 0); |
| 224 | #endif | ||
| 219 | if (ctx->mode != BUILD_machasm) | 225 | if (ctx->mode != BUILD_machasm) |
| 220 | fprintf(ctx->fp, ".Lbegin:\n"); | 226 | fprintf(ctx->fp, ".Lbegin:\n"); |
| 221 | 227 | ||
diff --git a/src/lj_arch.h b/src/lj_arch.h index f59b3447..960998ab 100644 --- a/src/lj_arch.h +++ b/src/lj_arch.h | |||
| @@ -209,7 +209,7 @@ | |||
| 209 | #else | 209 | #else |
| 210 | #define LJ_ARCH_VERSION 0 | 210 | #define LJ_ARCH_VERSION 0 |
| 211 | #endif | 211 | #endif |
| 212 | #if __PPC64__ || __powerpc64__ || LJ_TARGET_XBOX360 | 212 | #if __PPC64__ || __powerpc64__ || LJ_TARGET_CONSOLE |
| 213 | #define LJ_ARCH_PPC64 1 | 213 | #define LJ_ARCH_PPC64 1 |
| 214 | #define LJ_ARCH_NOFFI 1 | 214 | #define LJ_ARCH_NOFFI 1 |
| 215 | #endif | 215 | #endif |
