diff options
author | Aurelien Jarno <aurelien@aurel32.net> | 2017-06-01 00:01:03 +0200 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2017-06-06 14:34:32 -0700 |
commit | 6699adfc1824d420e14aacbb86712264cfcaa1ce (patch) | |
tree | 0cb437bd5c8d59b091a8991ba375d8ed99ce330f /target/s390x/translate.c | |
parent | 1f58720c5fd033e4e2de1d047020b43a3cb3aa1b (diff) |
target/s390x: implement TEST AND SET
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Message-Id: <20170531220129.27724-5-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 | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/target/s390x/translate.c b/target/s390x/translate.c index 0a1b3b3d07..2d45132745 100644 --- a/target/s390x/translate.c +++ b/target/s390x/translate.c @@ -4134,6 +4134,16 @@ static ExitStatus op_trt(DisasContext *s, DisasOps *o) return NO_EXIT; } +static ExitStatus op_ts(DisasContext *s, DisasOps *o) +{ + TCGv_i32 t1 = tcg_const_i32(0xff); + tcg_gen_atomic_xchg_i32(t1, o->in2, t1, get_mem_index(s), MO_UB); + tcg_gen_extract_i32(cc_op, t1, 7, 1); + tcg_temp_free_i32(t1); + set_cc_static(s); + return NO_EXIT; +} + static ExitStatus op_unpk(DisasContext *s, DisasOps *o) { TCGv_i32 l = tcg_const_i32(get_field(s->fields, l1)); |