diff options
author | Aurelien Jarno <aurelien@aurel32.net> | 2017-06-01 00:01:17 +0200 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2017-06-06 15:20:43 -0700 |
commit | 5c2b48a8f0d02acfcb577abdbd5f3040d61455d9 (patch) | |
tree | e97876a724b055110ed0c8e533974fa89ea7efd4 /target/s390x/translate.c | |
parent | 84aa07f109f0afaeeec63c159f3a578b955c3de9 (diff) |
target/s390x: implement COMPARE LOGICAL LONG
As CLCL and CLCLE mostly differ by their operands, use a common do_clcl
helper. Another difference is that CLCL is not interruptible.
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Message-Id: <20170531220129.27724-19-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 | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/target/s390x/translate.c b/target/s390x/translate.c index ecd0a91c04..2d47f1d2b4 100644 --- a/target/s390x/translate.c +++ b/target/s390x/translate.c @@ -1920,6 +1920,27 @@ static ExitStatus op_clc(DisasContext *s, DisasOps *o) return NO_EXIT; } +static ExitStatus op_clcl(DisasContext *s, DisasOps *o) +{ + int r1 = get_field(s->fields, r1); + int r2 = get_field(s->fields, r2); + TCGv_i32 t1, t2; + + /* r1 and r2 must be even. */ + if (r1 & 1 || r2 & 1) { + gen_program_exception(s, PGM_SPECIFICATION); + return EXIT_NORETURN; + } + + t1 = tcg_const_i32(r1); + t2 = tcg_const_i32(r2); + gen_helper_clcl(cc_op, cpu_env, t1, t2); + tcg_temp_free_i32(t1); + tcg_temp_free_i32(t2); + set_cc_static(s); + return NO_EXIT; +} + static ExitStatus op_clcle(DisasContext *s, DisasOps *o) { int r1 = get_field(s->fields, r1); |