diff options
author | Mike Pall <mike> | 2013-01-11 12:19:53 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2013-01-11 12:19:53 +0100 |
commit | e434ab505e52cc2cb4ae13b79e7bdf03014cfad7 (patch) | |
tree | cda4424d4774f37a24189ffea4488e4ba5ac3df7 /src/host/buildvm_asm.c | |
parent | f22d5d9eef7e0904d0fdfc517759037e04923fed (diff) | |
download | luajit-e434ab505e52cc2cb4ae13b79e7bdf03014cfad7.tar.gz luajit-e434ab505e52cc2cb4ae13b79e7bdf03014cfad7.tar.bz2 luajit-e434ab505e52cc2cb4ae13b79e7bdf03014cfad7.zip |
Fix PS3 build.
Diffstat (limited to 'src/host/buildvm_asm.c')
-rw-r--r-- | src/host/buildvm_asm.c | 10 |
1 files changed, 8 insertions, 2 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 | ||