diff options
author | wiz <wiz@pkgsrc.org> | 2002-03-07 14:44:36 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2002-03-07 14:44:36 +0000 |
commit | 1ec3a88afacb18e06296721529a5d56b584f5759 (patch) | |
tree | 7ad8a874c0c62339da38382f5d2d48944a9d8bb7 /sysutils/memtest86/files | |
parent | 281db28d2b62da5a1e4768d442c9ecda6272b40b (diff) | |
download | pkgsrc-1ec3a88afacb18e06296721529a5d56b584f5759.tar.gz |
Re-import memtest as memtest86 (more similar to its original name, and
who knows, a memtest package might come soon ;).
Diffstat (limited to 'sysutils/memtest86/files')
-rw-r--r-- | sysutils/memtest86/files/linkage.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/sysutils/memtest86/files/linkage.h b/sysutils/memtest86/files/linkage.h new file mode 100644 index 00000000000..190202f0589 --- /dev/null +++ b/sysutils/memtest86/files/linkage.h @@ -0,0 +1,54 @@ +#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 __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 |