Remove support for de-facto dead archs.

This commit is contained in:
Mike Pall 2020-01-20 22:56:47 +01:00
parent 9749952b55
commit 981ec8d2aa
5 changed files with 3 additions and 33 deletions

View File

@ -461,9 +461,6 @@ ifeq (ppc,$(TARGET_LJARCH))
ifeq (PS3,$(TARGET_SYS)) ifeq (PS3,$(TARGET_SYS))
DASM_AFLAGS+= -D PPE -D TOC DASM_AFLAGS+= -D PPE -D TOC
endif endif
ifneq (,$(findstring LJ_ARCH_PPC64 ,$(TARGET_TESTARCH)))
DASM_ARCH= ppc64
endif
endif endif
endif endif
endif endif

View File

@ -144,14 +144,6 @@ static void emit_asm_wordreloc(BuildCtx *ctx, uint8_t *p, int n,
fprintf(ctx->fp, "\t%s %d, %d, " TOCPREFIX "%s\n", fprintf(ctx->fp, "\t%s %d, %d, " TOCPREFIX "%s\n",
(ins & 1) ? "bcl" : "bc", (ins >> 21) & 31, (ins >> 16) & 31, sym); (ins & 1) ? "bcl" : "bc", (ins >> 21) & 31, (ins >> 16) & 31, sym);
} else if ((ins >> 26) == 18) { } else if ((ins >> 26) == 18) {
#if LJ_ARCH_PPC64
const char *suffix = strchr(sym, '@');
if (suffix && suffix[1] == 'h') {
fprintf(ctx->fp, "\taddis 11, 2, %s\n", sym);
} else if (suffix && suffix[1] == 'l') {
fprintf(ctx->fp, "\tld 12, %s\n", sym);
} else
#endif
fprintf(ctx->fp, "\t%s " TOCPREFIX "%s\n", (ins & 1) ? "bl" : "b", sym); fprintf(ctx->fp, "\t%s " TOCPREFIX "%s\n", (ins & 1) ? "bl" : "b", sym);
} else { } else {
fprintf(stderr, fprintf(stderr,
@ -250,9 +242,6 @@ void emit_asm(BuildCtx *ctx)
int i, rel; int i, rel;
fprintf(ctx->fp, "\t.file \"buildvm_%s.dasc\"\n", ctx->dasm_arch); fprintf(ctx->fp, "\t.file \"buildvm_%s.dasc\"\n", ctx->dasm_arch);
#if LJ_ARCH_PPC64
fprintf(ctx->fp, "\t.abiversion 2\n");
#endif
fprintf(ctx->fp, "\t.text\n"); fprintf(ctx->fp, "\t.text\n");
emit_asm_align(ctx, 4); emit_asm_align(ctx, 4);

View File

@ -9,7 +9,7 @@
#include "buildvm.h" #include "buildvm.h"
#include "lj_bc.h" #include "lj_bc.h"
#if LJ_TARGET_X86ORX64 || LJ_TARGET_PPC #if LJ_TARGET_X86ORX64
/* Context for PE object emitter. */ /* Context for PE object emitter. */
static char *strtab; static char *strtab;
@ -93,12 +93,6 @@ typedef struct PEsymaux {
#define PEOBJ_RELOC_ADDR32NB 0x03 #define PEOBJ_RELOC_ADDR32NB 0x03
#define PEOBJ_RELOC_OFS 0 #define PEOBJ_RELOC_OFS 0
#define PEOBJ_TEXT_FLAGS 0x60500020 /* 60=r+x, 50=align16, 20=code. */ #define PEOBJ_TEXT_FLAGS 0x60500020 /* 60=r+x, 50=align16, 20=code. */
#elif LJ_TARGET_PPC
#define PEOBJ_ARCH_TARGET 0x01f2
#define PEOBJ_RELOC_REL32 0x06
#define PEOBJ_RELOC_DIR32 0x02
#define PEOBJ_RELOC_OFS (-4)
#define PEOBJ_TEXT_FLAGS 0x60400020 /* 60=r+x, 40=align8, 20=code. */
#endif #endif
/* Section numbers (0-based). */ /* Section numbers (0-based). */
@ -251,15 +245,8 @@ void emit_peobj(BuildCtx *ctx)
/* Write .text section. */ /* Write .text section. */
host_endian.u = 1; host_endian.u = 1;
if (host_endian.b != LJ_ENDIAN_SELECT(1, 0)) { if (host_endian.b != LJ_ENDIAN_SELECT(1, 0)) {
#if LJ_TARGET_PPC
uint32_t *p = (uint32_t *)ctx->code;
int n = (int)(ctx->codesz >> 2);
for (i = 0; i < n; i++, p++)
*p = lj_bswap(*p); /* Byteswap .text section. */
#else
fprintf(stderr, "Error: different byte order for host and target\n"); fprintf(stderr, "Error: different byte order for host and target\n");
exit(1); exit(1);
#endif
} }
owrite(ctx, ctx->code, ctx->codesz); owrite(ctx, ctx->code, ctx->codesz);
for (i = 0; i < ctx->nreloc; i++) { for (i = 0; i < ctx->nreloc; i++) {

View File

@ -296,9 +296,7 @@
#define LJ_ARCH_PPC32ON64 1 #define LJ_ARCH_PPC32ON64 1
#define LJ_ARCH_NOFFI 1 #define LJ_ARCH_NOFFI 1
#elif LJ_ARCH_BITS == 64 #elif LJ_ARCH_BITS == 64
#define LJ_ARCH_PPC64 1 #error "No support for PPC64"
#define LJ_TARGET_GC64 1
#define LJ_ARCH_NOJIT 1 /* NYI */
#endif #endif
#if _ARCH_PWR7 #if _ARCH_PWR7
@ -465,7 +463,7 @@
#error "No support for ILP32 model on ARM64" #error "No support for ILP32 model on ARM64"
#endif #endif
#elif LJ_TARGET_PPC #elif LJ_TARGET_PPC
#if !LJ_ARCH_PPC64 && (defined(_LITTLE_ENDIAN) && (!defined(_BYTE_ORDER) || (_BYTE_ORDER == _LITTLE_ENDIAN))) #if defined(_LITTLE_ENDIAN) && (!defined(_BYTE_ORDER) || (_BYTE_ORDER == _LITTLE_ENDIAN))
#error "No support for little-endian PPC32" #error "No support for little-endian PPC32"
#endif #endif
#if defined(__NO_FPRS__) && !defined(_SOFT_FLOAT) #if defined(__NO_FPRS__) && !defined(_SOFT_FLOAT)

View File

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