NAME

CPU::x86_64::InstructionWriter::LazyEncode - Object representing a partially encoded instruction

VERSION

version 0.005

DESCRIPTION

When an instruction references unknown values, we write a placeholder into the instruction buffer and then describe that range with one of these objects. This object has an 'encode' function that can be called later to pack the resolved value into the bytes of the instruction.

ATTRIBUTES

name

A human-readable name describing the instruction

relative_to

The constant or placeholder object representing the start address for the assembled unit in which this label was declared.

offset

The address where the instruction begins, relative to 'relative_to'.

len

The number of bytes of placeholder for this instruction.

encoder

A coderef which can be called as a method of the InstructionWriter, and returns the new bytes to be spliced into the instruction buffer.

caller

Caller information about the top-level method that created the instruction.

CONSTRUCTOR

Use "get_label" in CPU::x86_64::InstructionWriter to create labels.

AUTHOR

Michael Conrad <mike@nrdvana.net>

COPYRIGHT AND LICENSE

This software is copyright (c) 2025 by Michael Conrad.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.