This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] longlong.h: Fix count_leading_zeros for mc68020.


Attached is a patch to fix count_leading_zeros for mc68020.

count_leading_zeros fails to assemble because '{' and '}' in the
assembly are understood as the special characters for assembly

The patch fixes the problem by replacing '{' and '}' with '%{' and
'%}', respectively.

I didn't catch this in my previous patch because I was building gcc
with --with-arch=cf.

Tested by building m68k-elf.  Committed as obvious.

Kazu Hirata

2007-10-09  Kazu Hirata  <>

	* longlong.h (count_leading_zeros): Replace '{' and '}' with '%{'
	and '%}', respectively.

Index: longlong.h
--- longlong.h	(revision 129167)
+++ longlong.h	(working copy)
@@ -553,7 +553,7 @@ UDItype __umulsidi3 (USItype, USItype);
    cpu32 disguises as a 68020, but lacks them.  */
 #if defined (__mc68020__) && !defined (__mcpu32__)
 #define count_leading_zeros(count, x) \
-  __asm__ ("bfffo %1{%b2:%b2},%0"					\
+  __asm__ ("bfffo %1%{%b2:%b2%},%0"					\
 	   : "=d" ((USItype) (count))					\
 	   : "od" ((USItype) (x)), "n" (0))
 /* Some ColdFire architectures have a ff1 instruction supported via

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]