Botan 1.10.17
asm_x86_32.h File Reference

Go to the source code of this file.

Macros

#define ADD(TO, FROM)
#define ADD2_IMM(TO, FROM, NUM)
#define ADD3_IMM(TO, FROM, NUM)
#define ADD_IMM(TO, NUM)
#define ADD_W_CARRY(TO1, TO2, FROM)
#define ALIGN   .p2align 4,,15
#define AND(TO, FROM)
#define ARG(NUM)
#define ARRAY1(REG, NUM)
#define ARRAY4(REG, NUM)
#define ARRAY4_INDIRECT(BASE, OFFSET, NUM)
#define ASSIGN(TO, FROM)
#define ASSIGN_BYTE(TO, FROM)
#define BSWAP(REG)
#define EAX   %eax
#define EBP   %ebp
#define EBX   %ebx
#define ECX   %ecx
#define EDI   %edi
#define EDX   %edx
#define END_FUNCTION(func_name)
#define ESI   %esi
#define ESP   %esp
#define IMM(VAL)
#define JUMP_IF_LT(REG, NUM, LABEL)
#define JUMP_IF_ZERO(REG, LABEL)
#define LOOP_UNTIL_EQ(REG, NUM, LABEL)
#define LOOP_UNTIL_LT(REG, NUM, LABEL)
#define MUL(REG)
#define NOT(REG)
#define OR(TO, FROM)
#define POP(REG)
#define PUSH(REG)
#define RESTORE_REGS()
#define ROTL_IMM(REG, NUM)
#define ROTR_IMM(REG, NUM)
#define SHL2_3(TO, FROM)
#define SHL_IMM(REG, SHIFT)
#define SHR_IMM(REG, SHIFT)
#define SPILL_REGS()
#define START_FUNCTION(func_name)
#define START_LISTING(FILENAME)
#define START_LOOP(LABEL)
#define SUB_IMM(TO, NUM)
#define XOR(TO, FROM)
#define ZEROIZE(REG)

Macro Definition Documentation

◆ ADD

#define ADD ( TO,
FROM )
Value:
addl FROM, TO

Definition at line 106 of file asm_x86_32.h.

◆ ADD2_IMM

#define ADD2_IMM ( TO,
FROM,
NUM )
Value:
leal NUM(FROM), TO

Definition at line 110 of file asm_x86_32.h.

◆ ADD3_IMM

#define ADD3_IMM ( TO,
FROM,
NUM )
Value:
leal NUM(TO,FROM,1), TO

Definition at line 111 of file asm_x86_32.h.

◆ ADD_IMM

#define ADD_IMM ( TO,
NUM )
Value:
ADD(TO, IMM(NUM))
#define ADD(TO, FROM)
Definition asm_x86_32.h:106
#define IMM(VAL)
Definition asm_x86_32.h:104

Definition at line 107 of file asm_x86_32.h.

◆ ADD_W_CARRY

#define ADD_W_CARRY ( TO1,
TO2,
FROM )
Value:
addl FROM, TO1; adcl IMM(0), TO2;

Definition at line 108 of file asm_x86_32.h.

◆ ALIGN

#define ALIGN   .p2align 4,,15

Definition at line 14 of file asm_x86_32.h.

◆ AND

#define AND ( TO,
FROM )
Value:
andl FROM, TO

Definition at line 119 of file asm_x86_32.h.

◆ ARG

#define ARG ( NUM)
Value:
4*(PUSHED) + ARRAY4(ESP, NUM)
#define ESP
Definition asm_x86_32.h:73
#define ARRAY4(REG, NUM)
Definition asm_x86_32.h:79

Definition at line 81 of file asm_x86_32.h.

◆ ARRAY1

#define ARRAY1 ( REG,
NUM )
Value:
(NUM)(REG)

Definition at line 78 of file asm_x86_32.h.

◆ ARRAY4

#define ARRAY4 ( REG,
NUM )
Value:
4*(NUM)(REG)

Definition at line 79 of file asm_x86_32.h.

◆ ARRAY4_INDIRECT

#define ARRAY4_INDIRECT ( BASE,
OFFSET,
NUM )
Value:
4*(NUM)(BASE,OFFSET,4)

Definition at line 80 of file asm_x86_32.h.

◆ ASSIGN

#define ASSIGN ( TO,
FROM )
Value:
movl FROM, TO

Definition at line 83 of file asm_x86_32.h.

◆ ASSIGN_BYTE

#define ASSIGN_BYTE ( TO,
FROM )
Value:
movzbl FROM, TO

Definition at line 84 of file asm_x86_32.h.

◆ BSWAP

#define BSWAP ( REG)
Value:
bswapl REG

Definition at line 126 of file asm_x86_32.h.

◆ EAX

#define EAX   %eax

Definition at line 66 of file asm_x86_32.h.

◆ EBP

#define EBP   %ebp

Definition at line 70 of file asm_x86_32.h.

◆ EBX

#define EBX   %ebx

Definition at line 67 of file asm_x86_32.h.

◆ ECX

#define ECX   %ecx

Definition at line 68 of file asm_x86_32.h.

◆ EDI

