aboutsummaryrefslogtreecommitdiff
path: root/target-i386/cc_helper_template.h
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2013-01-23 16:44:37 -0800
committerRichard Henderson <rth@twiddle.net>2013-02-18 15:52:05 -0800
commitbc4b43dc2fe88712ad921c05fc1ab9ebc4cb6778 (patch)
tree125552316f32948a4db967277e9e6520e9f35c3a /target-i386/cc_helper_template.h
parentc7ab7565bc6d52cc140230aa4d0533d13d89c8b1 (diff)
target-i386: Implement BLSR, BLSMSK, BLSI
Do all of group 17 at one time for ease. Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target-i386/cc_helper_template.h')
-rw-r--r--target-i386/cc_helper_template.h18
1 files changed, 18 insertions, 0 deletions
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