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

Botan 1.10.17

Macros
asm_x86_64.h File Reference

Go to the source code of this file.

## Macros
#define | ADD(TO, FROM) add FROM, TO
#define | ADD3_IMM(TO, FROM, NUM) lea NUM(TO,FROM,1), TO
#define | ADD_IMM(TO, NUM) ADD(TO, IMM(NUM))
#define | ADD_LAST_CARRY(REG) adc IMM(0), REG
#define | ADD_W_CARRY(TO1, TO2, FROM) add FROM, TO1; adc IMM(0), TO2;
#define | ALIGN .p2align 4,,15
#define | AND(TO, FROM) and FROM, TO
#define | ARG_1 R7
#define | ARG_2 R6
#define | ARG_2_32 R6_32
#define | ARG_3 R3
#define | ARG_3_32 R3_32
#define | ARG_4 R2
#define | ARG_4_32 R2_32
#define | ARG_5 R8
#define | ARG_6 R9
#define | ARG_6_32 R9_32
#define | ARRAY4(REG, NUM) 4*(NUM)(REG)
#define | ARRAY8(REG, NUM) 8*(NUM)(REG)
#define | ASSIGN(TO, FROM) mov FROM, TO
#define | END_FUNCTION(func_name) ret
#define | IMM(VAL) $VAL
#define | JUMP_IF_LT(REG, NUM, LABEL)
#define | JUMP_IF_ZERO(REG, LABEL)
#define | MUL(REG) mul REG
#define | NOT(REG) not REG
#define | OR(TO, FROM) or FROM, TO
#define | R0 %rax
#define | R1 %rbx
#define | R10 %r10
#define | R11 %r11
#define | R12 %r12
#define | R13 %r13
#define | R14 %r14
#define | R15 %r15
#define | R16 %r16
#define | R2 %rcx
#define | R2_32 %ecx
#define | R3 %rdx
#define | R3_32 %edx
#define | R4 %rsp
#define | R5 %rbp
#define | R6 %rsi
#define | R6_32 %esi
#define | R7 %rdi
#define | R8 %r8
#define | R9 %r9
#define | R9_32 %r9d
#define | RETURN_VALUE_IS(V) ASSIGN(%rax, V)
#define | ROTL_IMM(REG, NUM) rol IMM(NUM), REG
#define | ROTR_IMM(REG, NUM) ror IMM(NUM), REG
#define | START_FUNCTION(func_name)
#define | START_LISTING(FILENAME)
#define | SUB_IMM(TO, NUM) sub IMM(NUM), TO
#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_5_32 ARG_4_32
#define | TEMP_6 ARG_3
#define | TEMP_7 ARG_2
#define | TEMP_8 ARG_1
#define | TEMP_9 R0
#define | XOR(TO, FROM) xor FROM, TO
#define | ZEROIZE(REG) XOR(REG, REG)

## Macro Definition Documentation

## ◆ ADD

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

Definition at line 108 of file asm_x86_64.h.

## ◆ ADD3_IMM

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

Definition at line 125 of file asm_x86_64.h.

## ◆ ADD_IMM

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

Definition at line 110 of file asm_x86_64.h.

## ◆ ADD_LAST_CARRY

#define ADD_LAST_CARRY | ( |  | REG | ) | adc IMM(0), REG

Definition at line 109 of file asm_x86_64.h.

## ◆ ADD_W_CARRY

#define ADD_W_CARRY | ( |  | TO1,
|  |  | TO2,
|  |  | FROM
| ) |  | add FROM, TO1; adc IMM(0), TO2;

Definition at line 111 of file asm_x86_64.h.

## ◆ ALIGN

#define ALIGN .p2align 4,,15

Definition at line 14 of file asm_x86_64.h.

## ◆ AND

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

Definition at line 116 of file asm_x86_64.h.

## ◆ ARG_1

#define ARG_1 R7

Definition at line 73 of file asm_x86_64.h.

## ◆ ARG_2

#define ARG_2 R6

Definition at line 74 of file asm_x86_64.h.

## ◆ ARG_2_32

#define ARG_2_32 R6_32

Definition at line 75 of file asm_x86_64.h.

## ◆ ARG_3

#define ARG_3 R3

Definition at line 76 of file asm_x86_64.h.

## ◆ ARG_3_32

#define ARG_3_32 R3_32

Definition at line 77 of file asm_x86_64.h.

## ◆ ARG_4

#define ARG_4 R2

Definition at line 78 of file asm_x86_64.h.

## ◆ ARG_4_32

#define ARG_4_32 R2_32

Definition at line 79 of file asm_x86_64.h.

## ◆ ARG_5

#define ARG_5 R8

Definition at line 80 of file asm_x86_64.h.

## ◆ ARG_6

#define ARG_6 R9

Definition at line 81 of file asm_x86_64.h.

## ◆ ARG_6_32

#define ARG_6_32 R9_32

Definition at line 82 of file asm_x86_64.h.

## ◆ ARRAY4

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

Definition at line 99 of file asm_x86_64.h.

## ◆ ARRAY8

#define ARRAY8 | ( |  | REG,
|  |  | NUM
| ) |  | 8*(NUM)(REG)

Definition at line 98 of file asm_x86_64.h.

## ◆ ASSIGN

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

Definition at line 101 of file asm_x86_64.h.

## ◆ END_FUNCTION

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

Definition at line 34 of file asm_x86_64.h.

## ◆ IMM

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

Definition at line 106 of file asm_x86_64.h.

## ◆ JUMP_IF_LT

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

