Main Page Modules Data Structures File List Data Fields Globals Related Pages

# beecrypt/beecrypt.gas.h

Go to the documentation of this file.

    00001 #ifndef _BEECRYPT_GAS_H
    00002 #define _BEECRYPT_GAS_H
    00003
    00004 #include "config.h"
    00005
    00006 #ifndef SYMBOL_NAME
    00007 # if LEADING_UNDERSCORE
    00008 #  ifdef __STDC__
    00009 #   define SYMBOL_NAME(name)    _##name
    00010 #  else
    00011 #   define SYMBOL_NAME(name)    _name
    00012 #  endif
    00013 # else
    00014 #  define SYMBOL_NAME(name)     name
    00015 # endif
    00016 #endif
    00017
    00018 #if defined(OPTIMIZE_ALPHA)
    00019 # define ALIGNMENT      5
    00020 #elif defined(OPTIMIZE_I386) || defined(OPTIMIZE_I486) || defined(OPTIMIZE_I586) || defined(OPTIMIZE_I686)
    00021 # define ALIGNMENT      8
    00022 #elif defined(OPTIMIZE_IA64)
    00023 # define ALIGNMENT      32
    00024 #elif defined(OPTIMIZE_ARM)
    00025 # define ALIGNMENT      4
    00026 #elif defined(OPTIMIZE_POWERPC)
    00027 # define ALIGNMENT      8
    00028 #elif defined(OPTIMIZE_SPARCV8PLUS) || defined(OPTIMIZE_SPARCV9)
    00029 # define ALIGNMENT      8
    00030 #else
    00031 # define ALIGNMENT      8
    00032 #endif
    00033
    00034 #define LABEL(name) SYMBOL_NAME(name):
    00035 #if DARWIN
    00036 # define LOCAL(name) L##name
    00037 #else
    00038 # if __STDC__
    00039 #  define LOCAL(name) .L##name
    00040 # else
    00041 #  define LOCAL(name) .Lname
    00042 # endif
    00043 #endif
    00044
    00045 #if CYGWIN
    00046 # define C_FUNCTION_BEGIN(name) \
    00047         .align  ALIGNMENT;      \
    00048         .globl  SYMBOL_NAME(name);      \
    00049         .def    SYMBOL_NAME(name);      \
    00050         .scl    2;      \
    00051         .type   32;     \
    00052         .endef
    00053 # define C_FUNCTION_END(name, label)
    00054 #else
    00055 # if SOLARIS
    00056 #  define C_FUNCTION_TYPE       #function
    00057 # elif defined(OPTIMIZE_ARM)
    00058 #  define C_FUNCTION_TYPE       %function
    00059 # else
    00060 #  define C_FUNCTION_TYPE       @function
    00061 # endif
    00062 # if DARWIN
    00063 #  define C_FUNCTION_BEGIN(name) \
    00064         .globl  SYMBOL_NAME(name)
    00065 #  define C_FUNCTION_END(name, label)
    00066 # elif defined(OPTIMIZE_IA64)
    00067 #  define C_FUNCTION_BEGIN(name) \
    00068         .align  ALIGNMENT; \
    00069         .global name#; \
    00070         .proc   name#
    00071 #  define C_FUNCTION_END(name) \
    00072         .endp   name#
    00073 # else
    00074 #  define C_FUNCTION_BEGIN(name) \
    00075         .align  ALIGNMENT; \
    00076         .global SYMBOL_NAME(name)
    00077 #  define C_FUNCTION_END(name, label) \
    00078         label:  .size SYMBOL_NAME(name), label - SYMBOL_NAME(name);
    00079 # endif
    00080 #endif
    00081
    00082 #if defined(OPTIMIZE_POWERPC)
    00083 # if DARWIN
    00084 #  define LOAD_ADDRESS(reg,var) lis reg,ha16(var); la reg,lo16(var)(reg)
    00085 # else
    00086 #  define LOAD_ADDRESS(reg,var) lis reg,var@ha; la reg,var@l(reg)
    00087 #  define r0 %r0
    00088 #  define r1 %r1
    00089 #  define r2 %r2
    00090 #  define r3 %r3
    00091 #  define r4 %r4
    00092 #  define r5 %r5
    00093 #  define r6 %r6
    00094 #  define r7 %r7
    00095 #  define r8 %r8
    00096 #  define r9 %r9
    00097 #  define r10 %r10
    00098 #  define r11 %r11
    00099 #  define r12 %r12
    00100 #  define r13 %r13
    00101 #  define r14 %r14
    00102 #  define r15 %r15
    00103 #  define r16 %r16
    00104 #  define r17 %r17
    00105 #  define r18 %r18
    00106 #  define r19 %r19
    00107 #  define r20 %r20
    00108 #  define r21 %r21
    00109 #  define r22 %r22
    00110 #  define r23 %r23
    00111 #  define r24 %r24
    00112 #  define r25 %r25
    00113 #  define r26 %r26
    00114 #  define r27 %r27
    00115 #  define r28 %r28
    00116 #  define r29 %r29
    00117 #  define r30 %r30
    00118 #  define r31 %r31
    00119 # endif
    00120 #endif
    00121
    00122 #endif