This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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] 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))


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