Available on crate feature
compiler
and x86-64 only.Expand description
Dynamically emitted HashX assembly code for x86_64 targets
Macros§
- dynasm 🔒
- Wrapper for
dynasm!
, sets the architecture and defines register aliases
Constants§
- BUFFER_
CAPACITY 🔒 - Capacity for the temporary output buffer, before code is copied into a long-lived allocation that can be made executable.
- EPILOGUE_
SIZE 🔒 - Architecture-specific fixed epilogue size
- INSTRUCTION_
SIZE_ 🔒LIMIT - Architecture-specific maximum size for one instruction
- PROLOGUE_
SIZE 🔒 - Architecture-specific fixed prologue size
- REGS_
TO_ 🔒SAVE - List of registers to save on the stack, in address order
Traits§
- Register
Mapper 🔒 - Map RegisterId in our abstract program to concrete registers and addresses.
Functions§
- emit_
init_ 🔒locals - Emit code to initialize our local variables to default values.
- emit_
instruction 🔒 - Emit code for a single
Instruction
in the hash program. - emit_
load_ 🔒input - Emit code to move all input values from the RegisterFile into their actual hardware registers.
- emit_
restore_ 🔒regs - Emit code to restore REGS_TO_SAVE and deallocate stack space.
- emit_
return 🔒 - Emit a return instruction.
- emit_
save_ 🔒regs - Emit code to allocate stack space and store REGS_TO_SAVE.
- emit_
store_ 🔒output - Emit code to move all output values from machine registers back into their RegisterFile slots.
- stack_
size 🔒 - Calculate the amount of stack space to reserve, in bytes.
Type Aliases§
- Assembler 🔒
- Architecture-specific specialization of the Assembler