diff options
author | Aurelien Jarno | 2017-05-09 10:28:00 +0200 |
---|---|---|
committer | Richard Henderson | 2017-05-13 00:48:41 +0200 |
commit | 538fad597d898f677f81cb4daacd37e7cdc18e6e (patch) | |
tree | 912208bc9cd9def1b019fe932f5272733f3ca00e /target | |
parent | target/s390x: fix SIGNAL PROCESSOR return value (diff) | |
download | qemu-538fad597d898f677f81cb4daacd37e7cdc18e6e.tar.gz qemu-538fad597d898f677f81cb4daacd37e7cdc18e6e.tar.xz qemu-538fad597d898f677f81cb4daacd37e7cdc18e6e.zip |
target/s390x: implement serialization in BRANCH CONDITION
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Message-Id: <20170509082800.10756-4-aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target')
-rw-r--r-- | target/s390x/translate.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/target/s390x/translate.c b/target/s390x/translate.c index 3a0a3ee519..4c48c593cd 100644 --- a/target/s390x/translate.c +++ b/target/s390x/translate.c @@ -1518,6 +1518,21 @@ static ExitStatus op_bc(DisasContext *s, DisasOps *o) int imm = is_imm ? get_field(s->fields, i2) : 0; DisasCompare c; + /* BCR with R2 = 0 causes no branching */ + if (have_field(s->fields, r2) && get_field(s->fields, r2) == 0) { + if (m1 == 14) { + /* Perform serialization */ + /* FIXME: check for fast-BCR-serialization facility */ + tcg_gen_mb(TCG_MO_ALL | TCG_BAR_SC); + } + if (m1 == 15) { + /* Perform serialization */ + /* FIXME: perform checkpoint-synchronisation */ + tcg_gen_mb(TCG_MO_ALL | TCG_BAR_SC); + } + return NO_EXIT; + } + disas_jcc(s, &c, m1); return help_branch(s, &c, is_imm, imm, o->in2); } |