From d8fa9d1b2aa5e2387b0e12dc6babf4efa4344c54 Mon Sep 17 00:00:00 2001 From: George Koehler Date: Sun, 17 Dec 2017 12:45:27 -0500 Subject: [PATCH] In coercions, try to reuse a register with the same token. This reduces code size. --- mach/powerpc/ncg/table | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/mach/powerpc/ncg/table b/mach/powerpc/ncg/table index ae1620cfd..3611a1809 100644 --- a/mach/powerpc/ncg/table +++ b/mach/powerpc/ncg/table @@ -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