diff options
author | Aurelien Jarno <aurelien@aurel32.net> | 2017-06-01 00:01:24 +0200 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2017-06-06 15:20:43 -0700 |
commit | 1a35f08a222f33e1ef5890c8acf0a862df5a56aa (patch) | |
tree | 5bf35c2ddba110b7ad5092ebe1909e3d2d501627 /target/s390x/translate.c | |
parent | 4e256bef6552ee0b4c0c844077b44e4c7fcc05fc (diff) |
target/s390x: implement UNPACK ASCII
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Message-Id: <20170531220129.27724-26-aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target/s390x/translate.c')
-rw-r--r-- | target/s390x/translate.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/target/s390x/translate.c b/target/s390x/translate.c index 7e01c40394..cd5cbd18c8 100644 --- a/target/s390x/translate.c +++ b/target/s390x/translate.c @@ -4349,6 +4349,23 @@ static ExitStatus op_unpk(DisasContext *s, DisasOps *o) return NO_EXIT; } +static ExitStatus op_unpka(DisasContext *s, DisasOps *o) +{ + int l1 = get_field(s->fields, l1) + 1; + TCGv_i32 l; + + /* The length must not exceed 32 bytes. */ + if (l1 > 32) { + gen_program_exception(s, PGM_SPECIFICATION); + return EXIT_NORETURN; + } + l = tcg_const_i32(l1); + gen_helper_unpka(cc_op, cpu_env, o->addr1, l, o->in2); + tcg_temp_free_i32(l); + set_cc_static(s); + return NO_EXIT; +} + static ExitStatus op_xc(DisasContext *s, DisasOps *o) { int d1 = get_field(s->fields, d1); |