#define EDI   %edi

Definition at line 71 of file asm_x86_32.h.

◆ EDX

#define EDX   %edx

Definition at line 69 of file asm_x86_32.h.

◆ END_FUNCTION

#define END_FUNCTION ( func_name)
Value:
ret

Definition at line 34 of file asm_x86_32.h.

◆ ESI

#define ESI   %esi

Definition at line 72 of file asm_x86_32.h.

◆ ESP

#define ESP   %esp

Definition at line 73 of file asm_x86_32.h.

◆ IMM

#define IMM ( VAL)
Value:
$VAL

Definition at line 104 of file asm_x86_32.h.

◆ JUMP_IF_LT

#define JUMP_IF_LT ( REG,
NUM,
LABEL )
Value:
cmpl IMM(NUM), REG; \
jl LABEL

Definition at line 59 of file asm_x86_32.h.

◆ JUMP_IF_ZERO

#define JUMP_IF_ZERO ( REG,
LABEL )
Value:
cmpl IMM(0), REG; \
jz LABEL

Definition at line 55 of file asm_x86_32.h.

◆ LOOP_UNTIL_EQ

#define LOOP_UNTIL_EQ ( REG,
NUM,
LABEL )
Value:
cmpl IMM(NUM), REG; \
jne LABEL##_LOOP

Definition at line 44 of file asm_x86_32.h.

◆ LOOP_UNTIL_LT

#define LOOP_UNTIL_LT ( REG,
NUM,
LABEL )
Value:
cmpl IMM(NUM), REG; \
jge LABEL##_LOOP

Definition at line 48 of file asm_x86_32.h.

◆ MUL

#define MUL ( REG)
Value:
mull REG

Definition at line 112 of file asm_x86_32.h.

◆ NOT

#define NOT ( REG)
Value:
notl REG

Definition at line 121 of file asm_x86_32.h.

◆ OR

#define OR ( TO,
FROM )
Value:
orl FROM, TO

Definition at line 120 of file asm_x86_32.h.

◆ POP

#define POP ( REG)
Value:
popl REG

Definition at line 87 of file asm_x86_32.h.

◆ PUSH

#define PUSH ( REG)
Value:
pushl REG

Definition at line 86 of file asm_x86_32.h.

◆ RESTORE_REGS

#define RESTORE_REGS ( )
Value:
POP(EBX) ; \
POP(ESI) ; \
POP(EDI) ; \
POP(EBP)
#define EBP
Definition asm_x86_32.h:70
#define POP(REG)
Definition asm_x86_32.h:87
#define EBX
Definition asm_x86_32.h:67
#define ESI
Definition asm_x86_32.h:72
#define EDI
Definition asm_x86_32.h:71

Definition at line 95 of file asm_x86_32.h.

◆ ROTL_IMM

#define ROTL_IMM ( REG,
NUM )
Value:
roll IMM(NUM), REG

Definition at line 124 of file asm_x86_32.h.

◆ ROTR_IMM

#define ROTR_IMM ( REG,
NUM )
Value:
rorl IMM(NUM), REG

Definition at line 125 of file asm_x86_32.h.

◆ SHL2_3

#define SHL2_3 ( TO,
FROM )
Value:
leal 0(,FROM,8), TO

Definition at line 116 of file asm_x86_32.h.

◆ SHL_IMM

#define SHL_IMM ( REG,
SHIFT )
Value:
shll IMM(SHIFT), REG

Definition at line 114 of file asm_x86_32.h.

◆ SHR_IMM

#define SHR_IMM ( REG,
SHIFT )
Value:
shrl IMM(SHIFT), REG

Definition at line 115 of file asm_x86_32.h.

◆ SPILL_REGS

#define SPILL_REGS ( )
Value:
PUSH(EBP) ; \
PUSH(EDI) ; \
PUSH(ESI) ; \
PUSH(EBX)
#define PUSH(REG)
Definition asm_x86_32.h:86

Definition at line 89 of file asm_x86_32.h.

◆ START_FUNCTION

#define START_FUNCTION ( func_name)
Value:
ALIGN; \
.global func_name; \
.type func_name,@function; \
func_name:
#define ALIGN
Definition asm_x86_32.h:14

Definition at line 28 of file asm_x86_32.h.

◆ START_LISTING

#define START_LISTING ( FILENAME)
Value:
.file #FILENAME; \
.text; \

Definition at line 16 of file asm_x86_32.h.

◆ START_LOOP

#define START_LOOP ( LABEL)
Value:
LABEL##_LOOP:

Definition at line 40 of file asm_x86_32.h.

◆ SUB_IMM

#define SUB_IMM ( TO,
NUM )
Value:
subl IMM(NUM), TO

Definition at line 109 of file asm_x86_32.h.

◆ XOR

#define XOR ( TO,
FROM )
Value:
xorl FROM, TO

Definition at line 118 of file asm_x86_32.h.

◆ ZEROIZE

#define ZEROIZE ( REG)
Value:
XOR(REG, REG)
#define XOR(TO, FROM)
Definition asm_x86_32.h:118

Definition at line 122 of file asm_x86_32.h.