working on registers, awip (a work in progress)
This commit is contained in:
@ -10,6 +10,10 @@ require_relative "constants"
|
||||
module Arm
|
||||
class ArmMachine < Vm::RegisterMachine
|
||||
|
||||
def integer_equals block , left , right
|
||||
block << cmp( left , right )
|
||||
Vm::BranchCondition.new :eq
|
||||
end
|
||||
def integer_less_or_equal block , left , right
|
||||
block << cmp( left , right )
|
||||
Vm::BranchCondition.new :le
|
||||
|
@ -12,6 +12,10 @@ module Arm
|
||||
|
||||
@immediate = 0
|
||||
@rn = :r0 # register zero = zero bit pattern
|
||||
raise inspect if to.is_a?(Vm::Value) and
|
||||
from.is_a?(Vm::Value) and
|
||||
!@attributes[:shift_lsr] and
|
||||
to.register == from.register
|
||||
end
|
||||
|
||||
# arm intrucions are pretty sensible, and always 4 bytes (thumb not supported)
|
||||
|
Reference in New Issue
Block a user