From 112e4518f0d38fc3c52e55c7d7e77b66a295ec2b Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 5 Aug 2015 11:04:11 -0700 Subject: target-alpha: Special case cmpbge with zero Knowing the comparator is zero leads to a simpler operation. Signed-off-by: Richard Henderson --- target-alpha/translate.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'target-alpha/translate.c') 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 */ -- cgit v1.2.3