fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / include / asm-mips / sim.h
index a88c337..67c4fe5 100644 (file)
@@ -9,17 +9,13 @@
 #ifndef _ASM_SIM_H
 #define _ASM_SIM_H
 
-#include <linux/config.h>
 
-#include <asm/offset.h>
-
-/* Used in declaration of save_static functions.  */
-#define static_unused static __attribute__((unused))
+#include <asm/asm-offsets.h>
 
 #define __str2(x) #x
 #define __str(x) __str2(x)
 
-#ifdef CONFIG_MIPS32
+#ifdef CONFIG_32BIT
 
 #define save_static_function(symbol)                                   \
 __asm__ (                                                              \
@@ -39,14 +35,15 @@ __asm__ (                                                           \
        "sw\t$22,"__str(PT_R22)"($29)\n\t"                              \
        "sw\t$23,"__str(PT_R23)"($29)\n\t"                              \
        "sw\t$30,"__str(PT_R30)"($29)\n\t"                              \
+       "j\t_" #symbol "\n\t"                                           \
        ".end\t" #symbol "\n\t"                                         \
        ".size\t" #symbol",. - " #symbol)
 
 #define nabi_no_regargs
 
-#endif /* CONFIG_MIPS32 */
+#endif /* CONFIG_32BIT */
 
-#ifdef CONFIG_MIPS64
+#ifdef CONFIG_64BIT
 
 #define save_static_function(symbol)                                   \
 __asm__ (                                                              \
@@ -66,6 +63,7 @@ __asm__ (                                                             \
        "sd\t$22,"__str(PT_R22)"($29)\n\t"                              \
        "sd\t$23,"__str(PT_R23)"($29)\n\t"                              \
        "sd\t$30,"__str(PT_R30)"($29)\n\t"                              \
+       "j\t_" #symbol "\n\t"                                           \
        ".end\t" #symbol "\n\t"                                         \
        ".size\t" #symbol",. - " #symbol)
 
@@ -79,6 +77,6 @@ __asm__ (                                                             \
        unsigned long __dummy6,                                         \
        unsigned long __dummy7,
 
-#endif /* CONFIG_MIPS64 */
+#endif /* CONFIG_64BIT */
 
 #endif /* _ASM_SIM_H */