
- put /*comments symbols*/ around any chars after #endif. Other compilers do not get it. - fix cases in which a pointer is cast to a 32-bit int, then back to a pointer. This breaks on a machine with 64-bit pointers. Examples: FPU_sub arg 2 and FPU_div arg 2. The int->ptr->int conversions are now done more safely by macros REGNO2PTR and PTR2INT. - use GCC_ATTRIBUTE macro instead of __attribute__. For compilers that do not support __attribute__, the macro can be defined to be nothing. - in fpu_entry.c, arg1 of FPU_load_int32 is (s32*), but the calls to it cast their data to (u32*). - if compiler does NOT inline functions in poly.h, the "extern inline" setting caused duplicate symbols to be created. Changed them to "static inline" so that the mul_32_32 from different .c files do not conflict. - implemented setcc so that it doesn't use curly brackets inside parens - comment out sigcontext structure definition, which conflicts with non-linux or non-intel operating systems. It's not used by bochs anyway.
55 lines
1.1 KiB
C
55 lines
1.1 KiB
C
#ifndef _LINUX_LINKAGE_H
|
|
#define _LINUX_LINKAGE_H
|
|
|
|
#ifdef __cplusplus
|
|
#define CPP_ASMLINKAGE extern "C"
|
|
#else
|
|
#define CPP_ASMLINKAGE
|
|
#endif
|
|
|
|
#if defined __i386__ && (__GNUC__ > 2 || __GNUC_MINOR__ > 7)
|
|
#define asmlinkage CPP_ASMLINKAGE GCC_ATTRIBUTE((regparm(0)))
|
|
#else
|
|
#define asmlinkage CPP_ASMLINKAGE
|
|
#endif
|
|
|
|
#define SYMBOL_NAME_STR(X) #X
|
|
#define SYMBOL_NAME(X) X
|
|
#ifdef __STDC__
|
|
#define SYMBOL_NAME_LABEL(X) X##:
|
|
#else
|
|
#define SYMBOL_NAME_LABEL(X) X/**/:
|
|
#endif
|
|
|
|
#ifdef __arm__
|
|
#define __ALIGN .align 0
|
|
#define __ALIGN_STR ".align 0"
|
|
#else
|
|
#ifdef __mc68000__
|
|
#define __ALIGN .align 4
|
|
#define __ALIGN_STR ".align 4"
|
|
#else
|
|
#if !defined(__i486__) && !defined(__i586__)
|
|
#define __ALIGN .align 4,0x90
|
|
#define __ALIGN_STR ".align 4,0x90"
|
|
#else /* __i486__/__i586__ */
|
|
#define __ALIGN .align 16,0x90
|
|
#define __ALIGN_STR ".align 16,0x90"
|
|
#endif /* __i486__/__i586__ */
|
|
#endif /* __mc68000__ */
|
|
#endif /* __arm__ */
|
|
|
|
#ifdef __ASSEMBLY__
|
|
|
|
#define ALIGN __ALIGN
|
|
#define ALIGN_STR __ALIGN_STR
|
|
|
|
#define ENTRY(name) \
|
|
.globl SYMBOL_NAME(name); \
|
|
ALIGN; \
|
|
SYMBOL_NAME_LABEL(name)
|
|
|
|
#endif
|
|
|
|
#endif
|