class Metasm::ARM::Reg
Attributes
i_to_s[RW]
s_to_i[RW]
i[RW]
shift[RW]
stype[RW]
updated[RW]
Public Class Methods
new(i, stype=:lsl, shift=0)
click to toggle source
# File metasm/cpu/arm/main.rb, line 22 def initialize(i, stype=:lsl, shift=0) @i = i @stype = stype @shift = shift end
Public Instance Methods
render()
click to toggle source
# File metasm/cpu/arm/render.rb, line 13 def render r = self.class.i_to_s[@i] r += '!' if updated if @stype == :lsl and @shift == 0 [r] elsif @stype == :ror and @shift == 0 ["#{r} RRX"] else case s = @shift when Integer; s = Expression[s == 0 ? 32 : s] # lsl and ror already accounted for when Reg; s = self.class.i_to_s[s.i] end ["#{r} #{@stype.to_s.upcase} #{s}"] end end
symbolic(di=nil)
click to toggle source
# File metasm/cpu/arm/main.rb, line 28 def symbolic(di=nil) r = self.class.i_to_s[@i].to_sym if @stype == :lsl and @shift == 0 r else r # TODO shift/rotate/... end end