first go at translating DynamicCall to risc
This commit is contained in:
@ -53,6 +53,20 @@ module Risc
|
||||
|
||||
end
|
||||
|
||||
# dynamic version of an Unconditional branch that jumps to the contents
|
||||
# of a register instead of a hardcoded address
|
||||
# As Branches jump to Labels, this is not derived from Branch
|
||||
# PS: to conditionally jump to a dynamic adddress we do a normal branch
|
||||
# over the dynamic one and then a dynamic one. Save us having all types of branches
|
||||
# in two versions
|
||||
class DynamicJump < Instruction
|
||||
def initialize( source , register )
|
||||
super(source)
|
||||
@register = register
|
||||
end
|
||||
attr_reader :register
|
||||
end
|
||||
|
||||
# branch if two registers contain same value
|
||||
class IsSame < Branch
|
||||
attr_reader :left , :right
|
||||
|
Reference in New Issue
Block a user