Botan: src/math/mp/mp_x86_32/mp_asmi.h File Reference

Botan 1.10.16

Namespaces | Macros | Functions
mp_asmi.h File Reference
`#include <botan/internal/mp_asm.h>`

Go to the source code of this file.

## Namespaces
| Botan

## Macros
#define | ADD_OR_SUBTRACT(CORE_CODE)
#define | ADDSUB2_OP(OPERATION, INDEX)
#define | ADDSUB3_OP(OPERATION, INDEX)
#define | ASM(x) x "\n\t"
#define | DO_8_TIMES(MACRO, ARG)
#define | LINMUL_OP(WRITE_TO, INDEX)
#define | MULADD_OP(IGNORED, INDEX)

## Functions
void | Botan::word3_muladd (word *w2, word *w1, word *w0, word a, word b)
void | Botan::word3_muladd_2 (word *w2, word *w1, word *w0, word a, word b)
word | Botan::word8_add2 (word x[8], const word y[8], word carry)
word | Botan::word8_add3 (word z[8], const word x[8], const word y[8], word carry)
word | Botan::word8_linmul2 (word x[8], word y, word carry)
word | Botan::word8_linmul3 (word z[8], const word x[8], word y, word carry)
word | Botan::word8_madd3 (word z[8], const word x[8], word y, word carry)
word | Botan::word8_sub2 (word x[8], const word y[8], word carry)
word | Botan::word8_sub2_rev (word x[8], const word y[8], word carry)
word | Botan::word8_sub3 (word z[8], const word x[8], const word y[8], word carry)
word | Botan::word_add (word x, word y, word *carry)
word | Botan::word_sub (word x, word y, word *carry)

## Macro Definition Documentation

## ◆ ADD_OR_SUBTRACT

#define ADD_OR_SUBTRACT | ( |  | CORE_CODE | ) |

Value:
ASM("rorl %[carry]") \
CORE_CODE \
ASM("sbbl %[carry],%[carry]") \
ASM("negl %[carry]")
ASM
#define ASM(x)
Definition: mp_asmi.h:22

Definition at line 62 of file mp_asmi.h.

## ◆ ADDSUB2_OP

#define ADDSUB2_OP | ( |  | OPERATION,
|  |  | INDEX
| ) |  |

Value:
ASM("movl 4*" #INDEX "(%[y]), %[carry]") \
ASM(OPERATION " %[carry], 4*" #INDEX "(%[x])") \
ASM
#define ASM(x)
Definition: mp_asmi.h:22

Definition at line 25 of file mp_asmi.h.

## ◆ ADDSUB3_OP

#define ADDSUB3_OP | ( |  | OPERATION,
|  |  | INDEX
| ) |  |

Value:
ASM("movl 4*" #INDEX "(%[x]), %[carry]") \
ASM(OPERATION " 4*" #INDEX "(%[y]), %[carry]") \
ASM("movl %[carry], 4*" #INDEX "(%[z])") \
ASM
#define ASM(x)
Definition: mp_asmi.h:22

Definition at line 29 of file mp_asmi.h.

## ◆ ASM

#define ASM | ( |  | x | ) | x "\n\t"

Definition at line 22 of file mp_asmi.h.

## ◆ DO_8_TIMES

#define DO_8_TIMES | ( |  | MACRO,
|  |  | ARG
| ) |  |

Value:
MACRO(ARG, 0) \
MACRO(ARG, 1) \
MACRO(ARG, 2) \
MACRO(ARG, 3) \
MACRO(ARG, 4) \
MACRO(ARG, 5) \
MACRO(ARG, 6) \
MACRO(ARG, 7)
ARG
#define ARG(NUM)
Definition: asm_x86_32.h:81

Definition at line 52 of file mp_asmi.h.

## ◆ LINMUL_OP

#define LINMUL_OP | ( |  | WRITE_TO,
|  |  | INDEX
| ) |  |

Value:
ASM("movl 4*" #INDEX "(%[x]),%%eax") \
ASM("mull %[y]") \
ASM("addl %[carry],%%eax") \
ASM("adcl $0,%%edx") \
ASM("movl %%edx,%[carry]") \
ASM("movl %%eax, 4*" #INDEX "(%[" WRITE_TO "])")
ASM
#define ASM(x)
Definition: mp_asmi.h:22

Definition at line 34 of file mp_asmi.h.

## ◆ MULADD_OP

#define MULADD_OP | ( |  | IGNORED,
|  |  | INDEX
| ) |  |

Value:
ASM("movl 4*" #INDEX "(%[x]),%%eax") \
ASM("mull %[y]") \
ASM("addl %[carry],%%eax") \
ASM("adcl $0,%%edx") \
ASM("addl 4*" #INDEX "(%[z]),%%eax") \
ASM("adcl $0,%%edx") \
ASM("movl %%edx,%[carry]") \
ASM("movl %%eax, 4*" #INDEX " (%[z])")
ASM
#define ASM(x)
Definition: mp_asmi.h:22

Definition at line 42 of file mp_asmi.h.