This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] longlong.h: Fix count_leading_zeros for mc68020.
- From: Kazu Hirata <kazu at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 9 Oct 2007 09:08:18 -0700
- Subject: [patch] longlong.h: Fix count_leading_zeros for mc68020.
Hi,
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
dialect.
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 <kazu@codesourcery.com>
* 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