aboutsummaryrefslogtreecommitdiffstats
path: root/modules/sha_x86/asm_macr.h
blob: 2736c7d9a2766b7e412d35e4abb2db0ec4f88263 (plain)
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
/*************************************************
* Assembly Macros Header File                    *
* (C) 1999-2006 The Botan Project                *
*************************************************/

#ifndef BOTAN_EXT_ASM_MACROS_H__
#define BOTAN_EXT_ASM_MACROS_H__

#define ALIGN .p2align 4,,15

#define START_LISTING(FILENAME) \
   .file #FILENAME;             \
   .text;                       \
   .p2align 4,,15;

#define FUNCTION(func_name)      \
   .align   8;                   \
   ALIGN;                        \
   .global  func_name;           \
   .type    func_name,@function; \
func_name:

#define EAX %eax
#define EBX %ebx
#define ECX %ecx
#define EDX %edx
#define EBP %ebp
#define EDI %edi
#define ESI %esi

#define PUSH(REG) pushl REG
#define MOV(FROM, TO) movl FROM, TO


#define ADD(FROM, TO) addl FROM, TO

#define IMM(VAL) $VAL

#define ZEROIZE(REG) xorl REG, REG

#define ARG(NUM) 4*PUSHED+4*NUM(%esp)

#endif