[PATCH, ARM, libgcc] Enable longlong.h inline assembly for Thumb-2

Michael Hope michael.hope@linaro.org
Thu Mar 8 03:36:00 GMT 2012


Hi there,

This patch enables the ARM inline assembly 64 bit add, subtract, and multiply instructions
in libgcc when compiling for Thumb-2.  The existing code enables them for ARM mode as
Thumb-1 is missing the encodings.

OK for 4.8?

-- Michael

ChangeLog:

2012-03-08  Michael Hope  <michael.hope@linaro.org>

	* longlong.h [ARM] (add_ssaaaa, sub_ddmmss, umul_ppmm): Enable
	for Thumb-2.

diff --git a/libgcc/longlong.h b/libgcc/longlong.h
index 1a839dd..987820d 100644
--- a/libgcc/longlong.h
+++ b/libgcc/longlong.h
@@ -203,7 +203,8 @@ do {									\
  UDItype __umulsidi3 (USItype, USItype);
  #endif

-#if defined (__arm__) && !defined (__thumb__) && W_TYPE_SIZE == 32
+#if defined (__arm__) && (defined (__thumb2__) || !defined (__thumb__))	\
+  && W_TYPE_SIZE == 32
  #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
    __asm__ ("adds	%1, %4, %5\n\tadc	%0, %2, %3"		\
  	   : "=r" ((USItype) (sh)),					\



More information about the Gcc-patches mailing list