Message ID | 20170912162513.21694-13-richard.henderson@linaro.org |
---|---|
State | New |
Headers | show |
Series | TCG vectorization and example conversion | expand |
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 | 1 - > tcg/tcg.c | 8 ++++---- > 2 files changed, 4 insertions(+), 5 deletions(-) > > diff --git a/tcg/tcg.h b/tcg/tcg.h > index 7226727ee4..e168bd2c44 100644 > --- a/tcg/tcg.h > +++ b/tcg/tcg.h > @@ -210,7 +210,6 @@ typedef enum TCGOpcode { > NB_OPS, > } TCGOpcode; > > -#define tcg_regset_set(d, s) (d) = (s) > #define tcg_regset_set32(d, reg, val32) (d) |= (val32) << (reg) > #define tcg_regset_set_reg(d, r) (d) |= 1L << (r) > #define tcg_regset_reset_reg(d, r) (d) &= ~(1L << (r)) > diff --git a/tcg/tcg.c b/tcg/tcg.c > index f40cce3364..873915925f 100644 > --- a/tcg/tcg.c > +++ b/tcg/tcg.c > @@ -2452,7 +2452,7 @@ static void tcg_reg_alloc_mov(TCGContext *s, const TCGOpDef *def, > TCGTemp *ts, *ots; > TCGType otype, itype; > > - tcg_regset_set(allocated_regs, s->reserved_regs); > + allocated_regs = s->reserved_regs; > ots = &s->temps[args[0]]; > ts = &s->temps[args[1]]; > > @@ -2540,8 +2540,8 @@ static void tcg_reg_alloc_op(TCGContext *s, > args + nb_oargs + nb_iargs, > sizeof(TCGArg) * def->nb_cargs); > > - tcg_regset_set(i_allocated_regs, s->reserved_regs); > - tcg_regset_set(o_allocated_regs, s->reserved_regs); > + i_allocated_regs = s->reserved_regs; > + o_allocated_regs = s->reserved_regs; > > /* satisfy input constraints */ > for(k = 0; k < nb_iargs; k++) { > @@ -2741,7 +2741,7 @@ static void tcg_reg_alloc_call(TCGContext *s, int nb_oargs, int nb_iargs, > } > > /* assign input registers */ > - tcg_regset_set(allocated_regs, s->reserved_regs); > + allocated_regs = s->reserved_regs; > for(i = 0; i < nb_regs; i++) { > arg = args[nb_oargs + i]; > if (arg != TCG_CALL_DUMMY_ARG) { >
Richard Henderson <richard.henderson@linaro.org> writes: > Signed-off-by: Richard Henderson <richard.henderson@linaro.org> This breaks the mips cross build: In file included from /tmp/qemu-test/src/tcg/tcg.c:254:0: /tmp/qemu-test/src/tcg/mips/tcg-target.inc.c: In function 'target_parse_constraint': /tmp/qemu-test/src/tcg/mips/tcg-target.inc.c:198:9: error: implicit declaration of function 'tcg_regset_set' [-Werror=implicit-function-declaration] tcg_regset_set(ct->u.regs, 0xffffffff); ^~~~~~~~~~~~~~ /tmp/qemu-test/src/tcg/mips/tcg-target.inc.c:198:9: error: nested extern declaration of 'tcg_regset_set' [-Werror=nested-externs] Via: make docker-test-build@debian-mips-cross V=1 J=9 TARGET_LIST=mips-softmmu,mipsel-linux-user > --- > tcg/tcg.h | 1 - > tcg/tcg.c | 8 ++++---- > 2 files changed, 4 insertions(+), 5 deletions(-) > > diff --git a/tcg/tcg.h b/tcg/tcg.h > index 7226727ee4..e168bd2c44 100644 > --- a/tcg/tcg.h > +++ b/tcg/tcg.h > @@ -210,7 +210,6 @@ typedef enum TCGOpcode { > NB_OPS, > } TCGOpcode; > > -#define tcg_regset_set(d, s) (d) = (s) > #define tcg_regset_set32(d, reg, val32) (d) |= (val32) << (reg) > #define tcg_regset_set_reg(d, r) (d) |= 1L << (r) > #define tcg_regset_reset_reg(d, r) (d) &= ~(1L << (r)) > diff --git a/tcg/tcg.c b/tcg/tcg.c > index f40cce3364..873915925f 100644 > --- a/tcg/tcg.c > +++ b/tcg/tcg.c > @@ -2452,7 +2452,7 @@ static void tcg_reg_alloc_mov(TCGContext *s, const TCGOpDef *def, > TCGTemp *ts, *ots; > TCGType otype, itype; > > - tcg_regset_set(allocated_regs, s->reserved_regs); > + allocated_regs = s->reserved_regs; > ots = &s->temps[args[0]]; > ts = &s->temps[args[1]]; > > @@ -2540,8 +2540,8 @@ static void tcg_reg_alloc_op(TCGContext *s, > args + nb_oargs + nb_iargs, > sizeof(TCGArg) * def->nb_cargs); > > - tcg_regset_set(i_allocated_regs, s->reserved_regs); > - tcg_regset_set(o_allocated_regs, s->reserved_regs); > + i_allocated_regs = s->reserved_regs; > + o_allocated_regs = s->reserved_regs; > > /* satisfy input constraints */ > for(k = 0; k < nb_iargs; k++) { > @@ -2741,7 +2741,7 @@ static void tcg_reg_alloc_call(TCGContext *s, int nb_oargs, int nb_iargs, > } > > /* assign input registers */ > - tcg_regset_set(allocated_regs, s->reserved_regs); > + allocated_regs = s->reserved_regs; > for(i = 0; i < nb_regs; i++) { > arg = args[nb_oargs + i]; > if (arg != TCG_CALL_DUMMY_ARG) { -- Alex Bennée
On 09/15/2017 03:21 AM, Alex Bennée wrote: > > Richard Henderson <richard.henderson@linaro.org> writes: > >> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> > > This breaks the mips cross build: > > In file included from /tmp/qemu-test/src/tcg/tcg.c:254:0: > /tmp/qemu-test/src/tcg/mips/tcg-target.inc.c: In function 'target_parse_constraint': > /tmp/qemu-test/src/tcg/mips/tcg-target.inc.c:198:9: error: implicit > declaration of function 'tcg_regset_set' [-Werror=implicit-function-declaration] > > tcg_regset_set(ct->u.regs, 0xffffffff); Yes, I found this myself yesterday. Fixed in tcg-next. Thanks, r~
diff --git a/tcg/tcg.h b/tcg/tcg.h index 7226727ee4..e168bd2c44 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -210,7 +210,6 @@ typedef enum TCGOpcode { NB_OPS, } TCGOpcode; -#define tcg_regset_set(d, s) (d) = (s) #define tcg_regset_set32(d, reg, val32) (d) |= (val32) << (reg) #define tcg_regset_set_reg(d, r) (d) |= 1L << (r) #define tcg_regset_reset_reg(d, r) (d) &= ~(1L << (r)) diff --git a/tcg/tcg.c b/tcg/tcg.c index f40cce3364..873915925f 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -2452,7 +2452,7 @@ static void tcg_reg_alloc_mov(TCGContext *s, const TCGOpDef *def, TCGTemp *ts, *ots; TCGType otype, itype; - tcg_regset_set(allocated_regs, s->reserved_regs); + allocated_regs = s->reserved_regs; ots = &s->temps[args[0]]; ts = &s->temps[args[1]]; @@ -2540,8 +2540,8 @@ static void tcg_reg_alloc_op(TCGContext *s, args + nb_oargs + nb_iargs, sizeof(TCGArg) * def->nb_cargs); - tcg_regset_set(i_allocated_regs, s->reserved_regs); - tcg_regset_set(o_allocated_regs, s->reserved_regs); + i_allocated_regs = s->reserved_regs; + o_allocated_regs = s->reserved_regs; /* satisfy input constraints */ for(k = 0; k < nb_iargs; k++) { @@ -2741,7 +2741,7 @@ static void tcg_reg_alloc_call(TCGContext *s, int nb_oargs, int nb_iargs, } /* assign input registers */ - tcg_regset_set(allocated_regs, s->reserved_regs); + allocated_regs = s->reserved_regs; for(i = 0; i < nb_regs; i++) { arg = args[nb_oargs + i]; if (arg != TCG_CALL_DUMMY_ARG) {
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- tcg/tcg.h | 1 - tcg/tcg.c | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) -- 2.13.5