move assembly from visitor into objects, part one
This commit is contained in:
@ -17,11 +17,6 @@ module Arm
|
||||
@is_load = opcode.to_s[0] == "l" ? 1 : 0 #L (load) flag
|
||||
end
|
||||
|
||||
# arm intructions are pretty sensible, and always 4 bytes (thumb not supported)
|
||||
def length
|
||||
4
|
||||
end
|
||||
|
||||
def assemble(io , assembler )
|
||||
# don't overwrite instance variables, to make assembly repeatable
|
||||
rn = @rn
|
||||
|
@ -28,7 +28,7 @@ module Arm
|
||||
def is_simple
|
||||
right = @from
|
||||
if right.is_a?(Virtual::ObjectConstant)
|
||||
r_pos = assembler.position_for(right)
|
||||
r_pos = 5 #assembler.position_for(right)
|
||||
# do pc relative addressing with the difference to the instuction
|
||||
# 8 is for the funny pipeline adjustment (ie pc pointing to fetch and not execute)
|
||||
right = Virtual::IntegerConstant.new( r_pos - self.position - 8 )
|
||||
|
@ -5,11 +5,6 @@ module Arm
|
||||
class StackInstruction < Register::StackInstruction
|
||||
include Arm::Constants
|
||||
|
||||
# arm intrucioons are pretty sensible, and always 4 bytes (thumb not supported)
|
||||
def length
|
||||
4
|
||||
end
|
||||
|
||||
def initialize(first , attributes)
|
||||
super(first , attributes)
|
||||
@attributes[:update_status] = 0 if @attributes[:update_status] == nil
|
||||
|
Reference in New Issue
Block a user