Lines Matching refs:operand

27 enum operand {OP_NONE,OP_REG,OP_SHIMM,OP_LIMM};
31 enum operand ls_operand[OPERANDS];
156 'U' UNOPMACRO fake operand to copy REGB to REGC for unop macros
186 /* Fake operand used to insert shimm value into most instructions. */
190 /* Fake operand used to insert limm value into most instructions. */
194 /* Shimm operand when there is no reg indicator (st). */
198 /* Shimm operand when there is no reg indicator (ld). */
226 /* Fake utility operand to finish 'f' suffix handling. */
230 /* Fake utility operand to set the 'f' flag for the "flag" insn. */
333 const struct arc_operand *operand,
340 enum operand op_type = OP_NONE;
361 if ('a' != operand->fmt)
373 insn |= marker << operand->shift;
382 insn |= ARC_REG_LIMM << operand->shift;
408 insn |= ARC_REG_SHIMM << operand->shift;
415 if ('a' == operand->fmt || ((insn & I(-1)) < I(2)))
420 if ('a' != operand->fmt)
431 insn |= reg->value << operand->shift;
436 switch (operand->fmt)
462 const struct arc_operand *operand ATTRIBUTE_UNUSED,
479 const struct arc_operand *operand,
486 insn |= (value & ((1 << operand->bits) - 1)) << operand->shift;
497 const struct arc_operand *operand,
508 insn |= (1 << operand->shift);
517 const struct arc_operand *operand,
524 insn |= (value & ((1 << operand->bits) - 1)) << operand->shift;
536 const struct arc_operand *operand ATTRIBUTE_UNUSED,
548 const struct arc_operand *operand,
554 addrwb_p = 1 << operand->shift;
560 const struct arc_operand *operand,
569 myinsn = insert_reg (0, operand,mods, reg, value, errmsg) >> operand->shift;
577 /* Convert the previous shimm operand to a limm. */
584 insn |= ARC_REG_SHIMM << operand->shift;
607 match operand syntax here. we catch bad combinations later. */
611 const struct arc_operand *operand,
622 myinsn = insert_reg (0,operand,mods,reg,value,errmsg) >> operand->shift;
624 if (operand->flags & ARC_OPERAND_LOAD) /* Not if store, catch it later. */
632 if (operand->flags & ARC_OPERAND_SIGNED)
634 minval = -(1 << (operand->bits - 1));
635 maxval = (1 << (operand->bits - 1)) - 1;
640 maxval = (1 << operand->bits) - 1;
651 if (operand->flags & ARC_OPERAND_STORE)
653 if (operand->flags & ARC_OPERAND_LOAD)
664 /* Check for bad operand combinations
671 if (limm_p && operand->flags & ARC_OPERAND_LOAD)
680 && operand->flags & ARC_OPERAND_STORE)
687 && operand->flags & ARC_OPERAND_STORE)
707 const struct arc_operand *operand ATTRIBUTE_UNUSED,
755 const struct arc_operand *operand ATTRIBUTE_UNUSED,
764 do it here than to try to handle it during operand scan. */
814 *errmsg = _("st operand error");
830 const struct arc_operand *operand ATTRIBUTE_UNUSED,
856 *errmsg = _("ld operand error");
870 const struct arc_operand *operand ATTRIBUTE_UNUSED,
900 const struct arc_operand *operand,
907 insn |= (shimm & ((1 << operand->bits) - 1)) << operand->shift;
925 const struct arc_operand *operand ATTRIBUTE_UNUSED,
936 const struct arc_operand *operand,
954 else if ((value & ((1 << operand->bits) - 1)) != value)
958 limm = ((limm & ((1 << operand->shift) - 1))
959 | ((value & ((1 << operand->bits) - 1)) << operand->shift));
963 /* Called at the end of unary operand macros to copy the B field to C. */
967 const struct arc_operand *operand,
973 insn |= ((insn >> ARC_SHIFT_REGB) & ARC_MASK_REG) << operand->shift;
981 const struct arc_operand *operand,
989 insn |= ((value >> 2) & ((1 << operand->bits) - 1)) << operand->shift;
1009 const struct arc_operand *operand ATTRIBUTE_UNUSED,
1054 if (ext_oper->operand.type == type && ext_oper->operand.value == regno)
1055 return (&ext_oper->operand);
1079 const struct arc_operand *operand,
1086 enum operand op_type;
1089 regno = (*insn >> operand->shift) & ((1 << operand->bits) - 1);
1097 if ('a' != operand->fmt)
1100 if ((operand->flags & ARC_OPERAND_SIGNED)
1115 if ('a' != operand->fmt)
1118 if ((operand->flags & ARC_OPERAND_SIGNED) && (value & 256))
1165 switch(operand->fmt)
1192 const struct arc_operand *operand,
1203 f = (*insn & (1 << operand->shift)) != 0;
1209 val = arc_opcode_lookup_suffix (operand, 1);
1222 const struct arc_operand *operand,
1233 cond = (*insn >> operand->shift) & ((1 << operand->bits) - 1);
1234 val = arc_opcode_lookup_suffix (operand, cond);
1248 const struct arc_operand *operand,
1255 addr = (*insn >> operand->shift) & ((1 << operand->bits) - 1);
1256 if ((operand->flags & ARC_OPERAND_SIGNED)
1257 && (addr & (1 << (operand->bits - 1))))
1258 addr -= 1 << operand->bits;
1266 const struct arc_operand *operand,
1274 ? (insn[1] >> operand->shift) & ((1 << operand->bits) -1): 0);
1281 const struct arc_operand *operand,
1291 if ((operand->flags & ARC_OPERAND_SIGNED) && (value & 256))
1306 const struct arc_operand *operand,
1317 if ((operand->flags & ARC_OPERAND_SIGNED) && (value & 256))
1335 const struct arc_operand *operand ATTRIBUTE_UNUSED,
1680 /* Called by the assembler to see if the insn has a limm operand.
1702 if (type == &arc_operands[ext_oper->operand.type]
1703 && value == ext_oper->operand.value)
1704 return (&ext_oper->operand);
1754 if ((COND == suffix->operand.type)
1755 && !strcmp(s,suffix->operand.name))
1756 return(&suffix->operand);