diff mbox series

[v2,13/16] tcg: Remove tcg_regset_{or, and, andnot, not}

Message ID 20170912162513.21694-14-richard.henderson@linaro.org
State Superseded
Headers show
Series TCG vectorization and example conversion | expand

Commit Message

Richard Henderson Sept. 12, 2017, 4:25 p.m. UTC
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

---
 tcg/tcg.h | 4 ----
 tcg/tcg.c | 2 +-
 2 files changed, 1 insertion(+), 5 deletions(-)

-- 
2.13.5

Comments

Philippe Mathieu-Daudé Sept. 12, 2017, 6:52 p.m. UTC | #1
On 09/12/2017 01:25 PM, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>


> ---

>   tcg/tcg.h | 4 ----

>   tcg/tcg.c | 2 +-

>   2 files changed, 1 insertion(+), 5 deletions(-)

> 

> diff --git a/tcg/tcg.h b/tcg/tcg.h

> index e168bd2c44..8b4208ea03 100644

> --- a/tcg/tcg.h

> +++ b/tcg/tcg.h

> @@ -214,10 +214,6 @@ typedef enum TCGOpcode {

>   #define tcg_regset_set_reg(d, r) (d) |= 1L << (r)

>   #define tcg_regset_reset_reg(d, r) (d) &= ~(1L << (r))

>   #define tcg_regset_test_reg(d, r) (((d) >> (r)) & 1)

> -#define tcg_regset_or(d, a, b) (d) = (a) | (b)

> -#define tcg_regset_and(d, a, b) (d) = (a) & (b)

> -#define tcg_regset_andnot(d, a, b) (d) = (a) & ~(b)

> -#define tcg_regset_not(d, a) (d) = ~(a)

>   

>   #ifndef TCG_TARGET_INSN_UNIT_SIZE

>   # error "Missing TCG_TARGET_INSN_UNIT_SIZE"

> diff --git a/tcg/tcg.c b/tcg/tcg.c

> index 873915925f..a19767b5ef 100644

> --- a/tcg/tcg.c

> +++ b/tcg/tcg.c

> @@ -2306,7 +2306,7 @@ static TCGReg tcg_reg_alloc(TCGContext *s, TCGRegSet desired_regs,

>       TCGReg reg;

>       TCGRegSet reg_ct;

>   

> -    tcg_regset_andnot(reg_ct, desired_regs, allocated_regs);

> +    reg_ct = desired_regs & ~allocated_regs;

>       order = rev ? indirect_reg_alloc_order : tcg_target_reg_alloc_order;

>   

>       /* first try free registers */

>
diff mbox series

Patch

diff --git a/tcg/tcg.h b/tcg/tcg.h
index e168bd2c44..8b4208ea03 100644
--- a/tcg/tcg.h
+++ b/tcg/tcg.h
@@ -214,10 +214,6 @@  typedef enum TCGOpcode {
 #define tcg_regset_set_reg(d, r) (d) |= 1L << (r)
 #define tcg_regset_reset_reg(d, r) (d) &= ~(1L << (r))
 #define tcg_regset_test_reg(d, r) (((d) >> (r)) & 1)
-#define tcg_regset_or(d, a, b) (d) = (a) | (b)
-#define tcg_regset_and(d, a, b) (d) = (a) & (b)
-#define tcg_regset_andnot(d, a, b) (d) = (a) & ~(b)
-#define tcg_regset_not(d, a) (d) = ~(a)
 
 #ifndef TCG_TARGET_INSN_UNIT_SIZE
 # error "Missing TCG_TARGET_INSN_UNIT_SIZE"
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 873915925f..a19767b5ef 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -2306,7 +2306,7 @@  static TCGReg tcg_reg_alloc(TCGContext *s, TCGRegSet desired_regs,
     TCGReg reg;
     TCGRegSet reg_ct;
 
-    tcg_regset_andnot(reg_ct, desired_regs, allocated_regs);
+    reg_ct = desired_regs & ~allocated_regs;
     order = rev ? indirect_reg_alloc_order : tcg_target_reg_alloc_order;
 
     /* first try free registers */