metasm/cpu/msp430/main.rb in metasm-1.0.3 vs metasm/cpu/msp430/main.rb in metasm-1.0.4

- old
+ new

@@ -18,11 +18,11 @@ include Renderable Sym = (4..15).inject(0 => :pc, 1 => :sp, 2 => :flags, 3 => :rzero) { |h, i| h.update i => "r#{i}".to_sym } attr_accessor :i def initialize(i) ; @i = i end - def symbolic ; Sym[@i] end + def symbolic(di=nil) ; Sym[@i] end def render ; [Sym[@i].to_s] end def ==(o) ; o.class == self.class and o.i == @i end end class Memref @@ -33,13 +33,13 @@ @offset = Expression[offset] @size = size @postincr = postincr end - def symbolic(orig=nil) + def symbolic(di=nil) r = @base.symbolic if @base e = Expression[r, :+, @offset].reduce - Indirection[e, (@size || 1), orig] + Indirection[e, (@size || 1), (di.address if di)] end include Renderable def render