rubyx/lib/mom/instruction/jump.rb

18 lines
264 B
Ruby
Raw Normal View History

2017-08-30 16:21:13 +02:00
module Mom
# unconditional jump to the instruction given as target
2018-03-14 15:55:21 +01:00
#
2017-08-30 16:21:13 +02:00
class Jump < Instruction
attr_reader :target
def initialize(target)
@target = target
end
2018-03-14 15:55:21 +01:00
def to_risc(context)
Risc::Label.new(self,"Jump")
end
2017-08-30 16:21:13 +02:00
end
end