Module x86_64

Source
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§

RegisterMapper 🔒
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