qemu/target-tricore/helper.h
<<
>>
Prefs
   1/*
   2 *  Copyright (c) 2012-2014 Bastian Koppelmann C-Lab/University Paderborn
   3 *
   4 * This library is free software; you can redistribute it and/or
   5 * modify it under the terms of the GNU Lesser General Public
   6 * License as published by the Free Software Foundation; either
   7 * version 2 of the License, or (at your option) any later version.
   8 *
   9 * This library is distributed in the hope that it will be useful,
  10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  12 * Lesser General Public License for more details.
  13 *
  14 * You should have received a copy of the GNU Lesser General Public
  15 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  16 */
  17
  18/* Arithmetic */
  19DEF_HELPER_3(add_ssov, i32, env, i32, i32)
  20DEF_HELPER_3(add64_ssov, i64, env, i64, i64)
  21DEF_HELPER_3(add_suov, i32, env, i32, i32)
  22DEF_HELPER_3(add_h_ssov, i32, env, i32, i32)
  23DEF_HELPER_3(add_h_suov, i32, env, i32, i32)
  24DEF_HELPER_4(addr_h_ssov, i32, env, i64, i32, i32)
  25DEF_HELPER_4(addsur_h_ssov, i32, env, i64, i32, i32)
  26DEF_HELPER_3(sub_ssov, i32, env, i32, i32)
  27DEF_HELPER_3(sub64_ssov, i64, env, i64, i64)
  28DEF_HELPER_3(sub_suov, i32, env, i32, i32)
  29DEF_HELPER_3(sub_h_ssov, i32, env, i32, i32)
  30DEF_HELPER_3(sub_h_suov, i32, env, i32, i32)
  31DEF_HELPER_4(subr_h_ssov, i32, env, i64, i32, i32)
  32DEF_HELPER_4(subadr_h_ssov, i32, env, i64, i32, i32)
  33DEF_HELPER_3(mul_ssov, i32, env, i32, i32)
  34DEF_HELPER_3(mul_suov, i32, env, i32, i32)
  35DEF_HELPER_3(sha_ssov, i32, env, i32, i32)
  36DEF_HELPER_3(absdif_ssov, i32, env, i32, i32)
  37DEF_HELPER_4(madd32_ssov, i32, env, i32, i32, i32)
  38DEF_HELPER_4(madd32_suov, i32, env, i32, i32, i32)
  39DEF_HELPER_4(madd64_ssov, i64, env, i32, i64, i32)
  40DEF_HELPER_5(madd64_q_ssov, i64, env, i64, i32, i32, i32)
  41DEF_HELPER_3(madd32_q_add_ssov, i32, env, i64, i64)
  42DEF_HELPER_5(maddr_q_ssov, i32, env, i32, i32, i32, i32)
  43DEF_HELPER_4(madd64_suov, i64, env, i32, i64, i32)
  44DEF_HELPER_4(msub32_ssov, i32, env, i32, i32, i32)
  45DEF_HELPER_4(msub32_suov, i32, env, i32, i32, i32)
  46DEF_HELPER_4(msub64_ssov, i64, env, i32, i64, i32)
  47DEF_HELPER_5(msub64_q_ssov, i64, env, i64, i32, i32, i32)
  48DEF_HELPER_3(msub32_q_sub_ssov, i32, env, i64, i64)
  49DEF_HELPER_5(msubr_q_ssov, i32, env, i32, i32, i32, i32)
  50DEF_HELPER_4(msub64_suov, i64, env, i32, i64, i32)
  51DEF_HELPER_3(absdif_h_ssov, i32, env, i32, i32)
  52DEF_HELPER_2(abs_ssov, i32, env, i32)
  53DEF_HELPER_2(abs_h_ssov, i32, env, i32)
  54/* hword/byte arithmetic */
  55DEF_HELPER_2(abs_b, i32, env, i32)
  56DEF_HELPER_2(abs_h, i32, env, i32)
  57DEF_HELPER_3(absdif_b, i32, env, i32, i32)
  58DEF_HELPER_3(absdif_h, i32, env, i32, i32)
  59DEF_HELPER_4(addr_h, i32, env, i64, i32, i32)
  60DEF_HELPER_4(addsur_h, i32, env, i64, i32, i32)
  61DEF_HELPER_5(maddr_q, i32, env, i32, i32, i32, i32)
  62DEF_HELPER_3(add_b, i32, env, i32, i32)
  63DEF_HELPER_3(add_h, i32, env, i32, i32)
  64DEF_HELPER_3(sub_b, i32, env, i32, i32)
  65DEF_HELPER_3(sub_h, i32, env, i32, i32)
  66DEF_HELPER_4(subr_h, i32, env, i64, i32, i32)
  67DEF_HELPER_4(subadr_h, i32, env, i64, i32, i32)
  68DEF_HELPER_5(msubr_q, i32, env, i32, i32, i32, i32)
  69DEF_HELPER_FLAGS_2(eq_b, TCG_CALL_NO_RWG_SE, i32, i32, i32)
  70DEF_HELPER_FLAGS_2(eq_h, TCG_CALL_NO_RWG_SE, i32, i32, i32)
  71DEF_HELPER_FLAGS_2(eqany_b, TCG_CALL_NO_RWG_SE, i32, i32, i32)
  72DEF_HELPER_FLAGS_2(eqany_h, TCG_CALL_NO_RWG_SE, i32, i32, i32)
  73DEF_HELPER_FLAGS_2(lt_b, TCG_CALL_NO_RWG_SE, i32, i32, i32)
  74DEF_HELPER_FLAGS_2(lt_bu, TCG_CALL_NO_RWG_SE, i32, i32, i32)
  75DEF_HELPER_FLAGS_2(lt_h, TCG_CALL_NO_RWG_SE, i32, i32, i32)
  76DEF_HELPER_FLAGS_2(lt_hu, TCG_CALL_NO_RWG_SE, i32, i32, i32)
  77DEF_HELPER_FLAGS_2(max_b, TCG_CALL_NO_RWG_SE, i32, i32, i32)
  78DEF_HELPER_FLAGS_2(max_bu, TCG_CALL_NO_RWG_SE, i32, i32, i32)
  79DEF_HELPER_FLAGS_2(max_h, TCG_CALL_NO_RWG_SE, i32, i32, i32)
  80DEF_HELPER_FLAGS_2(max_hu, TCG_CALL_NO_RWG_SE, i32, i32, i32)
  81DEF_HELPER_FLAGS_2(ixmax, TCG_CALL_NO_RWG_SE, i64, i64, i32)
  82DEF_HELPER_FLAGS_2(ixmax_u, TCG_CALL_NO_RWG_SE, i64, i64, i32)
  83DEF_HELPER_FLAGS_2(min_b, TCG_CALL_NO_RWG_SE, i32, i32, i32)
  84DEF_HELPER_FLAGS_2(min_bu, TCG_CALL_NO_RWG_SE, i32, i32, i32)
  85DEF_HELPER_FLAGS_2(min_h, TCG_CALL_NO_RWG_SE, i32, i32, i32)
  86DEF_HELPER_FLAGS_2(min_hu, TCG_CALL_NO_RWG_SE, i32, i32, i32)
  87DEF_HELPER_FLAGS_2(ixmin, TCG_CALL_NO_RWG_SE, i64, i64, i32)
  88DEF_HELPER_FLAGS_2(ixmin_u, TCG_CALL_NO_RWG_SE, i64, i64, i32)
  89/* count leading ... */
  90DEF_HELPER_FLAGS_1(clo, TCG_CALL_NO_RWG_SE, i32, i32)
  91DEF_HELPER_FLAGS_1(clo_h, TCG_CALL_NO_RWG_SE, i32, i32)
  92DEF_HELPER_FLAGS_1(clz, TCG_CALL_NO_RWG_SE, i32, i32)
  93DEF_HELPER_FLAGS_1(clz_h, TCG_CALL_NO_RWG_SE, i32, i32)
  94DEF_HELPER_FLAGS_1(cls, TCG_CALL_NO_RWG_SE, i32, i32)
  95DEF_HELPER_FLAGS_1(cls_h, TCG_CALL_NO_RWG_SE, i32, i32)
  96/* sh */
  97DEF_HELPER_FLAGS_2(sh, TCG_CALL_NO_RWG_SE, i32, i32, i32)
  98DEF_HELPER_FLAGS_2(sh_h, TCG_CALL_NO_RWG_SE, i32, i32, i32)
  99DEF_HELPER_3(sha, i32, env, i32, i32)
 100DEF_HELPER_2(sha_h, i32, i32, i32)
 101/* merge/split/parity */
 102DEF_HELPER_FLAGS_2(bmerge, TCG_CALL_NO_RWG_SE, i32, i32, i32)
 103DEF_HELPER_FLAGS_1(bsplit, TCG_CALL_NO_RWG_SE, i64, i32)
 104DEF_HELPER_FLAGS_1(parity, TCG_CALL_NO_RWG_SE, i32, i32)
 105/* float */
 106DEF_HELPER_FLAGS_4(pack, TCG_CALL_NO_RWG_SE, i32, i32, i32, i32, i32)
 107DEF_HELPER_1(unpack, i64, i32)
 108DEF_HELPER_3(fadd, i32, env, i32, i32)
 109DEF_HELPER_3(fsub, i32, env, i32, i32)
 110DEF_HELPER_3(fmul, i32, env, i32, i32)
 111DEF_HELPER_3(fdiv, i32, env, i32, i32)
 112DEF_HELPER_3(fcmp, i32, env, i32, i32)
 113DEF_HELPER_2(ftoi, i32, env, i32)
 114DEF_HELPER_2(itof, i32, env, i32)
 115/* dvinit */
 116DEF_HELPER_3(dvinit_b_13, i64, env, i32, i32)
 117DEF_HELPER_3(dvinit_b_131, i64, env, i32, i32)
 118DEF_HELPER_3(dvinit_h_13, i64, env, i32, i32)
 119DEF_HELPER_3(dvinit_h_131, i64, env, i32, i32)
 120DEF_HELPER_FLAGS_2(dvadj, TCG_CALL_NO_RWG_SE, i64, i64, i32)
 121DEF_HELPER_FLAGS_2(dvstep, TCG_CALL_NO_RWG_SE, i64, i64, i32)
 122DEF_HELPER_FLAGS_2(dvstep_u, TCG_CALL_NO_RWG_SE, i64, i64, i32)
 123DEF_HELPER_3(divide, i64, env, i32, i32)
 124DEF_HELPER_3(divide_u, i64, env, i32, i32)
 125/* mulh */
 126DEF_HELPER_FLAGS_5(mul_h, TCG_CALL_NO_RWG_SE, i64, i32, i32, i32, i32, i32)
 127DEF_HELPER_FLAGS_5(mulm_h, TCG_CALL_NO_RWG_SE, i64, i32, i32, i32, i32, i32)
 128DEF_HELPER_FLAGS_5(mulr_h, TCG_CALL_NO_RWG_SE, i32, i32, i32, i32, i32, i32)
 129/* crc32 */
 130DEF_HELPER_FLAGS_2(crc32, TCG_CALL_NO_RWG_SE, i32, i32, i32)
 131/* CSA */
 132DEF_HELPER_2(call, void, env, i32)
 133DEF_HELPER_1(ret, void, env)
 134DEF_HELPER_2(bisr, void, env, i32)
 135DEF_HELPER_1(rfe, void, env)
 136DEF_HELPER_1(rfm, void, env)
 137DEF_HELPER_2(ldlcx, void, env, i32)
 138DEF_HELPER_2(lducx, void, env, i32)
 139DEF_HELPER_2(stlcx, void, env, i32)
 140DEF_HELPER_2(stucx, void, env, i32)
 141DEF_HELPER_1(svlcx, void, env)
 142DEF_HELPER_1(svucx, void, env)
 143DEF_HELPER_1(rslcx, void, env)
 144/* Address mode helper */
 145DEF_HELPER_1(br_update, i32, i32)
 146DEF_HELPER_2(circ_update, i32, i32, i32)
 147/* PSW cache helper */
 148DEF_HELPER_2(psw_write, void, env, i32)
 149DEF_HELPER_1(psw_read, i32, env)
 150/* Exceptions */
 151DEF_HELPER_3(raise_exception_sync, noreturn, env, i32, i32)
 152