Botan: src/utils/asm_x86_32/asm_x86_32.h File Reference

Botan 1.10.12

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

Macros
asm_x86_32.h File Reference

Go to the source code of this file.

## Macros
#define | ADD(TO, FROM) addl FROM, TO
#define | ADD2_IMM(TO, FROM, NUM) leal NUM(FROM), TO
#define | ADD3_IMM(TO, FROM, NUM) leal NUM(TO,FROM,1), TO
#define | ADD_IMM(TO, NUM) ADD(TO, IMM(NUM))
#define | ADD_W_CARRY(TO1, TO2, FROM) addl FROM, TO1; adcl IMM(0), TO2;
#define | ALIGN .p2align 4,,15
#define | AND(TO, FROM) andl FROM, TO
#define | ARG(NUM) 4*(PUSHED) + ARRAY4(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 | ASSIGN(TO, FROM) movl FROM, TO
#define | ASSIGN_BYTE(TO, FROM) movzbl FROM, TO
#define | BSWAP(REG) bswapl REG
#define | EAX %eax
#define | EBP %ebp
#define | EBX %ebx
#define | ECX %ecx
#define | EDI %edi
#define | EDX %edx
#define | END_FUNCTION(func_name) ret
#define | ESI %esi
#define | ESP %esp
#define | IMM(VAL) $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) mull REG
#define | NOT(REG) notl REG
#define | OR(TO, FROM) orl FROM, TO
#define | POP(REG) popl REG
#define | PUSH(REG) pushl REG
#define | RESTORE_REGS()
#define | ROTL_IMM(REG, NUM) roll IMM(NUM), REG
#define | ROTR_IMM(REG, NUM) rorl IMM(NUM), REG
#define | SHL2_3(TO, FROM) leal 0(,FROM,8), TO
#define | SHL_IMM(REG, SHIFT) shll IMM(SHIFT), REG
#define | SHR_IMM(REG, SHIFT) shrl IMM(SHIFT), REG
#define | SPILL_REGS()
#define | START_FUNCTION(func_name)
#define | START_LISTING(FILENAME)
#define | START_LOOP(LABEL)
#define | SUB_IMM(TO, NUM) subl IMM(NUM), TO
#define | XOR(TO, FROM) xorl FROM, TO
#define | ZEROIZE(REG) XOR(REG, REG)

## Macro Definition Documentation

#define ADD | ( |  | TO,
|  |  | FROM
| ) |  | addl FROM, TO

Definition at line 106 of file asm_x86_32.h.

#define ADD2_IMM | ( |  | TO,
|  |  | FROM,
|  |  | NUM
| ) |  | leal NUM(FROM), TO

Definition at line 110 of file asm_x86_32.h.

#define ADD3_IMM | ( |  | TO,
|  |  | FROM,
|  |  | NUM
| ) |  | leal NUM(TO,FROM,1), TO

Definition at line 111 of file asm_x86_32.h.

#define ADD_IMM | ( |  | TO,
|  |  | NUM
| ) |  | ADD(TO, IMM(NUM))

Definition at line 107 of file asm_x86_32.h.

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

Definition at line 108 of file asm_x86_32.h.

#define ALIGN .p2align 4,,15

Definition at line 14 of file asm_x86_32.h.

#define AND | ( |  | TO,
|  |  | FROM
| ) |  | andl FROM, TO

Definition at line 119 of file asm_x86_32.h.

#define ARG | ( |  | NUM | ) | 4*(PUSHED) + ARRAY4(ESP, NUM)

Definition at line 81 of file asm_x86_32.h.

#define ARRAY1 | ( |  | REG,
|  |  | NUM
| ) |  | (NUM)(REG)

Definition at line 78 of file asm_x86_32.h.

#define ARRAY4 | ( |  | REG,
|  |  | NUM
| ) |  | 4*(NUM)(REG)

Definition at line 79 of file asm_x86_32.h.

#define ARRAY4_INDIRECT | ( |  | BASE,
|  |  | OFFSET,
|  |  | NUM
| ) |  | 4*(NUM)(BASE,OFFSET,4)

Definition at line 80 of file asm_x86_32.h.

#define ASSIGN | ( |  | TO,
|  |  | FROM
| ) |  | movl FROM, TO

Definition at line 83 of file asm_x86_32.h.

#define ASSIGN_BYTE | ( |  | TO,
|  |  | FROM
| ) |  | movzbl FROM, TO

Definition at line 84 of file asm_x86_32.h.

#define BSWAP | ( |  | REG | ) | bswapl REG

Definition at line 126 of file asm_x86_32.h.

#define EAX %eax

Definition at line 66 of file asm_x86_32.h.

#define EBP %ebp

Definition at line 70 of file asm_x86_32.h.

