[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v7 22/27] tcg/tci: Implement add2, sub2
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v7 22/27] tcg/tci: Implement add2, sub2 |
Date: |
Sat, 12 Jun 2021 11:36:24 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 |
On 6/1/21 5:01 PM, Richard Henderson wrote:
> We already had the 32-bit versions for a 32-bit host; expand this
> to 64-bit hosts as well. The 64-bit opcodes are new.
>
> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> tcg/tci/tcg-target.h | 8 ++++----
> tcg/tci.c | 40 ++++++++++++++++++++++++++--------------
> tcg/tci/tcg-target.c.inc | 15 ++++++++-------
> 3 files changed, 38 insertions(+), 25 deletions(-)
> +#if TCG_TARGET_HAS_add2_i64
> + case INDEX_op_add2_i64:
> + tci_args_rrrrrr(insn, &r0, &r1, &r2, &r3, &r4, &r5);
> + T1 = regs[r2] + regs[r4];
// lo
> + T2 = regs[r3] + regs[r5] + (T1 < regs[r2]);
// hi + lo ovf
> + regs[r0] = T1;
// lo
> + regs[r1] = T2;
// hi
OK.
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> + break;
> +#endif
> +#if TCG_TARGET_HAS_add2_i64
> + case INDEX_op_sub2_i64:
> + tci_args_rrrrrr(insn, &r0, &r1, &r2, &r3, &r4, &r5);
> + T1 = regs[r2] - regs[r4];
> + T2 = regs[r3] - regs[r5] - (regs[r2] < regs[r4]);
> + regs[r0] = T1;
> + regs[r1] = T2;
> + break;
> +#endif
- [PATCH v7 06/27] tcg: Store the TCGHelperInfo in the TCGOp for call, (continued)
- [PATCH v7 06/27] tcg: Store the TCGHelperInfo in the TCGOp for call, Richard Henderson, 2021/06/01
- [PATCH v7 09/27] tcg/tci: Improve tcg_target_call_clobber_regs, Richard Henderson, 2021/06/01
- [PATCH v7 10/27] tcg/tci: Move call-return regs to end of tcg_target_reg_alloc_order, Richard Henderson, 2021/06/01
- [PATCH v7 13/27] tcg/tci: Emit setcond before brcond, Richard Henderson, 2021/06/01
- [PATCH v7 15/27] tcg/tci: Change encoding to uint32_t units, Richard Henderson, 2021/06/01
- [PATCH v7 08/27] tcg: Build ffi data structures for helpers, Richard Henderson, 2021/06/01
- [PATCH v7 25/27] tcg/tci: Remove the qemu_ld/st_type macros, Richard Henderson, 2021/06/01
- [PATCH v7 22/27] tcg/tci: Implement add2, sub2, Richard Henderson, 2021/06/01
- Re: [PATCH v7 22/27] tcg/tci: Implement add2, sub2,
Philippe Mathieu-Daudé <=
- [PATCH v7 27/27] tests/tcg: Increase timeout for TCI, Richard Henderson, 2021/06/01
- [PATCH v7 16/27] tcg/tci: Implement goto_ptr, Richard Henderson, 2021/06/01
- [PATCH v7 21/27] tcg/tci: Implement mulu2, muls2, Richard Henderson, 2021/06/01
- [PATCH v7 11/27] tcg/tci: Use ffi for calls, Richard Henderson, 2021/06/01
- [PATCH v7 19/27] tcg/tci: Implement extract, sextract, Richard Henderson, 2021/06/01
- [PATCH v7 17/27] tcg/tci: Implement movcond, Richard Henderson, 2021/06/01
- [PATCH v7 12/27] tcg/tci: Reserve r13 for a temporary, Richard Henderson, 2021/06/01