give arm own instruction base class back

This commit is contained in:
Torsten Ruger
2018-03-26 20:04:39 +03:00
parent 4a26bec0f1
commit c5b3c3f106
8 changed files with 45 additions and 21 deletions

View File

@ -2,9 +2,7 @@ module Arm
# ADDRESSING MODE 2
# Implemented: immediate offset with offset=0
class MemoryInstruction < Risc::Instruction
include Constants
include Attributed
class MemoryInstruction < Instruction
def initialize result , left , right = nil , attributes = {}
super(nil)
@ -46,7 +44,7 @@ module Arm
# but gnu as produces same output for auto_inc or not, so that seems broken
# luckily auto_inc is not used and even if it clobbers unused reg in soml, but still
val = shift(val , 0 )
val = shift(val , 0 )
val |= shift(reg_code(arg) , 16)
val |= shift(i , 25)
write_val(val, io)