mirror of
git://repo.or.cz/tinycc.git
synced 2026-06-30 08:38:41 +08:00
i386-asm.c: Use NB_ASM_REGS instead of 8
For x86_64 there are more than just 8 registers.
This commit is contained in:
parent
9dc59f9c23
commit
5aebf106e8
@ -1416,7 +1416,7 @@ ST_FUNC void asm_compute_constraints(ASMOperand *operands,
|
|||||||
/* any general register */
|
/* any general register */
|
||||||
if ((reg = op->reg) >= 0)
|
if ((reg = op->reg) >= 0)
|
||||||
goto reg_found;
|
goto reg_found;
|
||||||
else for(reg = 0; reg < 8; reg++) {
|
else for(reg = 0; reg < NB_ASM_REGS; reg++) {
|
||||||
if (!is_reg_allocated(reg))
|
if (!is_reg_allocated(reg))
|
||||||
goto reg_found;
|
goto reg_found;
|
||||||
}
|
}
|
||||||
@ -1451,7 +1451,7 @@ ST_FUNC void asm_compute_constraints(ASMOperand *operands,
|
|||||||
if (j < nb_outputs || c == 'm') {
|
if (j < nb_outputs || c == 'm') {
|
||||||
if ((op->vt->r & VT_VALMASK) == VT_LLOCAL) {
|
if ((op->vt->r & VT_VALMASK) == VT_LLOCAL) {
|
||||||
/* any general register */
|
/* any general register */
|
||||||
for(reg = 0; reg < 8; reg++) {
|
for(reg = 0; reg < NB_ASM_REGS; reg++) {
|
||||||
if (!(regs_allocated[reg] & REG_IN_MASK))
|
if (!(regs_allocated[reg] & REG_IN_MASK))
|
||||||
goto reg_found1;
|
goto reg_found1;
|
||||||
}
|
}
|
||||||
@ -1484,7 +1484,7 @@ ST_FUNC void asm_compute_constraints(ASMOperand *operands,
|
|||||||
if (op->reg >= 0 &&
|
if (op->reg >= 0 &&
|
||||||
(op->vt->r & VT_VALMASK) == VT_LLOCAL &&
|
(op->vt->r & VT_VALMASK) == VT_LLOCAL &&
|
||||||
!op->is_memory) {
|
!op->is_memory) {
|
||||||
for(reg = 0; reg < 8; reg++) {
|
for(reg = 0; reg < NB_ASM_REGS; reg++) {
|
||||||
if (!(regs_allocated[reg] & REG_OUT_MASK))
|
if (!(regs_allocated[reg] & REG_OUT_MASK))
|
||||||
goto reg_found2;
|
goto reg_found2;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user