From d2d0cc5c32fad894689758a2d8f5a6629a295698 Mon Sep 17 00:00:00 2001 From: Michael Frysinger Date: Sun, 27 Mar 2011 03:47:30 +0000 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. --- libgloss/ChangeLog | 5 +++++ libgloss/bfin/include/builtins.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/libgloss/ChangeLog b/libgloss/ChangeLog index dcdacd281..9f562ec94 100644 --- a/libgloss/ChangeLog +++ b/libgloss/ChangeLog @@ -1,3 +1,8 @@ +2011-03-26 Mike Frysinger + + * bfin/include/builtins.h (__builtin_raise): Change constraint to i. + (__builtin_excpt): Likewise. + 2011-03-26 Mike Frysinger * bfin/Makefile.in (install-sim): Exit when install fails. diff --git a/libgloss/bfin/include/builtins.h b/libgloss/bfin/include/builtins.h index 7c9ece5b3..d33d2e952 100644 --- a/libgloss/bfin/include/builtins.h +++ b/libgloss/bfin/include/builtins.h @@ -34,8 +34,8 @@ extern "C" { #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))