summaryrefslogtreecommitdiff
path: root/target-alpha/translate.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2015-08-05 11:04:11 -0700
committerRichard Henderson <rth@twiddle.net>2015-08-18 09:11:12 -0700
commit112e4518f0d38fc3c52e55c7d7e77b66a295ec2b (patch)
treefc55cbf2eebfa7d52d0702222ee0cbac570f3af1 /target-alpha/translate.c
parent5f2a80adc6fd2b2e4e0579a6613a9913e3cc9a05 (diff)
target-alpha: Special case cmpbge with zero
Knowing the comparator is zero leads to a simpler operation. Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target-alpha/translate.c')
-rw-r--r--target-alpha/translate.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/target-alpha/translate.c b/target-alpha/translate.c
index 81d4ff827c..b766ae3daa 100644
--- a/target-alpha/translate.c
+++ b/target-alpha/translate.c
@@ -1507,7 +1507,12 @@ static ExitStatus translate_one(DisasContext *ctx, uint32_t insn)
break;
case 0x0F:
/* CMPBGE */
- gen_helper_cmpbge(vc, va, vb);
+ if (ra == 31) {
+ /* Special case 0 >= X as X == 0. */
+ gen_helper_cmpbe0(vc, vb);
+ } else {
+ gen_helper_cmpbge(vc, va, vb);
+ }
break;
case 0x12:
/* S8ADDL */