Skip to content

Commit 5aebf10

Browse files
author
Stefan
committed
i386-asm.c: Use NB_ASM_REGS instead of 8
For x86_64 there are more than just 8 registers.
1 parent 9dc59f9 commit 5aebf10

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

i386-asm.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1416,7 +1416,7 @@ ST_FUNC void asm_compute_constraints(ASMOperand *operands,
14161416
/* any general register */
14171417
if ((reg = op->reg) >= 0)
14181418
goto reg_found;
1419-
else for(reg = 0; reg < 8; reg++) {
1419+
else for(reg = 0; reg < NB_ASM_REGS; reg++) {
14201420
if (!is_reg_allocated(reg))
14211421
goto reg_found;
14221422
}
@@ -1451,7 +1451,7 @@ ST_FUNC void asm_compute_constraints(ASMOperand *operands,
14511451
if (j < nb_outputs || c == 'm') {
14521452
if ((op->vt->r & VT_VALMASK) == VT_LLOCAL) {
14531453
/* any general register */
1454-
for(reg = 0; reg < 8; reg++) {
1454+
for(reg = 0; reg < NB_ASM_REGS; reg++) {
14551455
if (!(regs_allocated[reg] & REG_IN_MASK))
14561456
goto reg_found1;
14571457
}
@@ -1484,7 +1484,7 @@ ST_FUNC void asm_compute_constraints(ASMOperand *operands,
14841484
if (op->reg >= 0 &&
14851485
(op->vt->r & VT_VALMASK) == VT_LLOCAL &&
14861486
!op->is_memory) {
1487-
for(reg = 0; reg < 8; reg++) {
1487+
for(reg = 0; reg < NB_ASM_REGS; reg++) {
14881488
if (!(regs_allocated[reg] & REG_OUT_MASK))
14891489
goto reg_found2;
14901490
}

0 commit comments

Comments
 (0)