On 11/24/2016 12:32 PM, Nikunj A Dadhania wrote:
+#if defined(HOST_WORDS_BIGENDIAN)
+# if defined(CONFIG_INT128)
+# define VEXTULX_DO(name, size) \
+ target_ulong glue(helper_, name)(target_ulong a, ppc_avr_t *b) \
+ { \
+ int index = (a & 0xf) * 8; \
+ return int128_rshift(b->u128, index) & \
+ MAKE_64BIT_MASK(0, size); \
+ }
+# else
+# define VEXTULX_DO(name, size) \
+ target_ulong glue(helper_, name)(target_ulong a, ppc_avr_t *b) \
+ { \
+ int index = (a & 0xf) * 8; \
+ Int128 value = int128_make128(b->u64[LO_IDX], \
+ b->u64[HI_IDX]); \
+ return int128_rshift(value, index) & \
+ MAKE_64BIT_MASK(0, size); \
+ }
+# endif
Why are these duplicated?
Clearly the missed trick is that you should *never* check CONFIG_INT128 and
always rely on Int128.
r~