History

i386-asm.c: Use NB_ASM_REGS instead of 8

For x86_64 there are more than just 8 registers.

Stefan committed 1 year ago

Commit 5aebf101 parent 9dc59f91 file · +3 −3Browse files

Unified · Split

i386-asm.c+3−3
@@ -1416,7 +1416,7 @@ ST_FUNC void asm_compute_constraints(ASMOperand *operands, · 1415 unmodified lines
1416 /* any general register */1416 /* any general register */
1417 if ((reg = op->reg) >= 0)1417 if ((reg = op->reg) >= 0)
1418 goto reg_found;1418 goto reg_found;
1419 else for(reg = 0; reg < 8; reg++) {1419 else for(reg = 0; reg < NB_ASM_REGS; reg++) {
1420 if (!is_reg_allocated(reg))1420 if (!is_reg_allocated(reg))
1421 goto reg_found;1421 goto reg_found;
1422 }1422 }
@@ -1451,7 +1451,7 @@ ST_FUNC void asm_compute_constraints(ASMOperand *operands, · 28 unmodified lines
1451 if (j < nb_outputs || c == 'm') {1451 if (j < nb_outputs || c == 'm') {
1452 if ((op->vt->r & VT_VALMASK) == VT_LLOCAL) {1452 if ((op->vt->r & VT_VALMASK) == VT_LLOCAL) {
1453 /* any general register */1453 /* any general register */
1454 for(reg = 0; reg < 8; reg++) {1454 for(reg = 0; reg < NB_ASM_REGS; reg++) {
1455 if (!(regs_allocated[reg] & REG_IN_MASK))1455 if (!(regs_allocated[reg] & REG_IN_MASK))
1456 goto reg_found1;1456 goto reg_found1;
1457 }1457 }
@@ -1484,7 +1484,7 @@ ST_FUNC void asm_compute_constraints(ASMOperand *operands, · 26 unmodified lines
1484 if (op->reg >= 0 &&1484 if (op->reg >= 0 &&
1485 (op->vt->r & VT_VALMASK) == VT_LLOCAL &&1485 (op->vt->r & VT_VALMASK) == VT_LLOCAL &&
1486 !op->is_memory) {1486 !op->is_memory) {
1487 for(reg = 0; reg < 8; reg++) {1487 for(reg = 0; reg < NB_ASM_REGS; reg++) {
1488 if (!(regs_allocated[reg] & REG_OUT_MASK))1488 if (!(regs_allocated[reg] & REG_OUT_MASK))
1489 goto reg_found2;1489 goto reg_found2;
1490 }1490 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t