2 * Power ISA decode for Vector Facility instructions
4 * Copyright (c) 2021 Instituto de Pesquisas Eldorado (eldorado.org.br)
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
20 static bool trans_VCFUGED(DisasContext *ctx, arg_VX *a)
22 TCGv_i64 tgt, src, mask;
24 REQUIRE_INSNS_FLAGS2(ctx, ISA310);
27 tgt = tcg_temp_new_i64();
28 src = tcg_temp_new_i64();
29 mask = tcg_temp_new_i64();
31 /* centrifuge lower double word */
32 get_cpu_vsrl(src, a->vra + 32);
33 get_cpu_vsrl(mask, a->vrb + 32);
34 gen_helper_cfuged(tgt, src, mask);
35 set_cpu_vsrl(a->vrt + 32, tgt);
37 /* centrifuge higher double word */
38 get_cpu_vsrh(src, a->vra + 32);
39 get_cpu_vsrh(mask, a->vrb + 32);
40 gen_helper_cfuged(tgt, src, mask);
41 set_cpu_vsrh(a->vrt + 32, tgt);
43 tcg_temp_free_i64(tgt);
44 tcg_temp_free_i64(src);
45 tcg_temp_free_i64(mask);