public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch] longlong.h: Fix count_leading_zeros for mc68020.
@ 2007-10-09 16:08 Kazu Hirata
  0 siblings, 0 replies; only message in thread
From: Kazu Hirata @ 2007-10-09 16:08 UTC (permalink / raw)
  To: gcc-patches

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-10-09 16:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-09 16:08 [patch] longlong.h: Fix count_leading_zeros for mc68020 Kazu Hirata

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).