In coercions, try to reuse a register with the same token.

This reduces code size.
This commit is contained in:
George Koehler 2017-12-17 12:45:27 -05:00
parent b0d75fed37
commit d8fa9d1b2a

View file

@ -723,11 +723,13 @@ COERCIONS
addi sp, sp, {C, 4}
yields %a
/* "uses REG=%1" may find and reuse a register containing the
* same token. For contrast, "uses REG gen move %1, %a" would
* pick a different register before doing the move.
*/
from INT_W
uses REG
gen
COMMENT("coerce INT_W->REG")
move %1, %a
uses REG=%1
yields %a
/*
@ -741,17 +743,11 @@ COERCIONS
*/
from FLOAT_D
uses FREG
gen
COMMENT("coerce FLOAT_D->FREG")
move %1, %a
uses FREG=%1
yields %a
from FLOAT_W
uses FSREG
gen
COMMENT("coerce FLOAT_W->FREG")
move %1, %a
uses FSREG=%1
yields %a