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
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, · 28 unmodified lines
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, · 26 unmodified lines
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 }

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