class Metasm::OpenRisc::Reg

Attributes

v[RW]

Public Class Methods

new(v) click to toggle source
# File metasm/cpu/openrisc/main.rb, line 13
def initialize(v)
        @v = v
end

Public Instance Methods

render() click to toggle source
# File metasm/cpu/openrisc/render.rb, line 14
def render ; ["r#@v"] end
symbolic(di=nil) click to toggle source
# File metasm/cpu/openrisc/main.rb, line 17
def symbolic(di=nil)
        if @v != 0 or not di or di.instruction.args[0].object_id == self.object_id
                "r#@v".to_sym
        else
                # r0 is always 0, but we still return :r0 when writing to it (ie its the 1st instr arg)
                Expression[0]
        end
end