aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorlloyd <[email protected]>2006-08-13 13:01:12 +0000
committerlloyd <[email protected]>2006-08-13 13:01:12 +0000
commitf772f438403e61b200f652655be1cb37258fa764 (patch)
tree575322c9f6227ff637bb9ff3ba657166234cfbd7 /modules
parent79af24603fc32a03d8f8808cc075607ae4fcbcb3 (diff)
A few macro fixes
Diffstat (limited to 'modules')
-rw-r--r--modules/alg_ia32/asm_macr.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/modules/alg_ia32/asm_macr.h b/modules/alg_ia32/asm_macr.h
index 9dfe64b43..582184080 100644
--- a/modules/alg_ia32/asm_macr.h
+++ b/modules/alg_ia32/asm_macr.h
@@ -20,14 +20,14 @@
.type func_name,@function; \
func_name:
-#define LOOP_UNTIL(REG, NUM, LABEL) \
- cmpl NUM, REG; \
- jne LABEL##_LOOP
-
#define START_LOOP(LABEL) \
ALIGN; \
LABEL##_LOOP:
+#define LOOP_UNTIL(REG, NUM, LABEL) \
+ cmpl NUM, REG; \
+ jne LABEL##_LOOP
+
#define EAX %eax
#define EBX %ebx
#define ECX %ecx
@@ -42,14 +42,17 @@ func_name:
#define PUSH(REG) pushl REG
#define POP(REG) popl REG
-#define ARRAY(REG, NUM) 4*NUM(REG)
-#define ARRAY_INDIRECT(BASE, OFFSET, NUM) 4*NUM(BASE,OFFSET,4)
-#define ARG(NUM) 4*PUSHED + ARRAY(ESP, NUM)
+#define ARRAY1(REG, NUM) NUM(REG)
+#define ARRAY4(REG, NUM) 4*NUM(REG)
+#define ARRAY4_INDIRECT(BASE, OFFSET, NUM) 4*NUM(BASE,OFFSET,4)
+#define ARG(NUM) 4*PUSHED + ARRAY4(ESP, NUM)
#define ASSIGN(TO, FROM) movl FROM, TO
+#define ASSIGN_BYTE(TO, FROM) movzbl FROM, TO
#define ADD(TO, FROM) addl FROM, TO
#define ADD_IMM(TO, NUM) addl IMM(NUM), TO
+#define SUB_IMM(TO, NUM) subl IMM(NUM), TO
#define ADD2_IMM(TO, FROM, NUM) leal NUM(FROM), TO
#define ADD3_IMM(TO, FROM, NUM) leal NUM(TO,FROM,1), TO