aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2007-03-08 03:16:00 +0000
committerlloyd <[email protected]>2007-03-08 03:16:00 +0000
commit18d3e9db5a6f19ee26c728f9f78be9accd4bdca0 (patch)
tree76d9857a15e8e1e4b1e6ada8db690c695a12a676
parentaae4fcd96934e5bdc18e12f8c14d4cadd207cfc1 (diff)
Add macros to represent register names
-rw-r--r--modules/alg_amd64/asm_macr.h40
1 files changed, 39 insertions, 1 deletions
diff --git a/modules/alg_amd64/asm_macr.h b/modules/alg_amd64/asm_macr.h
index 990a9fb61..d4fe38968 100644
--- a/modules/alg_amd64/asm_macr.h
+++ b/modules/alg_amd64/asm_macr.h
@@ -44,7 +44,7 @@ func_name:
jge LABEL##_LOOP
/*************************************************
- Conditional Jumps *
+* Conditional Jumps *
*************************************************/
#define JUMP_IF_ZERO(REG, LABEL) \
cmp IMM(0), REG; \
@@ -55,6 +55,44 @@ func_name:
jl LABEL
/*************************************************
+* Register Names *
+*************************************************/
+#define R0 %rax
+#define R1 %rbx
+#define R2 %rcx
+#define R3 %rdx
+#define R4 %rsp
+#define R5 %rbp
+#define R6 %rsi
+#define R7 %rdi
+#define R8 %r8
+#define R9 %r9
+#define R10 %r10
+#define R11 %r11
+#define R12 %r12
+#define R13 %r13
+#define R14 %r14
+#define R15 %r15
+#define R16 %r16
+
+#define ARG_1 R7
+#define ARG_2 R6
+#define ARG_3 R3
+#define ARG_4 R2
+#define ARG_5 R8
+#define ARG_6 R9
+
+#define TEMP_1 R10
+#define TEMP_2 R11
+#define TEMP_3 ARG_6
+#define TEMP_4 ARG_5
+#define TEMP_5 ARG_4
+#define TEMP_6 ARG_3
+#define TEMP_7 ARG_2
+#define TEMP_8 ARG_1
+#define TEMP_9 R0
+
+/*************************************************
* Memory Access Operations *
*************************************************/
#define ARRAY8(REG, NUM) 8*(NUM)(REG)