From bc4b43dc2fe88712ad921c05fc1ab9ebc4cb6778 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 23 Jan 2013 16:44:37 -0800 Subject: target-i386: Implement BLSR, BLSMSK, BLSI Do all of group 17 at one time for ease. Signed-off-by: Richard Henderson --- target-i386/cc_helper_template.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'target-i386/cc_helper_template.h') diff --git a/target-i386/cc_helper_template.h b/target-i386/cc_helper_template.h index 87f47d2e97..607311f195 100644 --- a/target-i386/cc_helper_template.h +++ b/target-i386/cc_helper_template.h @@ -217,6 +217,24 @@ static int glue(compute_all_mul, SUFFIX)(DATA_TYPE dst, target_long src1) return cf | pf | af | zf | sf | of; } +static int glue(compute_all_bmilg, SUFFIX)(DATA_TYPE dst, DATA_TYPE src1) +{ + int cf, pf, af, zf, sf, of; + + cf = (src1 == 0); + pf = 0; /* undefined */ + af = 0; /* undefined */ + zf = (dst == 0) * CC_Z; + sf = lshift(dst, 8 - DATA_BITS) & CC_S; + of = 0; + return cf | pf | af | zf | sf | of; +} + +static int glue(compute_c_bmilg, SUFFIX)(DATA_TYPE dst, DATA_TYPE src1) +{ + return src1 == 0; +} + #undef DATA_BITS #undef SIGN_MASK #undef DATA_TYPE -- cgit v1.2.1