1/*
2 * Power ISA Decode For BHRB Instructions
3 *
4 *  Copyright IBM Corp. 2023
5 *
6 * Authors:
7 *  Glenn Miles      <milesg@linux.vnet.ibm.com>
8 *
9 * This work is licensed under the terms of the GNU GPL, version 2 or later.
10 * See the COPYING file in the top-level directory.
11 */
12
13#if defined(TARGET_PPC64) && !defined(CONFIG_USER_ONLY)
14
15static bool trans_MFBHRBE(DisasContext *ctx, arg_XFX_bhrbe *arg)
16{
17    REQUIRE_INSNS_FLAGS2(ctx, ISA207S);
18    TCGv_i32 bhrbe = tcg_constant_i32(arg->bhrbe);
19    gen_helper_mfbhrbe(cpu_gpr[arg->rt], tcg_env, bhrbe);
20    return true;
21}
22
23static bool trans_CLRBHRB(DisasContext *ctx, arg_CLRBHRB *arg)
24{
25    REQUIRE_INSNS_FLAGS2(ctx, ISA207S);
26    gen_helper_clrbhrb(tcg_env);
27    return true;
28}
29
30#else
31
32static bool trans_MFBHRBE(DisasContext *ctx, arg_XFX_bhrbe *arg)
33{
34    gen_invalid(ctx);
35    return true;
36}
37
38static bool trans_CLRBHRB(DisasContext *ctx, arg_CLRBHRB *arg)
39{
40    gen_invalid(ctx);
41    return true;
42}
43#endif
44