From ca6bf2d9a41fb2c0c80bafdbaf2e29421b2cb55d Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Wed, 13 Jun 2012 02:32:24 +0200 Subject: CONSOLE: Handle P64, GPR64, TOC* and PPE (PS3) in PPC interpreter. PS3 build command: make HOST_CC="gcc -m32" CROSS=ppu-lv2- --- src/host/buildvm_asm.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/host/buildvm_asm.c') 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, exit(1); } #elif LJ_TARGET_PPC || LJ_TARGET_PPCSPE +#if LJ_TARGET_PS3 +#define TOCPREFIX "." +#else +#define TOCPREFIX "" +#endif if ((ins >> 26) == 16) { - fprintf(ctx->fp, "\t%s %d, %d, %s\n", + fprintf(ctx->fp, "\t%s %d, %d, " TOCPREFIX "%s\n", (ins & 1) ? "bcl" : "bc", (ins >> 21) & 31, (ins >> 16) & 31, sym); } else if ((ins >> 26) == 18) { - fprintf(ctx->fp, "\t%s %s\n", (ins & 1) ? "bl" : "b", sym); + fprintf(ctx->fp, "\t%s " TOCPREFIX "%s\n", (ins & 1) ? "bl" : "b", sym); } else { fprintf(stderr, "Error: unsupported opcode %08x for %s symbol relocation.\n", -- cgit v1.2.3-55-g6feb