2023-03-29 04:17:24 +03:00
|
|
|
/* SPDX-License-Identifier: MIT */
|
2008-02-01 13:05:41 +03:00
|
|
|
/*
|
2023-03-29 04:17:24 +03:00
|
|
|
* Target dependent opcode generation functions.
|
2008-02-01 13:05:41 +03:00
|
|
|
*
|
|
|
|
* Copyright (c) 2008 Fabrice Bellard
|
|
|
|
*/
|
2014-09-19 22:39:20 +04:00
|
|
|
|
2018-11-08 15:52:56 +03:00
|
|
|
#ifndef TCG_TCG_OP_H
|
|
|
|
#define TCG_TCG_OP_H
|
|
|
|
|
2023-03-29 04:17:24 +03:00
|
|
|
#include "tcg/tcg-op-common.h"
|
2008-02-01 13:05:41 +03:00
|
|
|
|
2014-09-19 22:39:20 +04:00
|
|
|
#ifndef TARGET_LONG_BITS
|
|
|
|
#error must include QEMU headers
|
|
|
|
#endif
|
2008-02-01 13:05:41 +03:00
|
|
|
|
2023-04-28 11:16:01 +03:00
|
|
|
#if TARGET_LONG_BITS == 32
|
|
|
|
# define TCG_TYPE_TL TCG_TYPE_I32
|
|
|
|
#elif TARGET_LONG_BITS == 64
|
|
|
|
# define TCG_TYPE_TL TCG_TYPE_I64
|
|
|
|
#else
|
|
|
|
# error
|
|
|
|
#endif
|
|
|
|
|
2023-04-01 07:30:31 +03:00
|
|
|
#ifndef TARGET_INSN_START_EXTRA_WORDS
|
2015-08-30 19:21:33 +03:00
|
|
|
static inline void tcg_gen_insn_start(target_ulong pc)
|
2008-02-01 13:05:41 +03:00
|
|
|
{
|
2023-03-08 23:24:41 +03:00
|
|
|
TCGOp *op = tcg_emit_op(INDEX_op_insn_start, 64 / TCG_TARGET_REG_BITS);
|
|
|
|
tcg_set_insn_start_param(op, 0, pc);
|
2015-08-30 19:21:33 +03:00
|
|
|
}
|
2023-04-01 07:30:31 +03:00
|
|
|
#elif TARGET_INSN_START_EXTRA_WORDS == 1
|
2015-08-30 19:21:33 +03:00
|
|
|
static inline void tcg_gen_insn_start(target_ulong pc, target_ulong a1)
|
|
|
|
{
|
2023-03-08 23:24:41 +03:00
|
|
|
TCGOp *op = tcg_emit_op(INDEX_op_insn_start, 2 * 64 / TCG_TARGET_REG_BITS);
|
|
|
|
tcg_set_insn_start_param(op, 0, pc);
|
|
|
|
tcg_set_insn_start_param(op, 1, a1);
|
2015-08-30 19:21:33 +03:00
|
|
|
}
|
2023-04-01 07:30:31 +03:00
|
|
|
#elif TARGET_INSN_START_EXTRA_WORDS == 2
|
2015-08-30 19:21:33 +03:00
|
|
|
static inline void tcg_gen_insn_start(target_ulong pc, target_ulong a1,
|
|
|
|
target_ulong a2)
|
|
|
|
{
|
2023-03-08 23:24:41 +03:00
|
|
|
TCGOp *op = tcg_emit_op(INDEX_op_insn_start, 3 * 64 / TCG_TARGET_REG_BITS);
|
|
|
|
tcg_set_insn_start_param(op, 0, pc);
|
|
|
|
tcg_set_insn_start_param(op, 1, a1);
|
|
|
|
tcg_set_insn_start_param(op, 2, a2);
|
2015-08-30 19:21:33 +03:00
|
|
|
}
|
2014-09-19 22:39:20 +04:00
|
|
|
#else
|
2023-04-01 07:30:31 +03:00
|
|
|
#error Unhandled TARGET_INSN_START_EXTRA_WORDS value
|
2014-09-19 22:39:20 +04:00
|
|
|
#endif
|
2008-02-01 13:05:41 +03:00
|
|
|
|
2008-11-17 17:43:54 +03:00
|
|
|
#if TARGET_LONG_BITS == 32
|
2023-03-28 04:44:05 +03:00
|
|
|
typedef TCGv_i32 TCGv;
|
2008-11-17 17:43:54 +03:00
|
|
|
#define tcg_temp_new() tcg_temp_new_i32()
|
|
|
|
#define tcg_global_mem_new tcg_global_mem_new_i32
|
|
|
|
#define tcg_temp_free tcg_temp_free_i32
|
2023-03-15 02:46:55 +03:00
|
|
|
#define tcgv_tl_temp tcgv_i32_temp
|
2013-09-04 19:11:05 +04:00
|
|
|
#define tcg_gen_qemu_ld_tl tcg_gen_qemu_ld_i32
|
|
|
|
#define tcg_gen_qemu_st_tl tcg_gen_qemu_st_i32
|
2023-03-28 04:44:05 +03:00
|
|
|
#elif TARGET_LONG_BITS == 64
|
|
|
|
typedef TCGv_i64 TCGv;
|
2008-11-17 17:43:54 +03:00
|
|
|
#define tcg_temp_new() tcg_temp_new_i64()
|
|
|
|
#define tcg_global_mem_new tcg_global_mem_new_i64
|
|
|
|
#define tcg_temp_free tcg_temp_free_i64
|
2023-03-15 02:46:55 +03:00
|
|
|
#define tcgv_tl_temp tcgv_i64_temp
|
2013-09-04 19:11:05 +04:00
|
|
|
#define tcg_gen_qemu_ld_tl tcg_gen_qemu_ld_i64
|
|
|
|
#define tcg_gen_qemu_st_tl tcg_gen_qemu_st_i64
|
2023-03-28 04:44:05 +03:00
|
|
|
#else
|
|
|
|
#error Unhandled TARGET_LONG_BITS value
|
2008-11-17 17:43:54 +03:00
|
|
|
#endif
|
|
|
|
|
2023-03-15 02:46:55 +03:00
|
|
|
static inline void
|
|
|
|
tcg_gen_qemu_ld_i32(TCGv_i32 v, TCGv a, TCGArg i, MemOp m)
|
|
|
|
{
|
|
|
|
tcg_gen_qemu_ld_i32_chk(v, tcgv_tl_temp(a), i, m, TCG_TYPE_TL);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
tcg_gen_qemu_st_i32(TCGv_i32 v, TCGv a, TCGArg i, MemOp m)
|
|
|
|
{
|
|
|
|
tcg_gen_qemu_st_i32_chk(v, tcgv_tl_temp(a), i, m, TCG_TYPE_TL);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
tcg_gen_qemu_ld_i64(TCGv_i64 v, TCGv a, TCGArg i, MemOp m)
|
|
|
|
{
|
|
|
|
tcg_gen_qemu_ld_i64_chk(v, tcgv_tl_temp(a), i, m, TCG_TYPE_TL);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
tcg_gen_qemu_st_i64(TCGv_i64 v, TCGv a, TCGArg i, MemOp m)
|
|
|
|
{
|
|
|
|
tcg_gen_qemu_st_i64_chk(v, tcgv_tl_temp(a), i, m, TCG_TYPE_TL);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
tcg_gen_qemu_ld_i128(TCGv_i128 v, TCGv a, TCGArg i, MemOp m)
|
|
|
|
{
|
|
|
|
tcg_gen_qemu_ld_i128_chk(v, tcgv_tl_temp(a), i, m, TCG_TYPE_TL);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
tcg_gen_qemu_st_i128(TCGv_i128 v, TCGv a, TCGArg i, MemOp m)
|
|
|
|
{
|
|
|
|
tcg_gen_qemu_st_i128_chk(v, tcgv_tl_temp(a), i, m, TCG_TYPE_TL);
|
|
|
|
}
|
2008-02-01 13:05:41 +03:00
|
|
|
|
2023-03-29 03:25:10 +03:00
|
|
|
#define DEF_ATOMIC2(N, S) \
|
|
|
|
static inline void N##_##S(TCGv_##S r, TCGv a, TCGv_##S v, \
|
|
|
|
TCGArg i, MemOp m) \
|
|
|
|
{ N##_##S##_chk(r, tcgv_tl_temp(a), v, i, m, TCG_TYPE_TL); }
|
|
|
|
|
|
|
|
#define DEF_ATOMIC3(N, S) \
|
|
|
|
static inline void N##_##S(TCGv_##S r, TCGv a, TCGv_##S o, \
|
|
|
|
TCGv_##S n, TCGArg i, MemOp m) \
|
|
|
|
{ N##_##S##_chk(r, tcgv_tl_temp(a), o, n, i, m, TCG_TYPE_TL); }
|
|
|
|
|
|
|
|
DEF_ATOMIC3(tcg_gen_atomic_cmpxchg, i32)
|
|
|
|
DEF_ATOMIC3(tcg_gen_atomic_cmpxchg, i64)
|
|
|
|
DEF_ATOMIC3(tcg_gen_atomic_cmpxchg, i128)
|
|
|
|
|
|
|
|
DEF_ATOMIC3(tcg_gen_nonatomic_cmpxchg, i32)
|
|
|
|
DEF_ATOMIC3(tcg_gen_nonatomic_cmpxchg, i64)
|
|
|
|
DEF_ATOMIC3(tcg_gen_nonatomic_cmpxchg, i128)
|
|
|
|
|
|
|
|
DEF_ATOMIC2(tcg_gen_atomic_xchg, i32)
|
|
|
|
DEF_ATOMIC2(tcg_gen_atomic_xchg, i64)
|
|
|
|
|
|
|
|
DEF_ATOMIC2(tcg_gen_atomic_fetch_add, i32)
|
|
|
|
DEF_ATOMIC2(tcg_gen_atomic_fetch_add, i64)
|
|
|
|
DEF_ATOMIC2(tcg_gen_atomic_fetch_and, i32)
|
|
|
|
DEF_ATOMIC2(tcg_gen_atomic_fetch_and, i64)
|
|
|
|
DEF_ATOMIC2(tcg_gen_atomic_fetch_or, i32)
|
|
|
|
DEF_ATOMIC2(tcg_gen_atomic_fetch_or, i64)
|
|
|
|
DEF_ATOMIC2(tcg_gen_atomic_fetch_xor, i32)
|
|
|
|
DEF_ATOMIC2(tcg_gen_atomic_fetch_xor, i64)
|
|
|
|
DEF_ATOMIC2(tcg_gen_atomic_fetch_smin, i32)
|
|
|
|
DEF_ATOMIC2(tcg_gen_atomic_fetch_smin, i64)
|
|
|
|
DEF_ATOMIC2(tcg_gen_atomic_fetch_umin, i32)
|
|
|
|
DEF_ATOMIC2(tcg_gen_atomic_fetch_umin, i64)
|
|
|
|
DEF_ATOMIC2(tcg_gen_atomic_fetch_smax, i32)
|
|
|
|
DEF_ATOMIC2(tcg_gen_atomic_fetch_smax, i64)
|
|
|
|
DEF_ATOMIC2(tcg_gen_atomic_fetch_umax, i32)
|
|
|
|
DEF_ATOMIC2(tcg_gen_atomic_fetch_umax, i64)
|
|
|
|
|
|
|
|
DEF_ATOMIC2(tcg_gen_atomic_add_fetch, i32)
|
|
|
|
DEF_ATOMIC2(tcg_gen_atomic_add_fetch, i64)
|
|
|
|
DEF_ATOMIC2(tcg_gen_atomic_and_fetch, i32)
|
|
|
|
DEF_ATOMIC2(tcg_gen_atomic_and_fetch, i64)
|
|
|
|
DEF_ATOMIC2(tcg_gen_atomic_or_fetch, i32)
|
|
|
|
DEF_ATOMIC2(tcg_gen_atomic_or_fetch, i64)
|
|
|
|
DEF_ATOMIC2(tcg_gen_atomic_xor_fetch, i32)
|
|
|
|
DEF_ATOMIC2(tcg_gen_atomic_xor_fetch, i64)
|
|
|
|
DEF_ATOMIC2(tcg_gen_atomic_smin_fetch, i32)
|
|
|
|
DEF_ATOMIC2(tcg_gen_atomic_smin_fetch, i64)
|
|
|
|
DEF_ATOMIC2(tcg_gen_atomic_umin_fetch, i32)
|
|
|
|
DEF_ATOMIC2(tcg_gen_atomic_umin_fetch, i64)
|
|
|
|
DEF_ATOMIC2(tcg_gen_atomic_smax_fetch, i32)
|
|
|
|
DEF_ATOMIC2(tcg_gen_atomic_smax_fetch, i64)
|
|
|
|
DEF_ATOMIC2(tcg_gen_atomic_umax_fetch, i32)
|
|
|
|
DEF_ATOMIC2(tcg_gen_atomic_umax_fetch, i64)
|
|
|
|
|
|
|
|
#undef DEF_ATOMIC2
|
|
|
|
#undef DEF_ATOMIC3
|
2016-06-28 21:37:27 +03:00
|
|
|
|
2008-02-24 10:45:43 +03:00
|
|
|
#if TARGET_LONG_BITS == 64
|
|
|
|
#define tcg_gen_movi_tl tcg_gen_movi_i64
|
|
|
|
#define tcg_gen_mov_tl tcg_gen_mov_i64
|
|
|
|
#define tcg_gen_ld8u_tl tcg_gen_ld8u_i64
|
|
|
|
#define tcg_gen_ld8s_tl tcg_gen_ld8s_i64
|
|
|
|
#define tcg_gen_ld16u_tl tcg_gen_ld16u_i64
|
|
|
|
#define tcg_gen_ld16s_tl tcg_gen_ld16s_i64
|
|
|
|
#define tcg_gen_ld32u_tl tcg_gen_ld32u_i64
|
|
|
|
#define tcg_gen_ld32s_tl tcg_gen_ld32s_i64
|
|
|
|
#define tcg_gen_ld_tl tcg_gen_ld_i64
|
|
|
|
#define tcg_gen_st8_tl tcg_gen_st8_i64
|
|
|
|
#define tcg_gen_st16_tl tcg_gen_st16_i64
|
|
|
|
#define tcg_gen_st32_tl tcg_gen_st32_i64
|
|
|
|
#define tcg_gen_st_tl tcg_gen_st_i64
|
|
|
|
#define tcg_gen_add_tl tcg_gen_add_i64
|
|
|
|
#define tcg_gen_addi_tl tcg_gen_addi_i64
|
|
|
|
#define tcg_gen_sub_tl tcg_gen_sub_i64
|
2008-05-11 18:35:37 +04:00
|
|
|
#define tcg_gen_neg_tl tcg_gen_neg_i64
|
2019-04-18 02:51:29 +03:00
|
|
|
#define tcg_gen_abs_tl tcg_gen_abs_i64
|
2008-11-02 16:26:16 +03:00
|
|
|
#define tcg_gen_subfi_tl tcg_gen_subfi_i64
|
2008-02-24 10:45:43 +03:00
|
|
|
#define tcg_gen_subi_tl tcg_gen_subi_i64
|
|
|
|
#define tcg_gen_and_tl tcg_gen_and_i64
|
|
|
|
#define tcg_gen_andi_tl tcg_gen_andi_i64
|
|
|
|
#define tcg_gen_or_tl tcg_gen_or_i64
|
|
|
|
#define tcg_gen_ori_tl tcg_gen_ori_i64
|
|
|
|
#define tcg_gen_xor_tl tcg_gen_xor_i64
|
|
|
|
#define tcg_gen_xori_tl tcg_gen_xori_i64
|
2008-05-17 16:40:44 +04:00
|
|
|
#define tcg_gen_not_tl tcg_gen_not_i64
|
2008-02-24 10:45:43 +03:00
|
|
|
#define tcg_gen_shl_tl tcg_gen_shl_i64
|
|
|
|
#define tcg_gen_shli_tl tcg_gen_shli_i64
|
|
|
|
#define tcg_gen_shr_tl tcg_gen_shr_i64
|
|
|
|
#define tcg_gen_shri_tl tcg_gen_shri_i64
|
|
|
|
#define tcg_gen_sar_tl tcg_gen_sar_i64
|
|
|
|
#define tcg_gen_sari_tl tcg_gen_sari_i64
|
2008-03-02 21:20:59 +03:00
|
|
|
#define tcg_gen_brcond_tl tcg_gen_brcond_i64
|
2008-05-24 06:22:00 +04:00
|
|
|
#define tcg_gen_brcondi_tl tcg_gen_brcondi_i64
|
2010-01-07 21:13:31 +03:00
|
|
|
#define tcg_gen_setcond_tl tcg_gen_setcond_i64
|
2010-02-08 14:06:05 +03:00
|
|
|
#define tcg_gen_setcondi_tl tcg_gen_setcondi_i64
|
2008-05-04 12:14:08 +04:00
|
|
|
#define tcg_gen_mul_tl tcg_gen_mul_i64
|
|
|
|
#define tcg_gen_muli_tl tcg_gen_muli_i64
|
2009-03-29 05:19:22 +04:00
|
|
|
#define tcg_gen_div_tl tcg_gen_div_i64
|
|
|
|
#define tcg_gen_rem_tl tcg_gen_rem_i64
|
2009-03-29 18:08:54 +04:00
|
|
|
#define tcg_gen_divu_tl tcg_gen_divu_i64
|
|
|
|
#define tcg_gen_remu_tl tcg_gen_remu_i64
|
2008-03-16 22:16:37 +03:00
|
|
|
#define tcg_gen_discard_tl tcg_gen_discard_i64
|
2015-07-24 21:49:53 +03:00
|
|
|
#define tcg_gen_trunc_tl_i32 tcg_gen_extrl_i64_i32
|
2008-03-22 11:39:04 +03:00
|
|
|
#define tcg_gen_trunc_i64_tl tcg_gen_mov_i64
|
|
|
|
#define tcg_gen_extu_i32_tl tcg_gen_extu_i32_i64
|
|
|
|
#define tcg_gen_ext_i32_tl tcg_gen_ext_i32_i64
|
|
|
|
#define tcg_gen_extu_tl_i64 tcg_gen_mov_i64
|
|
|
|
#define tcg_gen_ext_tl_i64 tcg_gen_mov_i64
|
2008-05-17 16:40:44 +04:00
|
|
|
#define tcg_gen_ext8u_tl tcg_gen_ext8u_i64
|
|
|
|
#define tcg_gen_ext8s_tl tcg_gen_ext8s_i64
|
|
|
|
#define tcg_gen_ext16u_tl tcg_gen_ext16u_i64
|
|
|
|
#define tcg_gen_ext16s_tl tcg_gen_ext16s_i64
|
|
|
|
#define tcg_gen_ext32u_tl tcg_gen_ext32u_i64
|
|
|
|
#define tcg_gen_ext32s_tl tcg_gen_ext32s_i64
|
2009-03-13 12:35:19 +03:00
|
|
|
#define tcg_gen_bswap16_tl tcg_gen_bswap16_i64
|
|
|
|
#define tcg_gen_bswap32_tl tcg_gen_bswap32_i64
|
|
|
|
#define tcg_gen_bswap64_tl tcg_gen_bswap64_i64
|
2020-12-16 20:59:06 +03:00
|
|
|
#define tcg_gen_bswap_tl tcg_gen_bswap64_i64
|
2022-04-28 12:46:59 +03:00
|
|
|
#define tcg_gen_hswap_tl tcg_gen_hswap_i64
|
|
|
|
#define tcg_gen_wswap_tl tcg_gen_wswap_i64
|
2008-09-21 22:32:28 +04:00
|
|
|
#define tcg_gen_concat_tl_i64 tcg_gen_concat32_i64
|
2013-02-20 11:51:54 +04:00
|
|
|
#define tcg_gen_extr_i64_tl tcg_gen_extr32_i64
|
TCG: add logical operations found on alpha and powerpc processors
- andc_i32/i64 t0, t1, t2
- eqv_i32/i64 t0, t1, t2
- nand_i32/i64 t0, t1, t2
- nor_i32/i64 t0, t1, t2
- orc_i32/i64 t0, t1, t2
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5501 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-21 15:28:59 +04:00
|
|
|
#define tcg_gen_andc_tl tcg_gen_andc_i64
|
|
|
|
#define tcg_gen_eqv_tl tcg_gen_eqv_i64
|
|
|
|
#define tcg_gen_nand_tl tcg_gen_nand_i64
|
|
|
|
#define tcg_gen_nor_tl tcg_gen_nor_i64
|
|
|
|
#define tcg_gen_orc_tl tcg_gen_orc_i64
|
2016-11-16 11:23:28 +03:00
|
|
|
#define tcg_gen_clz_tl tcg_gen_clz_i64
|
|
|
|
#define tcg_gen_ctz_tl tcg_gen_ctz_i64
|
|
|
|
#define tcg_gen_clzi_tl tcg_gen_clzi_i64
|
|
|
|
#define tcg_gen_ctzi_tl tcg_gen_ctzi_i64
|
2016-11-16 19:32:48 +03:00
|
|
|
#define tcg_gen_clrsb_tl tcg_gen_clrsb_i64
|
2016-11-21 13:13:39 +03:00
|
|
|
#define tcg_gen_ctpop_tl tcg_gen_ctpop_i64
|
2008-11-03 10:08:36 +03:00
|
|
|
#define tcg_gen_rotl_tl tcg_gen_rotl_i64
|
|
|
|
#define tcg_gen_rotli_tl tcg_gen_rotli_i64
|
|
|
|
#define tcg_gen_rotr_tl tcg_gen_rotr_i64
|
|
|
|
#define tcg_gen_rotri_tl tcg_gen_rotri_i64
|
2011-01-11 06:23:42 +03:00
|
|
|
#define tcg_gen_deposit_tl tcg_gen_deposit_i64
|
2016-10-17 23:21:31 +03:00
|
|
|
#define tcg_gen_deposit_z_tl tcg_gen_deposit_z_i64
|
2016-10-14 20:04:32 +03:00
|
|
|
#define tcg_gen_extract_tl tcg_gen_extract_i64
|
|
|
|
#define tcg_gen_sextract_tl tcg_gen_sextract_i64
|
2019-02-25 18:42:04 +03:00
|
|
|
#define tcg_gen_extract2_tl tcg_gen_extract2_i64
|
2021-05-12 21:54:33 +03:00
|
|
|
#define tcg_constant_tl tcg_constant_i64
|
2012-09-21 21:13:34 +04:00
|
|
|
#define tcg_gen_movcond_tl tcg_gen_movcond_i64
|
2013-02-20 11:51:56 +04:00
|
|
|
#define tcg_gen_add2_tl tcg_gen_add2_i64
|
|
|
|
#define tcg_gen_sub2_tl tcg_gen_sub2_i64
|
2013-02-20 11:51:55 +04:00
|
|
|
#define tcg_gen_mulu2_tl tcg_gen_mulu2_i64
|
|
|
|
#define tcg_gen_muls2_tl tcg_gen_muls2_i64
|
2016-09-28 00:23:52 +03:00
|
|
|
#define tcg_gen_mulsu2_tl tcg_gen_mulsu2_i64
|
2018-05-10 20:10:57 +03:00
|
|
|
#define tcg_gen_smin_tl tcg_gen_smin_i64
|
|
|
|
#define tcg_gen_umin_tl tcg_gen_umin_i64
|
|
|
|
#define tcg_gen_smax_tl tcg_gen_smax_i64
|
|
|
|
#define tcg_gen_umax_tl tcg_gen_umax_i64
|
2016-06-28 21:37:27 +03:00
|
|
|
#define tcg_gen_atomic_cmpxchg_tl tcg_gen_atomic_cmpxchg_i64
|
|
|
|
#define tcg_gen_atomic_xchg_tl tcg_gen_atomic_xchg_i64
|
|
|
|
#define tcg_gen_atomic_fetch_add_tl tcg_gen_atomic_fetch_add_i64
|
|
|
|
#define tcg_gen_atomic_fetch_and_tl tcg_gen_atomic_fetch_and_i64
|
|
|
|
#define tcg_gen_atomic_fetch_or_tl tcg_gen_atomic_fetch_or_i64
|
|
|
|
#define tcg_gen_atomic_fetch_xor_tl tcg_gen_atomic_fetch_xor_i64
|
2018-05-10 20:10:57 +03:00
|
|
|
#define tcg_gen_atomic_fetch_smin_tl tcg_gen_atomic_fetch_smin_i64
|
|
|
|
#define tcg_gen_atomic_fetch_umin_tl tcg_gen_atomic_fetch_umin_i64
|
|
|
|
#define tcg_gen_atomic_fetch_smax_tl tcg_gen_atomic_fetch_smax_i64
|
|
|
|
#define tcg_gen_atomic_fetch_umax_tl tcg_gen_atomic_fetch_umax_i64
|
2016-06-28 21:37:27 +03:00
|
|
|
#define tcg_gen_atomic_add_fetch_tl tcg_gen_atomic_add_fetch_i64
|
|
|
|
#define tcg_gen_atomic_and_fetch_tl tcg_gen_atomic_and_fetch_i64
|
|
|
|
#define tcg_gen_atomic_or_fetch_tl tcg_gen_atomic_or_fetch_i64
|
|
|
|
#define tcg_gen_atomic_xor_fetch_tl tcg_gen_atomic_xor_fetch_i64
|
2018-05-10 20:10:57 +03:00
|
|
|
#define tcg_gen_atomic_smin_fetch_tl tcg_gen_atomic_smin_fetch_i64
|
|
|
|
#define tcg_gen_atomic_umin_fetch_tl tcg_gen_atomic_umin_fetch_i64
|
|
|
|
#define tcg_gen_atomic_smax_fetch_tl tcg_gen_atomic_smax_fetch_i64
|
|
|
|
#define tcg_gen_atomic_umax_fetch_tl tcg_gen_atomic_umax_fetch_i64
|
2017-09-14 23:53:46 +03:00
|
|
|
#define tcg_gen_dup_tl_vec tcg_gen_dup_i64_vec
|
2021-06-17 15:15:53 +03:00
|
|
|
#define tcg_gen_dup_tl tcg_gen_dup_i64
|
2023-03-28 04:44:05 +03:00
|
|
|
#define dup_const_tl dup_const
|
2008-02-24 10:45:43 +03:00
|
|
|
#else
|
|
|
|
#define tcg_gen_movi_tl tcg_gen_movi_i32
|
|
|
|
#define tcg_gen_mov_tl tcg_gen_mov_i32
|
|
|
|
#define tcg_gen_ld8u_tl tcg_gen_ld8u_i32
|
|
|
|
#define tcg_gen_ld8s_tl tcg_gen_ld8s_i32
|
|
|
|
#define tcg_gen_ld16u_tl tcg_gen_ld16u_i32
|
|
|
|
#define tcg_gen_ld16s_tl tcg_gen_ld16s_i32
|
|
|
|
#define tcg_gen_ld32u_tl tcg_gen_ld_i32
|
|
|
|
#define tcg_gen_ld32s_tl tcg_gen_ld_i32
|
|
|
|
#define tcg_gen_ld_tl tcg_gen_ld_i32
|
|
|
|
#define tcg_gen_st8_tl tcg_gen_st8_i32
|
|
|
|
#define tcg_gen_st16_tl tcg_gen_st16_i32
|
|
|
|
#define tcg_gen_st32_tl tcg_gen_st_i32
|
|
|
|
#define tcg_gen_st_tl tcg_gen_st_i32
|
|
|
|
#define tcg_gen_add_tl tcg_gen_add_i32
|
|
|
|
#define tcg_gen_addi_tl tcg_gen_addi_i32
|
|
|
|
#define tcg_gen_sub_tl tcg_gen_sub_i32
|
2008-05-11 18:35:37 +04:00
|
|
|
#define tcg_gen_neg_tl tcg_gen_neg_i32
|
2019-04-18 02:51:29 +03:00
|
|
|
#define tcg_gen_abs_tl tcg_gen_abs_i32
|
2008-11-02 11:23:04 +03:00
|
|
|
#define tcg_gen_subfi_tl tcg_gen_subfi_i32
|
2008-02-24 10:45:43 +03:00
|
|
|
#define tcg_gen_subi_tl tcg_gen_subi_i32
|
|
|
|
#define tcg_gen_and_tl tcg_gen_and_i32
|
|
|
|
#define tcg_gen_andi_tl tcg_gen_andi_i32
|
|
|
|
#define tcg_gen_or_tl tcg_gen_or_i32
|
|
|
|
#define tcg_gen_ori_tl tcg_gen_ori_i32
|
|
|
|
#define tcg_gen_xor_tl tcg_gen_xor_i32
|
|
|
|
#define tcg_gen_xori_tl tcg_gen_xori_i32
|
2008-05-17 16:40:44 +04:00
|
|
|
#define tcg_gen_not_tl tcg_gen_not_i32
|
2008-02-24 10:45:43 +03:00
|
|
|
#define tcg_gen_shl_tl tcg_gen_shl_i32
|
|
|
|
#define tcg_gen_shli_tl tcg_gen_shli_i32
|
|
|
|
#define tcg_gen_shr_tl tcg_gen_shr_i32
|
|
|
|
#define tcg_gen_shri_tl tcg_gen_shri_i32
|
|
|
|
#define tcg_gen_sar_tl tcg_gen_sar_i32
|
|
|
|
#define tcg_gen_sari_tl tcg_gen_sari_i32
|
2008-03-02 21:20:59 +03:00
|
|
|
#define tcg_gen_brcond_tl tcg_gen_brcond_i32
|
2008-05-24 06:22:00 +04:00
|
|
|
#define tcg_gen_brcondi_tl tcg_gen_brcondi_i32
|
2010-01-07 21:13:31 +03:00
|
|
|
#define tcg_gen_setcond_tl tcg_gen_setcond_i32
|
2010-02-08 14:06:05 +03:00
|
|
|
#define tcg_gen_setcondi_tl tcg_gen_setcondi_i32
|
2008-05-04 12:14:08 +04:00
|
|
|
#define tcg_gen_mul_tl tcg_gen_mul_i32
|
|
|
|
#define tcg_gen_muli_tl tcg_gen_muli_i32
|
2009-03-29 05:19:22 +04:00
|
|
|
#define tcg_gen_div_tl tcg_gen_div_i32
|
|
|
|
#define tcg_gen_rem_tl tcg_gen_rem_i32
|
2009-03-29 18:08:54 +04:00
|
|
|
#define tcg_gen_divu_tl tcg_gen_divu_i32
|
|
|
|
#define tcg_gen_remu_tl tcg_gen_remu_i32
|
2008-03-16 22:16:37 +03:00
|
|
|
#define tcg_gen_discard_tl tcg_gen_discard_i32
|
2008-03-22 11:39:04 +03:00
|
|
|
#define tcg_gen_trunc_tl_i32 tcg_gen_mov_i32
|
2015-07-24 21:49:53 +03:00
|
|
|
#define tcg_gen_trunc_i64_tl tcg_gen_extrl_i64_i32
|
2008-03-22 11:39:04 +03:00
|
|
|
#define tcg_gen_extu_i32_tl tcg_gen_mov_i32
|
|
|
|
#define tcg_gen_ext_i32_tl tcg_gen_mov_i32
|
|
|
|
#define tcg_gen_extu_tl_i64 tcg_gen_extu_i32_i64
|
|
|
|
#define tcg_gen_ext_tl_i64 tcg_gen_ext_i32_i64
|
2008-05-17 16:40:44 +04:00
|
|
|
#define tcg_gen_ext8u_tl tcg_gen_ext8u_i32
|
|
|
|
#define tcg_gen_ext8s_tl tcg_gen_ext8s_i32
|
|
|
|
#define tcg_gen_ext16u_tl tcg_gen_ext16u_i32
|
|
|
|
#define tcg_gen_ext16s_tl tcg_gen_ext16s_i32
|
|
|
|
#define tcg_gen_ext32u_tl tcg_gen_mov_i32
|
|
|
|
#define tcg_gen_ext32s_tl tcg_gen_mov_i32
|
2009-03-13 12:35:19 +03:00
|
|
|
#define tcg_gen_bswap16_tl tcg_gen_bswap16_i32
|
2021-06-14 00:58:05 +03:00
|
|
|
#define tcg_gen_bswap32_tl(D, S, F) tcg_gen_bswap32_i32(D, S)
|
2020-12-16 20:59:06 +03:00
|
|
|
#define tcg_gen_bswap_tl tcg_gen_bswap32_i32
|
2022-04-28 12:46:59 +03:00
|
|
|
#define tcg_gen_hswap_tl tcg_gen_hswap_i32
|
2008-09-21 22:32:28 +04:00
|
|
|
#define tcg_gen_concat_tl_i64 tcg_gen_concat_i32_i64
|
2014-06-05 01:09:11 +04:00
|
|
|
#define tcg_gen_extr_i64_tl tcg_gen_extr_i64_i32
|
TCG: add logical operations found on alpha and powerpc processors
- andc_i32/i64 t0, t1, t2
- eqv_i32/i64 t0, t1, t2
- nand_i32/i64 t0, t1, t2
- nor_i32/i64 t0, t1, t2
- orc_i32/i64 t0, t1, t2
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5501 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-21 15:28:59 +04:00
|
|
|
#define tcg_gen_andc_tl tcg_gen_andc_i32
|
|
|
|
#define tcg_gen_eqv_tl tcg_gen_eqv_i32
|
|
|
|
#define tcg_gen_nand_tl tcg_gen_nand_i32
|
|
|
|
#define tcg_gen_nor_tl tcg_gen_nor_i32
|
|
|
|
#define tcg_gen_orc_tl tcg_gen_orc_i32
|
2016-11-16 11:23:28 +03:00
|
|
|
#define tcg_gen_clz_tl tcg_gen_clz_i32
|
|
|
|
#define tcg_gen_ctz_tl tcg_gen_ctz_i32
|
|
|
|
#define tcg_gen_clzi_tl tcg_gen_clzi_i32
|
|
|
|
#define tcg_gen_ctzi_tl tcg_gen_ctzi_i32
|
2016-11-16 19:32:48 +03:00
|
|
|
#define tcg_gen_clrsb_tl tcg_gen_clrsb_i32
|
2016-11-21 13:13:39 +03:00
|
|
|
#define tcg_gen_ctpop_tl tcg_gen_ctpop_i32
|
2008-11-03 10:08:36 +03:00
|
|
|
#define tcg_gen_rotl_tl tcg_gen_rotl_i32
|
|
|
|
#define tcg_gen_rotli_tl tcg_gen_rotli_i32
|
|
|
|
#define tcg_gen_rotr_tl tcg_gen_rotr_i32
|
|
|
|
#define tcg_gen_rotri_tl tcg_gen_rotri_i32
|
2011-01-11 06:23:42 +03:00
|
|
|
#define tcg_gen_deposit_tl tcg_gen_deposit_i32
|
2016-10-17 23:21:31 +03:00
|
|
|
#define tcg_gen_deposit_z_tl tcg_gen_deposit_z_i32
|
2016-10-14 20:04:32 +03:00
|
|
|
#define tcg_gen_extract_tl tcg_gen_extract_i32
|
|
|
|
#define tcg_gen_sextract_tl tcg_gen_sextract_i32
|
2019-02-25 18:42:04 +03:00
|
|
|
#define tcg_gen_extract2_tl tcg_gen_extract2_i32
|
2021-05-12 21:54:33 +03:00
|
|
|
#define tcg_constant_tl tcg_constant_i32
|
2012-09-21 21:13:34 +04:00
|
|
|
#define tcg_gen_movcond_tl tcg_gen_movcond_i32
|
2013-02-20 11:51:56 +04:00
|
|
|
#define tcg_gen_add2_tl tcg_gen_add2_i32
|
|
|
|
#define tcg_gen_sub2_tl tcg_gen_sub2_i32
|
2013-02-20 11:51:55 +04:00
|
|
|
#define tcg_gen_mulu2_tl tcg_gen_mulu2_i32
|
|
|
|
#define tcg_gen_muls2_tl tcg_gen_muls2_i32
|
2016-09-28 00:23:52 +03:00
|
|
|
#define tcg_gen_mulsu2_tl tcg_gen_mulsu2_i32
|
2018-05-10 20:10:57 +03:00
|
|
|
#define tcg_gen_smin_tl tcg_gen_smin_i32
|
|
|
|
#define tcg_gen_umin_tl tcg_gen_umin_i32
|
|
|
|
#define tcg_gen_smax_tl tcg_gen_smax_i32
|
|
|
|
#define tcg_gen_umax_tl tcg_gen_umax_i32
|
2016-06-28 21:37:27 +03:00
|
|
|
#define tcg_gen_atomic_cmpxchg_tl tcg_gen_atomic_cmpxchg_i32
|
|
|
|
#define tcg_gen_atomic_xchg_tl tcg_gen_atomic_xchg_i32
|
|
|
|
#define tcg_gen_atomic_fetch_add_tl tcg_gen_atomic_fetch_add_i32
|
|
|
|
#define tcg_gen_atomic_fetch_and_tl tcg_gen_atomic_fetch_and_i32
|
|
|
|
#define tcg_gen_atomic_fetch_or_tl tcg_gen_atomic_fetch_or_i32
|
|
|
|
#define tcg_gen_atomic_fetch_xor_tl tcg_gen_atomic_fetch_xor_i32
|
2018-05-10 20:10:57 +03:00
|
|
|
#define tcg_gen_atomic_fetch_smin_tl tcg_gen_atomic_fetch_smin_i32
|
|
|
|
#define tcg_gen_atomic_fetch_umin_tl tcg_gen_atomic_fetch_umin_i32
|
|
|
|
#define tcg_gen_atomic_fetch_smax_tl tcg_gen_atomic_fetch_smax_i32
|
|
|
|
#define tcg_gen_atomic_fetch_umax_tl tcg_gen_atomic_fetch_umax_i32
|
2016-06-28 21:37:27 +03:00
|
|
|
#define tcg_gen_atomic_add_fetch_tl tcg_gen_atomic_add_fetch_i32
|
|
|
|
#define tcg_gen_atomic_and_fetch_tl tcg_gen_atomic_and_fetch_i32
|
|
|
|
#define tcg_gen_atomic_or_fetch_tl tcg_gen_atomic_or_fetch_i32
|
|
|
|
#define tcg_gen_atomic_xor_fetch_tl tcg_gen_atomic_xor_fetch_i32
|
2018-05-10 20:10:57 +03:00
|
|
|
#define tcg_gen_atomic_smin_fetch_tl tcg_gen_atomic_smin_fetch_i32
|
|
|
|
#define tcg_gen_atomic_umin_fetch_tl tcg_gen_atomic_umin_fetch_i32
|
|
|
|
#define tcg_gen_atomic_smax_fetch_tl tcg_gen_atomic_smax_fetch_i32
|
|
|
|
#define tcg_gen_atomic_umax_fetch_tl tcg_gen_atomic_umax_fetch_i32
|
2017-09-14 23:53:46 +03:00
|
|
|
#define tcg_gen_dup_tl_vec tcg_gen_dup_i32_vec
|
2021-06-17 15:15:53 +03:00
|
|
|
#define tcg_gen_dup_tl tcg_gen_dup_i32
|
2023-03-28 04:44:05 +03:00
|
|
|
|
|
|
|
#define dup_const_tl(VECE, C) \
|
|
|
|
(__builtin_constant_p(VECE) \
|
|
|
|
? ( (VECE) == MO_8 ? 0x01010101ul * (uint8_t)(C) \
|
|
|
|
: (VECE) == MO_16 ? 0x00010001ul * (uint16_t)(C) \
|
|
|
|
: (VECE) == MO_32 ? 0x00000001ul * (uint32_t)(C) \
|
|
|
|
: (qemu_build_not_reached_always(), 0)) \
|
|
|
|
: (target_long)dup_const(VECE, C))
|
2018-11-08 15:52:56 +03:00
|
|
|
|
2023-03-29 04:17:24 +03:00
|
|
|
#endif /* TARGET_LONG_BITS == 64 */
|
2018-11-08 15:52:56 +03:00
|
|
|
#endif /* TCG_TCG_OP_H */
|