Class: Rex::Poly::LogicalRegister::X86

Inherits:
Rex::Poly::LogicalRegister show all
Defined in:
lib/rex/poly/register/x86.rb

Overview

This class encapsulates logical registers for the X86 architecture.

Instance Attribute Summary

Attributes inherited from Rex::Poly::LogicalRegister

#name

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Rex::Poly::LogicalRegister

#regnum, #regnum=, #static?

Constructor Details

#initialize(name, register = nil) ⇒ X86

Calls the base class constructor after translating the register name to number.



34
35
36
# File 'lib/rex/poly/register/x86.rb', line 34

def initialize(name, register = nil)
  super(name, register ? Rex::Arch::X86.reg_number(register) : nil)
end

Class Method Details

.regnum_setObject

The default set of register numbers that can be used on x86.



17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/rex/poly/register/x86.rb', line 17

def self.regnum_set
  [
    Rex::Arch::X86::EAX,
    Rex::Arch::X86::EBX,
    Rex::Arch::X86::ECX,
    Rex::Arch::X86::EDX,
    Rex::Arch::X86::ESI,
    Rex::Arch::X86::EDI,
    Rex::Arch::X86::EBP,
    Rex::Arch::X86::ESP
  ]
end