+2011-07-04 Georg-Johann Lay <avr@gjlay.de>
+
+ * longlong.h (count_leading_zeros, count_trailing_zeros,
+ COUNT_LEADING_ZEROS_0): Define for target avr if W_TYPE_SIZE is 16
+ resp. 64.
+
2011-07-03 Ira Rosen <ira.rosen@linaro.org>
PR tree-optimization/49610
#define COUNT_LEADING_ZEROS_0 32
#endif
-#if defined (__AVR__) && W_TYPE_SIZE == 32
+#if defined (__AVR__)
+
+#if W_TYPE_SIZE == 16
+#define count_leading_zeros(COUNT,X) ((COUNT) = __builtin_clz (X))
+#define count_trailing_zeros(COUNT,X) ((COUNT) = __builtin_ctz (X))
+#define COUNT_LEADING_ZEROS_0 16
+#endif /* W_TYPE_SIZE == 16 */
+
+#if W_TYPE_SIZE == 32
#define count_leading_zeros(COUNT,X) ((COUNT) = __builtin_clzl (X))
#define count_trailing_zeros(COUNT,X) ((COUNT) = __builtin_ctzl (X))
#define COUNT_LEADING_ZEROS_0 32
-#endif /* defined (__AVR__) && W_TYPE_SIZE == 32 */
+#endif /* W_TYPE_SIZE == 32 */
+
+#if W_TYPE_SIZE == 64
+#define count_leading_zeros(COUNT,X) ((COUNT) = __builtin_clzll (X))
+#define count_trailing_zeros(COUNT,X) ((COUNT) = __builtin_ctzll (X))
+#define COUNT_LEADING_ZEROS_0 64
+#endif /* W_TYPE_SIZE == 64 */
+
+#endif /* defined (__AVR__) */
#if defined (__CRIS__) && __CRIS_arch_version >= 3
#define count_leading_zeros(COUNT, X) ((COUNT) = __builtin_clz (X))
+2011-07-04 Georg-Johann Lay <avr@gjlay.de>
+
+ * config/avr/t-avr (intfuncs16): Add _clrsbXX2.
+
2011-06-28 Nick Clifton <nickc@redhat.com>
* config.host: Recognize all V850 variants.
# Extra 16-bit integer functions.
-intfuncs16 = _absvXX2 _addvXX3 _subvXX3 _mulvXX3 _negvXX2
+intfuncs16 = _absvXX2 _addvXX3 _subvXX3 _mulvXX3 _negvXX2 _clrsbXX2
hiintfuncs16 = $(subst XX,hi,$(intfuncs16))
siintfuncs16 = $(subst XX,si,$(intfuncs16))