aboutsummaryrefslogtreecommitdiffstats
path: root/modules/alg_ia32/asm_macr.h
diff options
context:
space:
mode:
Diffstat (limited to 'modules/alg_ia32/asm_macr.h')
-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