aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/asm_amd64
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_amd64
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_amd64')
-rw-r--r--src/utils/asm_amd64/asm_macr.h46
1 files changed, 24 insertions, 22 deletions
diff --git a/src/utils/asm_amd64/asm_macr.h b/src/utils/asm_amd64/asm_macr.h
index 6f819591f..287fa3e88 100644
--- a/src/utils/asm_amd64/asm_macr.h
+++ b/src/utils/asm_amd64/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_AMD64_ASM_MACROS_H__
#define BOTAN_AMD64_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
-/*************************************************
-* Conditional Jumps *
-*************************************************/
+/*
+* Conditional Jumps
+*/
#define JUMP_IF_ZERO(REG, LABEL) \
cmp IMM(0), REG; \
jz LABEL
@@ -43,9 +45,9 @@ func_name:
cmp IMM(NUM), REG; \
jl LABEL
-/*************************************************
-* Register Names *
-*************************************************/
+/*
+* Register Names
+*/
#define R0 %rax
#define R1 %rbx
#define R2 %rcx
@@ -90,17 +92,17 @@ func_name:
#define TEMP_8 ARG_1
#define TEMP_9 R0
-/*************************************************
-* Memory Access Operations *
-*************************************************/
+/*
+* Memory Access Operations
+*/
#define ARRAY8(REG, NUM) 8*(NUM)(REG)
#define ARRAY4(REG, NUM) 4*(NUM)(REG)
#define ASSIGN(TO, FROM) mov FROM, TO
-/*************************************************
-* ALU Operations *
-*************************************************/
+/*
+* ALU Operations
+*/
#define IMM(VAL) $VAL
#define ADD(TO, FROM) add FROM, TO