diff options
author | Mike Pall <mike> | 2020-01-20 22:56:47 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2020-01-20 22:56:47 +0100 |
commit | 981ec8d2aac5cac76bdedd4015b6d32447b29597 (patch) | |
tree | 4af0d16247b1c0fb00dceb42dcae098aafd7140e /src/host | |
parent | 9749952b55d2003de012c6b0aa6507c06eb320b8 (diff) | |
download | luajit-981ec8d2aac5cac76bdedd4015b6d32447b29597.tar.gz luajit-981ec8d2aac5cac76bdedd4015b6d32447b29597.tar.bz2 luajit-981ec8d2aac5cac76bdedd4015b6d32447b29597.zip |
Remove support for de-facto dead archs.
Diffstat (limited to 'src/host')
-rw-r--r-- | src/host/buildvm_asm.c | 11 | ||||
-rw-r--r-- | src/host/buildvm_peobj.c | 15 |
2 files changed, 1 insertions, 25 deletions
diff --git a/src/host/buildvm_asm.c b/src/host/buildvm_asm.c index 43595b31..85ce79f9 100644 --- a/src/host/buildvm_asm.c +++ b/src/host/buildvm_asm.c | |||
@@ -144,14 +144,6 @@ static void emit_asm_wordreloc(BuildCtx *ctx, uint8_t *p, int n, | |||
144 | fprintf(ctx->fp, "\t%s %d, %d, " TOCPREFIX "%s\n", | 144 | fprintf(ctx->fp, "\t%s %d, %d, " TOCPREFIX "%s\n", |
145 | (ins & 1) ? "bcl" : "bc", (ins >> 21) & 31, (ins >> 16) & 31, sym); | 145 | (ins & 1) ? "bcl" : "bc", (ins >> 21) & 31, (ins >> 16) & 31, sym); |
146 | } else if ((ins >> 26) == 18) { | 146 | } else if ((ins >> 26) == 18) { |
147 | #if LJ_ARCH_PPC64 | ||
148 | const char *suffix = strchr(sym, '@'); | ||
149 | if (suffix && suffix[1] == 'h') { | ||
150 | fprintf(ctx->fp, "\taddis 11, 2, %s\n", sym); | ||
151 | } else if (suffix && suffix[1] == 'l') { | ||
152 | fprintf(ctx->fp, "\tld 12, %s\n", sym); | ||
153 | } else | ||
154 | #endif | ||
155 | fprintf(ctx->fp, "\t%s " TOCPREFIX "%s\n", (ins & 1) ? "bl" : "b", sym); | 147 | fprintf(ctx->fp, "\t%s " TOCPREFIX "%s\n", (ins & 1) ? "bl" : "b", sym); |
156 | } else { | 148 | } else { |
157 | fprintf(stderr, | 149 | fprintf(stderr, |
@@ -250,9 +242,6 @@ void emit_asm(BuildCtx *ctx) | |||
250 | int i, rel; | 242 | int i, rel; |
251 | 243 | ||
252 | fprintf(ctx->fp, "\t.file \"buildvm_%s.dasc\"\n", ctx->dasm_arch); | 244 | fprintf(ctx->fp, "\t.file \"buildvm_%s.dasc\"\n", ctx->dasm_arch); |
253 | #if LJ_ARCH_PPC64 | ||
254 | fprintf(ctx->fp, "\t.abiversion 2\n"); | ||
255 | #endif | ||
256 | fprintf(ctx->fp, "\t.text\n"); | 245 | fprintf(ctx->fp, "\t.text\n"); |
257 | emit_asm_align(ctx, 4); | 246 | emit_asm_align(ctx, 4); |
258 | 247 | ||
diff --git a/src/host/buildvm_peobj.c b/src/host/buildvm_peobj.c index 2eb2bb7b..280ea8d2 100644 --- a/src/host/buildvm_peobj.c +++ b/src/host/buildvm_peobj.c | |||
@@ -9,7 +9,7 @@ | |||
9 | #include "buildvm.h" | 9 | #include "buildvm.h" |
10 | #include "lj_bc.h" | 10 | #include "lj_bc.h" |
11 | 11 | ||
12 | #if LJ_TARGET_X86ORX64 || LJ_TARGET_PPC | 12 | #if LJ_TARGET_X86ORX64 |
13 | 13 | ||
14 | /* Context for PE object emitter. */ | 14 | /* Context for PE object emitter. */ |
15 | static char *strtab; | 15 | static char *strtab; |
@@ -93,12 +93,6 @@ typedef struct PEsymaux { | |||
93 | #define PEOBJ_RELOC_ADDR32NB 0x03 | 93 | #define PEOBJ_RELOC_ADDR32NB 0x03 |
94 | #define PEOBJ_RELOC_OFS 0 | 94 | #define PEOBJ_RELOC_OFS 0 |
95 | #define PEOBJ_TEXT_FLAGS 0x60500020 /* 60=r+x, 50=align16, 20=code. */ | 95 | #define PEOBJ_TEXT_FLAGS 0x60500020 /* 60=r+x, 50=align16, 20=code. */ |
96 | #elif LJ_TARGET_PPC | ||
97 | #define PEOBJ_ARCH_TARGET 0x01f2 | ||
98 | #define PEOBJ_RELOC_REL32 0x06 | ||
99 | #define PEOBJ_RELOC_DIR32 0x02 | ||
100 | #define PEOBJ_RELOC_OFS (-4) | ||
101 | #define PEOBJ_TEXT_FLAGS 0x60400020 /* 60=r+x, 40=align8, 20=code. */ | ||
102 | #endif | 96 | #endif |
103 | 97 | ||
104 | /* Section numbers (0-based). */ | 98 | /* Section numbers (0-based). */ |
@@ -251,15 +245,8 @@ void emit_peobj(BuildCtx *ctx) | |||
251 | /* Write .text section. */ | 245 | /* Write .text section. */ |
252 | host_endian.u = 1; | 246 | host_endian.u = 1; |
253 | if (host_endian.b != LJ_ENDIAN_SELECT(1, 0)) { | 247 | if (host_endian.b != LJ_ENDIAN_SELECT(1, 0)) { |
254 | #if LJ_TARGET_PPC | ||
255 | uint32_t *p = (uint32_t *)ctx->code; | ||
256 | int n = (int)(ctx->codesz >> 2); | ||
257 | for (i = 0; i < n; i++, p++) | ||
258 | *p = lj_bswap(*p); /* Byteswap .text section. */ | ||
259 | #else | ||
260 | fprintf(stderr, "Error: different byte order for host and target\n"); | 248 | fprintf(stderr, "Error: different byte order for host and target\n"); |
261 | exit(1); | 249 | exit(1); |
262 | #endif | ||
263 | } | 250 | } |
264 | owrite(ctx, ctx->code, ctx->codesz); | 251 | owrite(ctx, ctx->code, ctx->codesz); |
265 | for (i = 0; i < ctx->nreloc; i++) { | 252 | for (i = 0; i < ctx->nreloc; i++) { |