Skip to content

Commit 981ec8d

Browse files
author
Mike Pall
committed
Remove support for de-facto dead archs.
1 parent 9749952 commit 981ec8d

File tree

5 files changed

+3
-33
lines changed

5 files changed

+3
-33
lines changed

src/Makefile

-3
Original file line numberDiff line numberDiff line change
@@ -461,9 +461,6 @@ ifeq (ppc,$(TARGET_LJARCH))
461461
ifeq (PS3,$(TARGET_SYS))
462462
DASM_AFLAGS+= -D PPE -D TOC
463463
endif
464-
ifneq (,$(findstring LJ_ARCH_PPC64 ,$(TARGET_TESTARCH)))
465-
DASM_ARCH= ppc64
466-
endif
467464
endif
468465
endif
469466
endif

src/host/buildvm_asm.c

-11
Original file line numberDiff line numberDiff line change
@@ -144,14 +144,6 @@ static void emit_asm_wordreloc(BuildCtx *ctx, uint8_t *p, int n,
144144
fprintf(ctx->fp, "\t%s %d, %d, " TOCPREFIX "%s\n",
145145
(ins & 1) ? "bcl" : "bc", (ins >> 21) & 31, (ins >> 16) & 31, sym);
146146
} 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
155147
fprintf(ctx->fp, "\t%s " TOCPREFIX "%s\n", (ins & 1) ? "bl" : "b", sym);
156148
} else {
157149
fprintf(stderr,
@@ -250,9 +242,6 @@ void emit_asm(BuildCtx *ctx)
250242
int i, rel;
251243

252244
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
256245
fprintf(ctx->fp, "\t.text\n");
257246
emit_asm_align(ctx, 4);
258247

src/host/buildvm_peobj.c

+1-14
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include "buildvm.h"
1010
#include "lj_bc.h"
1111

12-
#if LJ_TARGET_X86ORX64 || LJ_TARGET_PPC
12+
#if LJ_TARGET_X86ORX64
1313

1414
/* Context for PE object emitter. */
1515
static char *strtab;
@@ -93,12 +93,6 @@ typedef struct PEsymaux {
9393
#define PEOBJ_RELOC_ADDR32NB 0x03
9494
#define PEOBJ_RELOC_OFS 0
9595
#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. */
10296
#endif
10397

10498
/* Section numbers (0-based). */
@@ -251,15 +245,8 @@ void emit_peobj(BuildCtx *ctx)
251245
/* Write .text section. */
252246
host_endian.u = 1;
253247
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
260248
fprintf(stderr, "Error: different byte order for host and target\n");
261249
exit(1);
262-
#endif
263250
}
264251
owrite(ctx, ctx->code, ctx->codesz);
265252
for (i = 0; i < ctx->nreloc; i++) {

src/lj_arch.h

+2-4
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,7 @@
296296
#define LJ_ARCH_PPC32ON64 1
297297
#define LJ_ARCH_NOFFI 1
298298
#elif LJ_ARCH_BITS == 64
299-
#define LJ_ARCH_PPC64 1
300-
#define LJ_TARGET_GC64 1
301-
#define LJ_ARCH_NOJIT 1 /* NYI */
299+
#error "No support for PPC64"
302300
#endif
303301

304302
#if _ARCH_PWR7
@@ -465,7 +463,7 @@
465463
#error "No support for ILP32 model on ARM64"
466464
#endif
467465
#elif LJ_TARGET_PPC
468-
#if !LJ_ARCH_PPC64 && (defined(_LITTLE_ENDIAN) && (!defined(_BYTE_ORDER) || (_BYTE_ORDER == _LITTLE_ENDIAN)))
466+
#if defined(_LITTLE_ENDIAN) && (!defined(_BYTE_ORDER) || (_BYTE_ORDER == _LITTLE_ENDIAN))
469467
#error "No support for little-endian PPC32"
470468
#endif
471469
#if defined(__NO_FPRS__) && !defined(_SOFT_FLOAT)

src/vm_ppc.dasc

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
|// DynASM defines used by the PPC port:
1919
|//
2020
|// P64 64 bit pointers (only for GPR64 testing).
21-
|// Note: see vm_ppc64.dasc for a full PPC64 _LP64 port.
2221
|// GPR64 64 bit registers (but possibly 32 bit pointers, e.g. PS3).
2322
|// Affects reg saves, stack layout, carry/overflow/dot flags etc.
2423
|// FRAME32 Use 32 bit frame layout, even with GPR64 (Xbox 360).

0 commit comments

Comments
 (0)