rename unit and sint to human readable forms

This commit is contained in:
Torsten Ruger
2016-12-31 18:45:22 +02:00
parent 5f3744d6af
commit b094bcc64f
10 changed files with 66 additions and 66 deletions

View File

@ -67,7 +67,7 @@ module Arm
# signed 32-bit, condense to 24-bit
# TODO add check that the value fits into 24 bits
io << packed[0,3]
io.write_uint8 op_bit_code | (COND_CODES[@attributes[:condition_code]] << 4)
io.write_unsigned_int_8 op_bit_code | (COND_CODES[@attributes[:condition_code]] << 4)
end
def handle_swi(io)
@ -75,7 +75,7 @@ module Arm
raise "expected literal not #{arg} #{inspect}" unless (arg.is_a?(Numeric))
packed = [arg].pack('L')[0,3]
io << packed
io.write_uint8 0b1111 | (COND_CODES[@attributes[:condition_code]] << 4)
io.write_unsigned_int_8 0b1111 | (COND_CODES[@attributes[:condition_code]] << 4)
end
def to_s