diff options
author | Mike Pall <mike> | 2012-06-13 02:32:24 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2012-06-13 02:32:24 +0200 |
commit | ca6bf2d9a41fb2c0c80bafdbaf2e29421b2cb55d (patch) | |
tree | 2489b763b62323fe844789f611325528c1806e82 /src/host | |
parent | 4f9db0fbc3368a7f78370c33740e34cb1d391383 (diff) | |
download | luajit-ca6bf2d9a41fb2c0c80bafdbaf2e29421b2cb55d.tar.gz luajit-ca6bf2d9a41fb2c0c80bafdbaf2e29421b2cb55d.tar.bz2 luajit-ca6bf2d9a41fb2c0c80bafdbaf2e29421b2cb55d.zip |
CONSOLE: Handle P64, GPR64, TOC* and PPE (PS3) in PPC interpreter.
PS3 build command: make HOST_CC="gcc -m32" CROSS=ppu-lv2-
Diffstat (limited to 'src/host')
-rw-r--r-- | src/host/buildvm_asm.c | 9 |
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", |