File: asmsparc.h

package info (click to toggle)
ffcall 1.8-4.1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 4,752 kB
  • ctags: 3,102
  • sloc: asm: 19,563; ansic: 11,737; sh: 5,402; makefile: 885
file content (29 lines) | stat: -rw-r--r-- 903 bytes parent folder | download | duplicates (25)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Assembly language support for sparc CPU.
// Bruno Haible 29.5.1999

#ifdef ASM_UNDERSCORE
// SunOS4, Linux/a.out
#ifdef __STDC__
#define C(entrypoint) _##entrypoint
#else
#define C(entrypoint) _/**/entrypoint
#endif
#else
// Solaris, Linux/ELF
#define C(entrypoint) entrypoint
#endif

// When assembly language code is compiled into a shared library, ELF linkers
// need to know which symbols are functions.
#if defined(__NetBSD__) || defined(__OpenBSD__)
#define DECLARE_FUNCTION(name) .type C(name),@function
#elif defined(__svr4__) || defined(__ELF__)
// Solaris, Linux/ELF
// Some preprocessors keep the backslash in place, some don't.
// Some complain about the # being not in front of an ANSI C macro.
// Therefore we use a dollar, which will be sed-converted to # later.
#define DECLARE_FUNCTION(name) .type C(name),$function
#else
// SunOS4, Linux/a.out
#define DECLARE_FUNCTION(name)
#endif