action: pre/post (inc/dec)rement
action: pre/post (inc/dec)rement
action: pre/post (inc/dec)rement
# File metasm/cpu/sh4/main.rb, line 251 def initialize(base, offset, action = nil) base = Expression[base] if base.kind_of? Integer @base, @disp, @action = base, offset, action end
# File metasm/cpu/sh4/main.rb, line 275 def render if @disp #['@(', @base, ',', @disp, ')'] ['[', @base, '+', @disp, ']'] else case @action when :pre then ['[--', @base, ']'] when :post then ['[', @base, '++]'] else ['[', @base, ']'] #when :pre then ['@-', @base] #when :post then ['@', @base, '+'] #else ['@', @base] end end end
# File metasm/cpu/sh4/main.rb, line 256 def symbolic(orig=nil, sz=32) b = @base b = b.symbolic if b.kind_of? Reg b = Expression[b, :-, sz/8] if @action == :pre if disp o = @disp o = o.symbolic if o.kind_of? Reg e = Expression[b, :+, o].reduce else e = Expression[b].reduce end Indirection[e, sz, orig] end