This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
[PATCH] libgloss: bfin: fix asm constraints for raise/excpt helpers
- From: Mike Frysinger <vapier at gentoo dot org>
- To: newlib <newlib at sourceware dot org>
- Date: Sat, 26 Mar 2011 23:47:03 -0400
- Subject: [PATCH] libgloss: bfin: fix asm constraints for raise/excpt helpers
the RAISE and EXPT insns take a constant, not a register. so make
sure the asm constraints reflect this.
2011-03-26 Mike Frysinger <vapier@gentoo.org>
* bfin/include/builtins.h (__builtin_raise): Change constraint to i.
(__builtin_excpt): Likewise.
-mike
--- libgloss/bfin/include/builtins.h
+++ libgloss/bfin/include/builtins.h
@@ -34,8 +34,8 @@
#define __builtin_cli() ({ unsigned int __rval; __asm__
__volatile__ ("cli %0;" : "=r"(__rval)); __rval; })
#define __builtin_sti(x) __asm__ __volatile__ ("sti %0;" : : "r"(x))
#define __builtin_idle() __asm__ __volatile__ ("IDLE;")
-#define __builtin_raise(x) __asm__ __volatile__ ("raise %0;"
: : "r"(x))
-#define __builtin_excpt(x) __asm__ __volatile__ ("excpt %0;"
: : "r"(x))
+#define __builtin_raise(x) __asm__ __volatile__ ("raise %0;"
: : "n"(x))
+#define __builtin_excpt(x) __asm__ __volatile__ ("excpt %0;"
: : "n"(x))
#define __builtin_prefetch(x) __asm__ __volatile__
("PREFETCH[%0];" : : "p"(x))
#define __builtin_prefetchmodup(x) ({ void *__p = &(x); __asm__
__volatile__ ("PREFETCH[%0++];" : "+p"(__p)); __p; })
#define __builtin_flushinv(x) __asm__ __volatile__
("FLUSHINV[%0];" : : "p"(x))