2023-03-29 03:17:24 +02:00
|
|
|
/* SPDX-License-Identifier: MIT */
|
2008-02-01 11:05:41 +01:00
|
|
|
/*
|
2023-03-29 03:17:24 +02:00
|
|
|
* Target dependent opcode generation functions.
|
2008-02-01 11:05:41 +01:00
|
|
|
*
|
|
|
|
* Copyright (c) 2008 Fabrice Bellard
|
|
|
|
*/
|
2014-09-19 20:39:20 +02:00
|
|
|
|
2018-11-08 13:52:56 +01:00
|
|
|
#ifndef TCG_TCG_OP_H
|
|
|
|
#define TCG_TCG_OP_H
|
|
|
|
|
2023-03-29 03:17:24 +02:00
|
|
|
#include "tcg/tcg-op-common.h"
|
2008-02-01 11:05:41 +01:00
|
|
|
|
2014-09-19 20:39:20 +02:00
|
|
|
#ifndef TARGET_LONG_BITS
|
|
|
|
#error must include QEMU headers
|
|
|
|
#endif
|
2008-02-01 11:05:41 +01:00
|
|
|
|
2023-04-28 10:16:01 +02: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 06:30:31 +02:00
|
|
|
#ifndef TARGET_INSN_START_EXTRA_WORDS
|
2015-08-30 18:21:33 +02:00
|
|
|
static inline void tcg_gen_insn_start(target_ulong pc)
|
2008-02-01 11:05:41 +01:00
|
|
|
{
|
2023-03-08 21:24:41 +01: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 18:21:33 +02:00
|
|
|
}
|
2023-04-01 06:30:31 +02:00
|
|
|
#elif TARGET_INSN_START_EXTRA_WORDS == 1
|
2015-08-30 18:21:33 +02:00
|
|
|
static inline void tcg_gen_insn_start(target_ulong pc, target_ulong a1)
|
|
|
|
{
|
2023-03-08 21:24:41 +01: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 18:21:33 +02:00
|
|
|
}
|
2023-04-01 06:30:31 +02:00
|
|
|
#elif TARGET_INSN_START_EXTRA_WORDS == 2
|
2015-08-30 18:21:33 +02:00
|
|
|
static inline void tcg_gen_insn_start(target_ulong pc, target_ulong a1,
|
|
|
|
target_ulong a2)
|
|
|
|
{
|
2023-03-08 21:24:41 +01: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 18:21:33 +02:00
|
|
|
}
|
2014-09-19 20:39:20 +02:00
|
|
|
#else
|
2023-04-01 06:30:31 +02:00
|
|
|
#error Unhandled TARGET_INSN_START_EXTRA_WORDS value
|
2014-09-19 20:39:20 +02:00
|
|
|
#endif
|
2008-02-01 11:05:41 +01:00
|
|
|
|
2008-11-17 15:43:54 +01:00
|
|
|
#if TARGET_LONG_BITS == 32
|
2023-03-28 03:44:05 +02:00
|
|
|
typedef TCGv_i32 TCGv;
|
2008-11-17 15:43:54 +01: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 00:46:55 +01:00
|
|
|
#define tcgv_tl_temp tcgv_i32_temp
|
2013-09-04 17:11:05 +02: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 03:44:05 +02:00
|
|
|
#elif TARGET_LONG_BITS == 64
|
|
|
|
typedef TCGv_i64 TCGv;
|
2008-11-17 15:43:54 +01: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 00:46:55 +01:00
|
|
|
#define tcgv_tl_temp tcgv_i64_temp
|
2013-09-04 17:11:05 +02: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 03:44:05 +02:00
|
|
|
#else
|
|
|
|
#error Unhandled TARGET_LONG_BITS value
|
2008-11-17 15:43:54 +01:00
|
|
|
#endif
|
|
|
|
|
2023-03-15 00:46:55 +01: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 11:05:41 +01:00
|
|
|
|
2023-03-29 02:25:10 +02: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 20:37:27 +02:00
|
|
|
|
2008-02-24 08:45:43 +01: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 16:35:37 +02:00
|
|
|
#define tcg_gen_neg_tl tcg_gen_neg_i64
|
2019-04-18 01:51:29 +02:00
|
|
|
#define tcg_gen_abs_tl tcg_gen_abs_i64
|
2008-11-02 14:26:16 +01:00
|
|
|
#define tcg_gen_subfi_tl tcg_gen_subfi_i64
|
2008-02-24 08:45:43 +01: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 14:40:44 +02:00
|
|
|
#define tcg_gen_not_tl tcg_gen_not_i64
|
2008-02-24 08:45:43 +01: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 19:20:59 +01:00
|
|
|
#define tcg_gen_brcond_tl tcg_gen_brcond_i64
|
2008-05-24 04:22:00 +02:00
|
|
|
#define tcg_gen_brcondi_tl tcg_gen_brcondi_i64
|
2010-01-07 19:13:31 +01:00
|
|
|
#define tcg_gen_setcond_tl tcg_gen_setcond_i64
|
2010-02-08 12:06:05 +01:00
|
|
|
#define tcg_gen_setcondi_tl tcg_gen_setcondi_i64
|
2023-08-05 01:24:04 +02:00
|
|
|
#define tcg_gen_negsetcond_tl tcg_gen_negsetcond_i64
|
2008-05-04 10:14:08 +02:00
|
|
|
#define tcg_gen_mul_tl tcg_gen_mul_i64
|
|
|
|
#define tcg_gen_muli_tl tcg_gen_muli_i64
|
2009-03-29 03:19:22 +02:00
|
|
|
#define tcg_gen_div_tl tcg_gen_div_i64
|
|
|
|
#define tcg_gen_rem_tl tcg_gen_rem_i64
|
2009-03-29 16:08:54 +02:00
|
|
|
#define tcg_gen_divu_tl tcg_gen_divu_i64
|
|
|
|
#define tcg_gen_remu_tl tcg_gen_remu_i64
|
2008-03-16 20:16:37 +01:00
|
|
|
#define tcg_gen_discard_tl tcg_gen_discard_i64
|
2015-07-24 20:49:53 +02:00
|
|
|
#define tcg_gen_trunc_tl_i32 tcg_gen_extrl_i64_i32
|
2008-03-22 09:39:04 +01: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 14:40:44 +02: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 10:35:19 +01: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 18:59:06 +01:00
|
|
|
#define tcg_gen_bswap_tl tcg_gen_bswap64_i64
|
2022-04-28 11:46:59 +02:00
|
|
|
#define tcg_gen_hswap_tl tcg_gen_hswap_i64
|
|
|
|
#define tcg_gen_wswap_tl tcg_gen_wswap_i64
|
2008-09-21 20:32:28 +02:00
|
|
|
#define tcg_gen_concat_tl_i64 tcg_gen_concat32_i64
|
2013-02-20 08:51:54 +01: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 13:28:59 +02: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 09:23:28 +01: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 17:32:48 +01:00
|
|
|
#define tcg_gen_clrsb_tl tcg_gen_clrsb_i64
|
2016-11-21 11:13:39 +01:00
|
|
|
#define tcg_gen_ctpop_tl tcg_gen_ctpop_i64
|
2008-11-03 08:08:36 +01: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 04:23:42 +01:00
|
|
|
#define tcg_gen_deposit_tl tcg_gen_deposit_i64
|
2016-10-17 22:21:31 +02:00
|
|
|
#define tcg_gen_deposit_z_tl tcg_gen_deposit_z_i64
|
2016-10-14 19:04:32 +02:00
|
|
|
#define tcg_gen_extract_tl tcg_gen_extract_i64
|
|
|
|
#define tcg_gen_sextract_tl tcg_gen_sextract_i64
|
2019-02-25 16:42:04 +01:00
|
|
|
#define tcg_gen_extract2_tl tcg_gen_extract2_i64
|
2021-05-12 20:54:33 +02:00
|
|
|
#define tcg_constant_tl tcg_constant_i64
|
2012-09-21 19:13:34 +02:00
|
|
|
#define tcg_gen_movcond_tl tcg_gen_movcond_i64
|
2013-02-20 08:51:56 +01:00
|
|
|
#define tcg_gen_add2_tl tcg_gen_add2_i64
|
|
|
|
#define tcg_gen_sub2_tl tcg_gen_sub2_i64
|
2013-02-20 08:51:55 +01:00
|
|
|
#define tcg_gen_mulu2_tl tcg_gen_mulu2_i64
|
|
|
|
#define tcg_gen_muls2_tl tcg_gen_muls2_i64
|
2016-09-27 23:23:52 +02:00
|
|
|
#define tcg_gen_mulsu2_tl tcg_gen_mulsu2_i64
|
2018-05-10 19:10:57 +02: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 20:37:27 +02: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 19:10:57 +02: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 20:37:27 +02: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 19:10:57 +02: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 22:53:46 +02:00
|
|
|
#define tcg_gen_dup_tl_vec tcg_gen_dup_i64_vec
|
2021-06-17 14:15:53 +02:00
|
|
|
#define tcg_gen_dup_tl tcg_gen_dup_i64
|
2023-03-28 03:44:05 +02:00
|
|
|
#define dup_const_tl dup_const
|
2008-02-24 08:45:43 +01: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 16:35:37 +02:00
|
|
|
#define tcg_gen_neg_tl tcg_gen_neg_i32
|
2019-04-18 01:51:29 +02:00
|
|
|
#define tcg_gen_abs_tl tcg_gen_abs_i32
|
2008-11-02 09:23:04 +01:00
|
|
|
#define tcg_gen_subfi_tl tcg_gen_subfi_i32
|
2008-02-24 08:45:43 +01: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 14:40:44 +02:00
|
|
|
#define tcg_gen_not_tl tcg_gen_not_i32
|
2008-02-24 08:45:43 +01: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 19:20:59 +01:00
|
|
|
#define tcg_gen_brcond_tl tcg_gen_brcond_i32
|
2008-05-24 04:22:00 +02:00
|
|
|
#define tcg_gen_brcondi_tl tcg_gen_brcondi_i32
|
2010-01-07 19:13:31 +01:00
|
|
|
#define tcg_gen_setcond_tl tcg_gen_setcond_i32
|
2010-02-08 12:06:05 +01:00
|
|
|
#define tcg_gen_setcondi_tl tcg_gen_setcondi_i32
|
2023-08-05 01:24:04 +02:00
|
|
|
#define tcg_gen_negsetcond_tl tcg_gen_negsetcond_i32
|
2008-05-04 10:14:08 +02:00
|
|
|
#define tcg_gen_mul_tl tcg_gen_mul_i32
|
|
|
|
#define tcg_gen_muli_tl tcg_gen_muli_i32
|
2009-03-29 03:19:22 +02:00
|
|
|
#define tcg_gen_div_tl tcg_gen_div_i32
|
|
|
|
#define tcg_gen_rem_tl tcg_gen_rem_i32
|
2009-03-29 16:08:54 +02:00
|
|
|
#define tcg_gen_divu_tl tcg_gen_divu_i32
|
|
|
|
#define tcg_gen_remu_tl tcg_gen_remu_i32
|
2008-03-16 20:16:37 +01:00
|
|
|
#define tcg_gen_discard_tl tcg_gen_discard_i32
|
2008-03-22 09:39:04 +01:00
|
|
|
#define tcg_gen_trunc_tl_i32 tcg_gen_mov_i32
|
2015-07-24 20:49:53 +02:00
|
|
|
#define tcg_gen_trunc_i64_tl tcg_gen_extrl_i64_i32
|
2008-03-22 09:39:04 +01: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 14:40:44 +02: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 10:35:19 +01:00
|
|
|
#define tcg_gen_bswap16_tl tcg_gen_bswap16_i32
|
2021-06-13 23:58:05 +02:00
|
|
|
#define tcg_gen_bswap32_tl(D, S, F) tcg_gen_bswap32_i32(D, S)
|
2020-12-16 18:59:06 +01:00
|
|
|
#define tcg_gen_bswap_tl tcg_gen_bswap32_i32
|
2022-04-28 11:46:59 +02:00
|
|
|
#define tcg_gen_hswap_tl tcg_gen_hswap_i32
|
2008-09-21 20:32:28 +02:00
|
|
|
#define tcg_gen_concat_tl_i64 tcg_gen_concat_i32_i64
|
2014-06-04 23:09:11 +02: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 13:28:59 +02: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 09:23:28 +01: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 17:32:48 +01:00
|
|
|
#define tcg_gen_clrsb_tl tcg_gen_clrsb_i32
|
2016-11-21 11:13:39 +01:00
|
|
|
#define tcg_gen_ctpop_tl tcg_gen_ctpop_i32
|
2008-11-03 08:08:36 +01: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 04:23:42 +01:00
|
|
|
#define tcg_gen_deposit_tl tcg_gen_deposit_i32
|
2016-10-17 22:21:31 +02:00
|
|
|
#define tcg_gen_deposit_z_tl tcg_gen_deposit_z_i32
|
2016-10-14 19:04:32 +02:00
|
|
|
#define tcg_gen_extract_tl tcg_gen_extract_i32
|
|
|
|
#define tcg_gen_sextract_tl tcg_gen_sextract_i32
|
2019-02-25 16:42:04 +01:00
|
|
|
#define tcg_gen_extract2_tl tcg_gen_extract2_i32
|
2021-05-12 20:54:33 +02:00
|
|
|
#define tcg_constant_tl tcg_constant_i32
|
2012-09-21 19:13:34 +02:00
|
|
|
#define tcg_gen_movcond_tl tcg_gen_movcond_i32
|
2013-02-20 08:51:56 +01:00
|
|
|
#define tcg_gen_add2_tl tcg_gen_add2_i32
|
|
|
|
#define tcg_gen_sub2_tl tcg_gen_sub2_i32
|
2013-02-20 08:51:55 +01:00
|
|
|
#define tcg_gen_mulu2_tl tcg_gen_mulu2_i32
|
|
|
|
#define tcg_gen_muls2_tl tcg_gen_muls2_i32
|
2016-09-27 23:23:52 +02:00
|
|
|
#define tcg_gen_mulsu2_tl tcg_gen_mulsu2_i32
|
2018-05-10 19:10:57 +02: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 20:37:27 +02: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 19:10:57 +02: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 20:37:27 +02: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 19:10:57 +02: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 22:53:46 +02:00
|
|
|
#define tcg_gen_dup_tl_vec tcg_gen_dup_i32_vec
|
2021-06-17 14:15:53 +02:00
|
|
|
#define tcg_gen_dup_tl tcg_gen_dup_i32
|
2023-03-28 03:44:05 +02: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 13:52:56 +01:00
|
|
|
|
2023-03-29 03:17:24 +02:00
|
|
|
#endif /* TARGET_LONG_BITS == 64 */
|
2018-11-08 13:52:56 +01:00
|
|
|
#endif /* TCG_TCG_OP_H */
|