class Metasm::X86_64::CCompiler::State
holds compiler state information for a function registers are saved as register number (see Reg
)
Attributes
list of reg values that are not kept across function call
list of regs we can trash without restoring them
stack space reserved for subfunction in ABI
variable => register for current scope (variable never on the stack) bound registers are also in used
register => CExpression
array of register values used in the function (to save/restore at prolog/epilog)
the current function
the array of args in use (reg/modrm) the reg dependencies are in used
variable => offset from ebp (::Integer or CExpression)
list of reg values that are used as func args in current ABI
used
includes ebp if true nil if ebp is not reserved for stack variable addressing Reg
if used
the array of register values currently not available
Public Class Methods
# File metasm/cpu/x86_64/compile_c.rb, line 45 def initialize(func) @func = func @offset = {} @cache = {} @dirty = [] @used = [4] # rsp is always in use @inuse = [] @bound = {} @regargs = [] @args_space = 0 @abi_flushregs_call = [0, 1, 2, 6, 7, 8, 9, 10, 11] @abi_trashregs = @abi_flushregs_call.dup end