aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/asm_ia32
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-03-30 18:27:18 +0000
committerlloyd <[email protected]>2009-03-30 18:27:18 +0000
commit96d6eb6f29c55e16a37cf11899547886f735b065 (patch)
tree9f13901e9b44c98d58b2589c9b09c6a7443eb7cd /src/utils/asm_ia32
parent3cc3dd72c5f87b76852a55c1f2d1821dba967d8c (diff)
Thomas Moschny passed along a request from the Fedora packagers which came
up during the Fedora submission review, that each source file include some text about the license. One handy Perl script later and each file now has the line Distributed under the terms of the Botan license after the copyright notices. While I was in there modifying every file anyway, I also stripped out the remainder of the block comments (lots of astericks before and after the text); this is stylistic thing I picked up when I was first learning C++ but in retrospect it is not a good style as the structure makes it harder to modify comments (with the result that comments become fewer, shorter and are less likely to be updated, which are not good things).
Diffstat (limited to 'src/utils/asm_ia32')
-rw-r--r--src/utils/asm_ia32/asm_macr.h52
1 files changed, 27 insertions, 25 deletions
diff --git a/src/utils/asm_ia32/asm_macr.h b/src/utils/asm_ia32/asm_macr.h
index 58f9be19a..2ea69512b 100644
--- a/src/utils/asm_ia32/asm_macr.h
+++ b/src/utils/asm_ia32/asm_macr.h
@@ -1,14 +1,16 @@
-/*************************************************
-* Assembly Macros Header File *
-* (C) 1999-2008 Jack Lloyd *
-*************************************************/
+/*
+* Assembly Macros
+* (C) 1999-2008 Jack Lloyd
+*
+* Distributed under the terms of the Botan license
+*/
#ifndef BOTAN_IA32_ASM_MACROS_H__
#define BOTAN_IA32_ASM_MACROS_H__
-/*************************************************
-* General/Global Macros *
-*************************************************/
+/*
+* General/Global Macros
+*/
#define ALIGN .p2align 4,,15
#define START_LISTING(FILENAME) \
@@ -20,9 +22,9 @@
.section .note.GNU-stack,"",%progbits
#endif
-/*************************************************
-* Function Definitions *
-*************************************************/
+/*
+* Function Definitions
+*/
#define START_FUNCTION(func_name) \
ALIGN; \
.global func_name; \
@@ -32,9 +34,9 @@ func_name:
#define END_FUNCTION(func_name) \
ret
-/*************************************************
-* Loop Control *
-*************************************************/
+/*
+* Loop Control
+*/
#define START_LOOP(LABEL) \
ALIGN; \
LABEL##_LOOP:
@@ -47,9 +49,9 @@ func_name:
cmpl IMM(NUM), REG; \
jge LABEL##_LOOP
-/*************************************************
- Conditional Jumps *
-*************************************************/
+/*
+ Conditional Jumps
+*/
#define JUMP_IF_ZERO(REG, LABEL) \
cmpl IMM(0), REG; \
jz LABEL
@@ -58,9 +60,9 @@ func_name:
cmpl IMM(NUM), REG; \
jl LABEL
-/*************************************************
-* Register Names *
-*************************************************/
+/*
+* Register Names
+*/
#define EAX %eax
#define EBX %ebx
#define ECX %ecx
@@ -70,9 +72,9 @@ func_name:
#define ESI %esi
#define ESP %esp
-/*************************************************
-* Memory Access Operations *
-*************************************************/
+/*
+* Memory Access Operations
+*/
#define ARRAY1(REG, NUM) (NUM)(REG)
#define ARRAY4(REG, NUM) 4*(NUM)(REG)
#define ARRAY4_INDIRECT(BASE, OFFSET, NUM) 4*(NUM)(BASE,OFFSET,4)
@@ -96,9 +98,9 @@ func_name:
POP(EDI) ; \
POP(EBP)
-/*************************************************
-* ALU Operations *
-*************************************************/
+/*
+* ALU Operations
+*/
#define IMM(VAL) $VAL
#define ADD(TO, FROM) addl FROM, TO