diff options
author | Aurelien Jarno <aurelien@aurel32.net> | 2017-06-01 00:01:22 +0200 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2017-06-06 15:20:43 -0700 |
commit | 3bd3d6d302bd5a86a103a228b6d708025db4dcc2 (patch) | |
tree | a7c49fa4483b7b4d01c6f2e8904b9cb7486d2fcc /target/s390x/translate.c | |
parent | 16f2e4b841799c6a25631753a495ea2c82510651 (diff) | |
download | qemu-3bd3d6d302bd5a86a103a228b6d708025db4dcc2.zip qemu-3bd3d6d302bd5a86a103a228b6d708025db4dcc2.tar.gz qemu-3bd3d6d302bd5a86a103a228b6d708025db4dcc2.tar.bz2 |
target/s390x: implement PACK ASCII
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Message-Id: <20170531220129.27724-24-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 | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/target/s390x/translate.c b/target/s390x/translate.c index 4f1a50e..4939311 100644 --- a/target/s390x/translate.c +++ b/target/s390x/translate.c @@ -3299,6 +3299,22 @@ static ExitStatus op_pack(DisasContext *s, DisasOps *o) return NO_EXIT; } +static ExitStatus op_pka(DisasContext *s, DisasOps *o) +{ + int l2 = get_field(s->fields, l2) + 1; + TCGv_i32 l; + + /* The length must not exceed 32 bytes. */ + if (l2 > 32) { + gen_program_exception(s, PGM_SPECIFICATION); + return EXIT_NORETURN; + } + l = tcg_const_i32(l2); + gen_helper_pka(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); |