small assembler fix
This commit is contained in:
parent
279fdcc1e2
commit
865a116f47
@ -38,7 +38,7 @@ module Risc
|
|||||||
objekt.create_binary if objekt.is_a? Parfait::TypedMethod
|
objekt.create_binary if objekt.is_a? Parfait::TypedMethod
|
||||||
binary = objekt.binary
|
binary = objekt.binary
|
||||||
Positioned.set_position(binary,at)
|
Positioned.set_position(binary,at)
|
||||||
objekt.risc_instructions.set_position( at + 12) # BinaryCode header
|
objekt.cpu_instructions.set_position( at + 12) # BinaryCode header
|
||||||
len = 4 * 14
|
len = 4 * 14
|
||||||
at += binary.padded_length
|
at += binary.padded_length
|
||||||
nekst = binary.next
|
nekst = binary.next
|
||||||
|
@ -14,10 +14,9 @@ module Risc
|
|||||||
@assembler = Assembler.new(@machine , Collector.collect_space)
|
@assembler = Assembler.new(@machine , Collector.collect_space)
|
||||||
assert @machine.translate_arm
|
assert @machine.translate_arm
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_write_fails
|
def test_write_fails
|
||||||
@assembler = Assembler.new(@machine , {})
|
@assembler = Assembler.new(@machine , {})
|
||||||
assert_raises{ @assembler.assemble} #must translate first
|
assert_raises{ @assembler.write_as_string} #must translate first
|
||||||
end
|
end
|
||||||
def test_assemble_no_objects
|
def test_assemble_no_objects
|
||||||
@assembler = Assembler.new(@machine , {})
|
@assembler = Assembler.new(@machine , {})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user