File: beecrypt.gas.h

package info (click to toggle)
beecrypt 2.2.0-pre1-5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,820 kB
  • ctags: 1,325
  • sloc: ansic: 12,215; sh: 9,073; asm: 2,715; makefile: 80
file content (82 lines) | stat: -rw-r--r-- 1,818 bytes parent folder | download | duplicates (2)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#ifndef _BEECRYPT_GAS_H
#define _BEECRYPT_GAS_H

#include "beecrypt.gnu.h"

#ifndef C_FUNCTION_NAME
# if LEADING_UNDERSCORE
#  ifdef __STDC__
#   define C_FUNCTION_NAME(name)	_##name
#  else
#   define C_FUNCTION_NAME(name)	_/**/name
#  endif
# else
#  define C_FUNCTION_NAME(name)	name
# endif
#endif

#if defined(OPTIMIZE_ALPHA)
# define ALIGNMENT	5
#elif defined(OPTIMIZE_I386) || defined(OPTIMIZE_I486) || defined(OPTIMIZE_I586) || defined(OPTIMIZE_I686) 
# define ALIGNMENT	8
#elif defined(OPTIMIZE_IA64)
# define ALIGNMENT	32
#elif defined(OPTIMIZE_ARM)
# define ALIGNMENT	4
#elif defined(OPTIMIZE_POWERPC)
# define ALIGNMENT	8
#elif defined(OPTIMIZE_SPARCV8PLUS) || defined(OPTIMIZE_SPARCV9)
# define ALIGNMENT	8
#else
# define ALIGNMENT	8
#endif

#define LABEL(name) C_FUNCTION_NAME(name):
#if DARWIN
# define LOCAL(name) L##name
#else
# if __STDC__
#  define LOCAL(name) .L##name
# else
#  define LOCAL(name) .L/**/name
# endif
#endif

#if CYGWIN
# define C_FUNCTION_BEGIN(name)	\
	.align	ALIGNMENT;	\
	.globl	C_FUNCTION_NAME(name);	\
	.def	C_FUNCTION_NAME(name);	\
	.scl	2;	\
	.type	32;	\
	.endef
# define C_FUNCTION_END(name, label)
#else
# if SOLARIS
#  define C_FUNCTION_TYPE	#function
# elif defined(OPTIMIZE_ARM)
#  define C_FUNCTION_TYPE	%function
# else
#  define C_FUNCTION_TYPE	@function
# endif
# if DARWIN
#  define C_FUNCTION_BEGIN(name) \
	.globl	C_FUNCTION_NAME(name)
#  define C_FUNCTION_END(name, label)
# elif defined(OPTIMIZE_IA64)
#  define C_FUNCTION_BEGIN(name) \
	.align	ALIGNMENT; \
	.global	name#; \
	.proc	name#
#  define C_FUNCTION_END(name) \
	.endp	name#
# else
#  define C_FUNCTION_BEGIN(name) \
	.align	ALIGNMENT; \
	.global	C_FUNCTION_NAME(name)
#  define C_FUNCTION_END(name, label) \
	label:	.size C_FUNCTION_NAME(name), label - C_FUNCTION_NAME(name);
# endif
#endif

#endif