diff options
Diffstat (limited to 'target/s390x/translate.c')
-rw-r--r-- | target/s390x/translate.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/target/s390x/translate.c b/target/s390x/translate.c index 493931147d..7e01c40394 100644 --- a/target/s390x/translate.c +++ b/target/s390x/translate.c @@ -3315,6 +3315,22 @@ static ExitStatus op_pka(DisasContext *s, DisasOps *o) return NO_EXIT; } +static ExitStatus op_pku(DisasContext *s, DisasOps *o) +{ + int l2 = get_field(s->fields, l2) + 1; + TCGv_i32 l; + + /* The length must be even and should not exceed 64 bytes. */ + if ((l2 & 1) || (l2 > 64)) { + gen_program_exception(s, PGM_SPECIFICATION); + return EXIT_NORETURN; + } + l = tcg_const_i32(l2); + gen_helper_pku(cpu_env, o->addr1, o->in2, l); + tcg_temp_free_i32(l); + return NO_EXIT; +} + static ExitStatus op_popcnt(DisasContext *s, DisasOps *o) { gen_helper_popcnt(o->out, o->in2); |