From 5aebf106e868c510b4aacdcd721b79d380f97e7d Mon Sep 17 00:00:00 2001 From: Stefan Date: Sun, 21 Sep 2025 12:21:27 +0200 Subject: [PATCH] i386-asm.c: Use NB_ASM_REGS instead of 8 For x86_64 there are more than just 8 registers. --- i386-asm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/i386-asm.c b/i386-asm.c index e3889dc9..9cb2e8d5 100644 --- a/i386-asm.c +++ b/i386-asm.c @@ -1416,7 +1416,7 @@ ST_FUNC void asm_compute_constraints(ASMOperand *operands, /* any general register */ if ((reg = op->reg) >= 0) goto reg_found; - else for(reg = 0; reg < 8; reg++) { + else for(reg = 0; reg < NB_ASM_REGS; reg++) { if (!is_reg_allocated(reg)) goto reg_found; } @@ -1451,7 +1451,7 @@ ST_FUNC void asm_compute_constraints(ASMOperand *operands, if (j < nb_outputs || c == 'm') { if ((op->vt->r & VT_VALMASK) == VT_LLOCAL) { /* any general register */ - for(reg = 0; reg < 8; reg++) { + for(reg = 0; reg < NB_ASM_REGS; reg++) { if (!(regs_allocated[reg] & REG_IN_MASK)) goto reg_found1; } @@ -1484,7 +1484,7 @@ ST_FUNC void asm_compute_constraints(ASMOperand *operands, if (op->reg >= 0 && (op->vt->r & VT_VALMASK) == VT_LLOCAL && !op->is_memory) { - for(reg = 0; reg < 8; reg++) { + for(reg = 0; reg < NB_ASM_REGS; reg++) { if (!(regs_allocated[reg] & REG_OUT_MASK)) goto reg_found2; }