Value:
cmp IMM(NUM), REG; \
jl LABEL
IMM
#define IMM(VAL)
Definition: asm_x86_64.h:106

Definition at line 44 of file asm_x86_64.h.

## ◆ JUMP_IF_ZERO

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

Value:
cmp IMM(0), REG; \
jz LABEL
IMM
#define IMM(VAL)
Definition: asm_x86_64.h:106

Definition at line 40 of file asm_x86_64.h.

## ◆ MUL

#define MUL | ( |  | REG | ) | mul REG

Definition at line 113 of file asm_x86_64.h.

## ◆ NOT

#define NOT | ( |  | REG | ) | not REG

Definition at line 118 of file asm_x86_64.h.

## ◆ OR

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

Definition at line 117 of file asm_x86_64.h.

## ◆ R0

#define R0 %rax

Definition at line 51 of file asm_x86_64.h.

Referenced by Botan::RC2::decrypt_n(), and Botan::RC2::encrypt_n().

## ◆ R1

#define R1 %rbx

Definition at line 52 of file asm_x86_64.h.

Referenced by Botan::CAST_128::decrypt_n(), Botan::RC2::decrypt_n(), Botan::RC2::encrypt_n(), and Botan::CAST_128::encrypt_n().

## ◆ R10

#define R10 %r10

Definition at line 65 of file asm_x86_64.h.

## ◆ R11

#define R11 %r11

Definition at line 66 of file asm_x86_64.h.

## ◆ R12

#define R12 %r12

Definition at line 67 of file asm_x86_64.h.

## ◆ R13

#define R13 %r13

Definition at line 68 of file asm_x86_64.h.

## ◆ R14

#define R14 %r14

Definition at line 69 of file asm_x86_64.h.

## ◆ R15

#define R15 %r15

Definition at line 70 of file asm_x86_64.h.

## ◆ R16

#define R16 %r16

Definition at line 71 of file asm_x86_64.h.

## ◆ R2

#define R2 %rcx

Definition at line 53 of file asm_x86_64.h.

Referenced by Botan::CAST_128::decrypt_n(), Botan::RC2::decrypt_n(), Botan::RC2::encrypt_n(), and Botan::CAST_128::encrypt_n().

## ◆ R2_32

#define R2_32 %ecx

Definition at line 54 of file asm_x86_64.h.

## ◆ R3

#define R3 %rdx

Definition at line 55 of file asm_x86_64.h.

Referenced by Botan::CAST_128::decrypt_n(), Botan::RC2::decrypt_n(), Botan::RC2::encrypt_n(), and Botan::CAST_128::encrypt_n().

## ◆ R3_32

#define R3_32 %edx

Definition at line 56 of file asm_x86_64.h.

## ◆ R4

#define R4 %rsp

Definition at line 57 of file asm_x86_64.h.

## ◆ R5

#define R5 %rbp

Definition at line 58 of file asm_x86_64.h.

## ◆ R6

#define R6 %rsi

Definition at line 59 of file asm_x86_64.h.

## ◆ R6_32

#define R6_32 %esi

Definition at line 60 of file asm_x86_64.h.

## ◆ R7

#define R7 %rdi

Definition at line 61 of file asm_x86_64.h.

## ◆ R8

#define R8 %r8

Definition at line 62 of file asm_x86_64.h.

## ◆ R9

#define R9 %r9

Definition at line 63 of file asm_x86_64.h.

## ◆ R9_32

#define R9_32 %r9d

Definition at line 64 of file asm_x86_64.h.

## ◆ RETURN_VALUE_IS

#define RETURN_VALUE_IS | ( |  | V | ) | ASSIGN(%rax, V)

Definition at line 121 of file asm_x86_64.h.

## ◆ ROTL_IMM

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

Definition at line 123 of file asm_x86_64.h.

## ◆ ROTR_IMM

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

Definition at line 124 of file asm_x86_64.h.

## ◆ START_FUNCTION

#define START_FUNCTION | ( |  | func_name | ) |

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

Definition at line 28 of file asm_x86_64.h.

## ◆ START_LISTING

#define START_LISTING | ( |  | FILENAME | ) |

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

Definition at line 16 of file asm_x86_64.h.

## ◆ SUB_IMM

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

Definition at line 112 of file asm_x86_64.h.

## ◆ TEMP_1

#define TEMP_1 R10

Definition at line 84 of file asm_x86_64.h.

## ◆ TEMP_2

#define TEMP_2 R11

Definition at line 85 of file asm_x86_64.h.

## ◆ TEMP_3

#define TEMP_3 ARG_6

Definition at line 86 of file asm_x86_64.h.

## ◆ TEMP_4

#define TEMP_4 ARG_5

Definition at line 87 of file asm_x86_64.h.

## ◆ TEMP_5

#define TEMP_5 ARG_4

Definition at line 88 of file asm_x86_64.h.

## ◆ TEMP_5_32

#define TEMP_5_32 ARG_4_32

Definition at line 89 of file asm_x86_64.h.

## ◆ TEMP_6

#define TEMP_6 ARG_3

Definition at line 90 of file asm_x86_64.h.

## ◆ TEMP_7

#define TEMP_7 ARG_2

Definition at line 91 of file asm_x86_64.h.

## ◆ TEMP_8

#define TEMP_8 ARG_1

Definition at line 92 of file asm_x86_64.h.

## ◆ TEMP_9

#define TEMP_9 R0

Definition at line 93 of file asm_x86_64.h.

## ◆ XOR

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

Definition at line 115 of file asm_x86_64.h.

## ◆ ZEROIZE

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

Definition at line 119 of file asm_x86_64.h.