diff options
Diffstat (limited to 'modules/sha_x86/asm_macr.h')
-rw-r--r-- | modules/sha_x86/asm_macr.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/modules/sha_x86/asm_macr.h b/modules/sha_x86/asm_macr.h new file mode 100644 index 000000000..2736c7d9a --- /dev/null +++ b/modules/sha_x86/asm_macr.h @@ -0,0 +1,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 |