#NEWLINE# def process_shifted_register( tokens ) : #NEWLINE# #INDENT# base = process_register ( tokens [ 'base' ] ) #NEWLINE# sh_type = tokens [ 'type' ] #NEWLINE# amount = tokens . get ( 'amount' , None ) #NEWLINE# if amount : #NEWLINE# #INDENT# if ( 'imm' in amount ) : #NEWLINE# #INDENT# amount = ArmImmediateOperand ( '' . join ( amount [ 'imm' ] ) , arch_info . operand_size ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( 'reg' in amount ) : #NEWLINE# #INDENT# amount = process_register ( amount [ 'reg' ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise Exception ( 'Unknown amount type.' ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return ArmShiftedRegisterOperand ( base , amount , amount , base . size )