Lines Matching refs:operand
28 enum operand {OP_NONE,OP_REG,OP_SHIMM,OP_LIMM}; enum
32 enum operand ls_operand[OPERANDS];
332 const struct arc_operand *operand, in insert_reg() argument
339 enum operand op_type = OP_NONE; in insert_reg()
360 if ('a' != operand->fmt) in insert_reg()
372 insn |= marker << operand->shift; in insert_reg()
381 insn |= ARC_REG_LIMM << operand->shift; in insert_reg()
407 insn |= ARC_REG_SHIMM << operand->shift; in insert_reg()
414 if ('a' == operand->fmt || ((insn & I(-1)) < I(2))) in insert_reg()
419 if ('a' != operand->fmt) in insert_reg()
430 insn |= reg->value << operand->shift; in insert_reg()
435 switch (operand->fmt) in insert_reg()
461 const struct arc_operand *operand ATTRIBUTE_UNUSED, in insert_flag()
478 const struct arc_operand *operand, in insert_nullify() argument
485 insn |= (value & ((1 << operand->bits) - 1)) << operand->shift; in insert_nullify()
496 const struct arc_operand *operand, in insert_flagfinish() argument
507 insn |= (1 << operand->shift); in insert_flagfinish()
516 const struct arc_operand *operand, in insert_cond() argument
523 insn |= (value & ((1 << operand->bits) - 1)) << operand->shift; in insert_cond()
535 const struct arc_operand *operand ATTRIBUTE_UNUSED, in insert_forcelimm()
547 const struct arc_operand *operand, in insert_addr_wb() argument
553 addrwb_p = 1 << operand->shift; in insert_addr_wb()
559 const struct arc_operand *operand, in insert_base() argument
568 myinsn = insert_reg (0, operand,mods, reg, value, errmsg) >> operand->shift; in insert_base()
583 insn |= ARC_REG_SHIMM << operand->shift; in insert_base()
610 const struct arc_operand *operand, in insert_offset() argument
621 myinsn = insert_reg (0,operand,mods,reg,value,errmsg) >> operand->shift; in insert_offset()
623 if (operand->flags & ARC_OPERAND_LOAD) /* Not if store, catch it later. */ in insert_offset()
631 if (operand->flags & ARC_OPERAND_SIGNED) in insert_offset()
633 minval = -(1 << (operand->bits - 1)); in insert_offset()
634 maxval = (1 << (operand->bits - 1)) - 1; in insert_offset()
639 maxval = (1 << operand->bits) - 1; in insert_offset()
650 if (operand->flags & ARC_OPERAND_STORE) in insert_offset()
652 if (operand->flags & ARC_OPERAND_LOAD) in insert_offset()
670 if (limm_p && operand->flags & ARC_OPERAND_LOAD) in insert_offset()
679 && operand->flags & ARC_OPERAND_STORE) in insert_offset()
686 && operand->flags & ARC_OPERAND_STORE) in insert_offset()
706 const struct arc_operand *operand ATTRIBUTE_UNUSED, in extract_st_syntax()
754 const struct arc_operand *operand ATTRIBUTE_UNUSED, in insert_st_syntax()
829 const struct arc_operand *operand ATTRIBUTE_UNUSED, in insert_ld_syntax()
869 const struct arc_operand *operand ATTRIBUTE_UNUSED, in extract_ld_syntax()
899 const struct arc_operand *operand, in insert_shimmfinish() argument
906 insn |= (shimm & ((1 << operand->bits) - 1)) << operand->shift; in insert_shimmfinish()
924 const struct arc_operand *operand ATTRIBUTE_UNUSED, in insert_limmfinish()
935 const struct arc_operand *operand, in insert_jumpflags() argument
953 else if ((value & ((1 << operand->bits) - 1)) != value) in insert_jumpflags()
957 limm = ((limm & ((1 << operand->shift) - 1)) in insert_jumpflags()
958 | ((value & ((1 << operand->bits) - 1)) << operand->shift)); in insert_jumpflags()
966 const struct arc_operand *operand, in insert_unopmacro() argument
972 insn |= ((insn >> ARC_SHIFT_REGB) & ARC_MASK_REG) << operand->shift; in insert_unopmacro()
980 const struct arc_operand *operand, in insert_reladdr() argument
988 insn |= ((value >> 2) & ((1 << operand->bits) - 1)) << operand->shift; in insert_reladdr()
1008 const struct arc_operand *operand ATTRIBUTE_UNUSED, in insert_absaddr()
1052 if (ext_oper->operand.type == type && ext_oper->operand.value == regno) in lookup_register()
1053 return (&ext_oper->operand); in lookup_register()
1077 const struct arc_operand *operand, in extract_reg() argument
1084 enum operand op_type; in extract_reg()
1087 regno = (*insn >> operand->shift) & ((1 << operand->bits) - 1); in extract_reg()
1095 if ('a' != operand->fmt) in extract_reg()
1098 if ((operand->flags & ARC_OPERAND_SIGNED) in extract_reg()
1113 if ('a' != operand->fmt) in extract_reg()
1116 if ((operand->flags & ARC_OPERAND_SIGNED) && (value & 256)) in extract_reg()
1163 switch(operand->fmt) in extract_reg()
1190 const struct arc_operand *operand, in extract_flag() argument
1201 f = (*insn & (1 << operand->shift)) != 0; in extract_flag()
1207 val = arc_opcode_lookup_suffix (operand, 1); in extract_flag()
1220 const struct arc_operand *operand, in extract_cond() argument
1231 cond = (*insn >> operand->shift) & ((1 << operand->bits) - 1); in extract_cond()
1232 val = arc_opcode_lookup_suffix (operand, cond); in extract_cond()
1246 const struct arc_operand *operand, in extract_reladdr() argument
1253 addr = (*insn >> operand->shift) & ((1 << operand->bits) - 1); in extract_reladdr()
1254 if ((operand->flags & ARC_OPERAND_SIGNED) in extract_reladdr()
1255 && (addr & (1 << (operand->bits - 1)))) in extract_reladdr()
1256 addr -= 1 << operand->bits; in extract_reladdr()
1264 const struct arc_operand *operand, in extract_jumpflags() argument
1272 ? (insn[1] >> operand->shift) & ((1 << operand->bits) -1): 0); in extract_jumpflags()
1279 const struct arc_operand *operand, in extract_st_offset() argument
1289 if ((operand->flags & ARC_OPERAND_SIGNED) && (value & 256)) in extract_st_offset()
1304 const struct arc_operand *operand, in extract_ld_offset() argument
1315 if ((operand->flags & ARC_OPERAND_SIGNED) && (value & 256)) in extract_ld_offset()
1333 const struct arc_operand *operand ATTRIBUTE_UNUSED, in extract_unopmacro()
1698 if (type == &arc_operands[ext_oper->operand.type] in arc_opcode_lookup_suffix()
1699 && value == ext_oper->operand.value) in arc_opcode_lookup_suffix()
1700 return (&ext_oper->operand); in arc_opcode_lookup_suffix()
1750 if ((COND == suffix->operand.type) in get_ext_suffix()
1751 && !strcmp(s,suffix->operand.name)) in get_ext_suffix()
1752 return(&suffix->operand); in get_ext_suffix()