#define EBX %ebx

Definition at line 67 of file asm_x86_32.h.

#define ECX %ecx

Definition at line 68 of file asm_x86_32.h.

#define EDI %edi

Definition at line 71 of file asm_x86_32.h.

#define EDX %edx

Definition at line 69 of file asm_x86_32.h.

#define END_FUNCTION | ( |  | func_name | ) | ret

Definition at line 34 of file asm_x86_32.h.

#define ESI %esi

Definition at line 72 of file asm_x86_32.h.

#define ESP %esp

Definition at line 73 of file asm_x86_32.h.

#define IMM | ( |  | VAL | ) | $VAL

Definition at line 104 of file asm_x86_32.h.

#define JUMP_IF_LT | ( |  | REG,
|  |  | NUM,
|  |  | LABEL
| ) |  |

Value:
cmpl IMM(NUM), REG; \
jl LABEL
IMM
#define IMM(VAL)
Definition: asm_x86_32.h:104

Definition at line 59 of file asm_x86_32.h.

#define JUMP_IF_ZERO | ( |  | REG,
|  |  | LABEL
| ) |  |

Value:
cmpl IMM(0), REG; \
jz LABEL
IMM
#define IMM(VAL)
Definition: asm_x86_32.h:104

Definition at line 55 of file asm_x86_32.h.

#define LOOP_UNTIL_EQ | ( |  | REG,
|  |  | NUM,
|  |  | LABEL
| ) |  |

Value:
cmpl IMM(NUM), REG; \
jne LABEL##_LOOP
IMM
#define IMM(VAL)
Definition: asm_x86_32.h:104

Definition at line 44 of file asm_x86_32.h.

#define LOOP_UNTIL_LT | ( |  | REG,
|  |  | NUM,
|  |  | LABEL
| ) |  |

Value:
cmpl IMM(NUM), REG; \
jge LABEL##_LOOP
IMM
#define IMM(VAL)
Definition: asm_x86_32.h:104

Definition at line 48 of file asm_x86_32.h.

#define MUL | ( |  | REG | ) | mull REG

Definition at line 112 of file asm_x86_32.h.

#define NOT | ( |  | REG | ) | notl REG

Definition at line 121 of file asm_x86_32.h.

#define OR | ( |  | TO,
|  |  | FROM
| ) |  | orl FROM, TO

Definition at line 120 of file asm_x86_32.h.

#define POP | ( |  | REG | ) | popl REG

Definition at line 87 of file asm_x86_32.h.

#define PUSH | ( |  | REG | ) | pushl REG

Definition at line 86 of file asm_x86_32.h.

#define RESTORE_REGS | ( |  | ) |

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

Definition at line 95 of file asm_x86_32.h.

#define ROTL_IMM | ( |  | REG,
|  |  | NUM
| ) |  | roll IMM(NUM), REG

Definition at line 124 of file asm_x86_32.h.

#define ROTR_IMM | ( |  | REG,
|  |  | NUM
| ) |  | rorl IMM(NUM), REG

Definition at line 125 of file asm_x86_32.h.

#define SHL2_3 | ( |  | TO,
|  |  | FROM
| ) |  | leal 0(,FROM,8), TO

Definition at line 116 of file asm_x86_32.h.

#define SHL_IMM | ( |  | REG,
|  |  | SHIFT
| ) |  | shll IMM(SHIFT), REG

Definition at line 114 of file asm_x86_32.h.

#define SHR_IMM | ( |  | REG,
|  |  | SHIFT
| ) |  | shrl IMM(SHIFT), REG

Definition at line 115 of file asm_x86_32.h.

#define SPILL_REGS | ( |  | ) |

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

Definition at line 89 of file asm_x86_32.h.

#define START_FUNCTION | ( |  | func_name | ) |

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

Definition at line 28 of file asm_x86_32.h.

#define START_LISTING | ( |  | FILENAME | ) |

Value:
.file #FILENAME; \
.text; \
ALIGN;

Definition at line 16 of file asm_x86_32.h.

#define START_LOOP | ( |  | LABEL | ) |

Value:
ALIGN; \
LABEL##_LOOP:
ALIGN
#define ALIGN
Definition: asm_x86_32.h:14

Definition at line 40 of file asm_x86_32.h.

#define SUB_IMM | ( |  | TO,
|  |  | NUM
| ) |  | subl IMM(NUM), TO

Definition at line 109 of file asm_x86_32.h.

#define XOR | ( |  | TO,
|  |  | FROM
| ) |  | xorl FROM, TO

Definition at line 118 of file asm_x86_32.h.

#define ZEROIZE | ( |  | REG | ) | XOR(REG, REG)

Definition at line 122 of file asm_x86_32.h.