From 9b544c25efc6d3a3e9391ac7729813c1b7234070 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Sat, 12 Aug 2023 15:02:51 +0200 Subject: [PATCH] MIPS32: Declare that the assembler part uses the FR=0 model. Thanks to Peter Cawley. #1040 --- src/host/buildvm_asm.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/host/buildvm_asm.c b/src/host/buildvm_asm.c index 7baa011f..54e92cab 100644 --- a/src/host/buildvm_asm.c +++ b/src/host/buildvm_asm.c @@ -243,6 +243,12 @@ void emit_asm(BuildCtx *ctx) fprintf(ctx->fp, "\t.file \"buildvm_%s.dasc\"\n", ctx->dasm_arch); fprintf(ctx->fp, "\t.text\n"); +#if LJ_TARGET_MIPS32 && !LJ_ABI_SOFTFP + fprintf(ctx->fp, "\t.module fp=32\n"); +#endif +#if LJ_TARGET_MIPS + fprintf(ctx->fp, "\t.set nomips16\n\t.abicalls\n\t.set noreorder\n\t.set nomacro\n"); +#endif emit_asm_align(ctx, 4); #if LJ_TARGET_PS3 @@ -268,9 +274,6 @@ void emit_asm(BuildCtx *ctx) ".save {r4, r5, r6, r7, r8, r9, r10, r11, lr}\n" ".pad #28\n"); #endif -#endif -#if LJ_TARGET_MIPS - fprintf(ctx->fp, ".set nomips16\n.abicalls\n.set noreorder\n.set nomacro\n"); #endif for (i = rel = 0; i < ctx->nsym; i++) {