summaryrefslogtreecommitdiff
path: root/target/s390x/cpu_features.h
diff options
context:
space:
mode:
Diffstat (limited to 'target/s390x/cpu_features.h')
-rw-r--r--target/s390x/cpu_features.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/target/s390x/cpu_features.h b/target/s390x/cpu_features.h
index 770435e0cc..e306aa7ab2 100644
--- a/target/s390x/cpu_features.h
+++ b/target/s390x/cpu_features.h
@@ -93,4 +93,12 @@ const S390FeatGroupDef *s390_feat_group_def(S390FeatGroup group);
#define BE_BIT_NR(BIT) (BIT ^ (BITS_PER_LONG - 1))
+static inline void set_be_bit(unsigned int bit_nr, uint8_t *array)
+{
+ array[bit_nr / 8] |= 0x80 >> (bit_nr % 8);
+}
+static inline bool test_be_bit(unsigned int bit_nr, const uint8_t *array)
+{
+ return array[bit_nr / 8] & (0x80 >> (bit_nr % 8));
+}
#endif /* TARGET_S390X_CPU_FEATURES_H */