Skip to main content

Module x86_64

Module x86_64 

Source
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