aboutsummaryrefslogtreecommitdiff
path: root/src/host
diff options
context:
space:
mode:
Diffstat (limited to 'src/host')
-rw-r--r--src/host/buildvm_asm.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/host/buildvm_asm.c b/src/host/buildvm_asm.c
index 992c3509..08264c8b 100644
--- a/src/host/buildvm_asm.c
+++ b/src/host/buildvm_asm.c
@@ -108,11 +108,16 @@ static void emit_asm_wordreloc(BuildCtx *ctx, uint8_t *p, int n,
108 exit(1); 108 exit(1);
109 } 109 }
110#elif LJ_TARGET_PPC || LJ_TARGET_PPCSPE 110#elif LJ_TARGET_PPC || LJ_TARGET_PPCSPE
111#if LJ_TARGET_PS3
112#define TOCPREFIX "."
113#else
114#define TOCPREFIX ""
115#endif
111 if ((ins >> 26) == 16) { 116 if ((ins >> 26) == 16) {
112 fprintf(ctx->fp, "\t%s %d, %d, %s\n", 117 fprintf(ctx->fp, "\t%s %d, %d, " TOCPREFIX "%s\n",
113 (ins & 1) ? "bcl" : "bc", (ins >> 21) & 31, (ins >> 16) & 31, sym); 118 (ins & 1) ? "bcl" : "bc", (ins >> 21) & 31, (ins >> 16) & 31, sym);
114 } else if ((ins >> 26) == 18) { 119 } else if ((ins >> 26) == 18) {
115 fprintf(ctx->fp, "\t%s %s\n", (ins & 1) ? "bl" : "b", sym); 120 fprintf(ctx->fp, "\t%s " TOCPREFIX "%s\n", (ins & 1) ? "bl" : "b", sym);
116 } else { 121 } else {
117 fprintf(stderr, 122 fprintf(stderr,
118 "Error: unsupported opcode %08x for %s symbol relocation.\n", 123 "Error: unsupported opcode %08x for %s symbol relocation.\n",