From 18d3e9db5a6f19ee26c728f9f78be9accd4bdca0 Mon Sep 17 00:00:00 2001 From: lloyd Date: Thu, 8 Mar 2007 03:16:00 +0000 Subject: Add macros to represent register names --- modules/alg_amd64/asm_macr.h | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) 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; \ @@ -54,6 +54,44 @@ func_name: cmp IMM(NUM), REG; \ 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 * *************************************************/ -- cgit v1.2.3