Lines Matching refs:instruction

36 /* Maximum size of a single instruction (in words).  */
65 /* Current instruction we're assembling. */
66 const inst *instruction;
73 /* Array to hold an instruction encoding. */
79 /* A copy of the original instruction (used in error messages). */
445 /* Reset global variables before parsing a new instruction. */
614 /* 'opcode' points to the start of the instruction, whether
615 we need to change the instruction's fixed encoding. */
699 /* Apply a fixS (fixup of an instruction or data that we didn't have
799 /* Insert unique names into hash table. The CR16 instruction set
896 switch (instruction->size)
934 switch (instruction->size)
1001 If the register is illegal for the current instruction,
1183 cr16_ins - Current assembled instruction. */
1223 For "lprd" and "sprd" instruction, only 32 bit
1364 This routine is used by assembling the 'excp' instruction. */
1385 /* Top level module where instruction parsing starts.
1387 operands - holds the operands part of the whole instruction. */
1397 if (streq (cr16_no_op_insn[i], instruction->mnemonic))
1418 /* bCC instruction requires special handling. */
1437 /* bCC instruction requires special handling. */
1448 /* Cinv instruction requires special handling. */
1475 If the register is illegal for the current instruction,
1514 If the register is illegal for the current instruction,
1562 If the register is illegal for the current instruction,
1600 If the register is illegal for the current instruction,
1714 if ((instruction->size > 2) && (shift == WORD_SHIFT))
1734 if (instruction->size == 2)
1748 /* When instruction size is 3 and 'shift' is 16, a 16-bit constant is
1758 if ((instruction->size > 2) && (shift == WORD_SHIFT))
1812 if (instruction->size == 3)
1863 if (instruction->size > 1)
1867 if (instruction->size == 2)
1869 else if (instruction->size == 1)
1881 /* Retrieve the number of operands for the current assembled instruction. */
1888 for (i = 0; instruction->operands[i].op_type && i < MAX_OPERANDS; i++)
1894 within its permitted range), based on the instruction's FLAGS.
1991 The checks are made after a matching instruction was found. */
1998 instruction is undefined. */
2053 /* Some instruction assume the stack pointer as rptr operand.
2055 if (instruction->flags & NO_SP)
2063 if (instruction->flags & NO_RPTR)
2071 /* In some cases, we need to adjust the instruction pointer although a
2073 Returns 1 if instruction pointer was adjusted, otherwise 0. */
2082 if ((instruction->operands[0].op_type == abs24)
2086 instruction--;
2094 /* Assemble a single instruction:
2096 For instruction to be assembled, we need to find an appropriate template in
2097 the instruction table, meeting the following conditions:
2100 3: Each operand size is sufficient to represent the instruction's values.
2117 /* Nonzero if an instruction with same number of operands was found. */
2119 /* Nonzero if an instruction with same argument types was found. */
2130 /* Retrieve data (based on FUNC) for each operand of a given instruction. */
2133 ARRAY[i] = FUNC (instruction->operands[i].op_type)
2142 output_opcode[0] = BIN (instruction->match, instruction->match_bits);
2146 /* In some case, same mnemonic can appear with different instruction types.
2149 We assume that when reaching this point, the instruction type was
2151 during a search for matching instruction. */
2152 ins_type = CR16_INS_TYPE (instruction->flags);
2157 && instruction->mnemonic != NULL
2160 /* Check that the instruction type wasn't changed. */
2187 /* If 'bal' instruction size is '2' and reg operand is not 'ra'
2188 then goto next instruction. */
2190 && (instruction->size == 2) && (insn->arg[i].rp != 14))
2193 /* If 'storb' instruction with 'sp' reg and 16-bit disp of
2196 if (IS_INSN_MNEMONIC ("storb") && (instruction->size == 2)
2201 current instruction may not be the last we try to match.
2228 /* Try again with next instruction. */
2230 instruction++;
2235 /* We haven't found a match - instruction can't be assembled. */
2265 /* Check whether we need to adjust the instruction pointer. */
2267 /* If instruction pointer was adjusted, we need to update
2273 int j = instruction->flags & REVERSE_MATCH ?
2285 /* First, copy the instruction's opcode. */
2286 output_opcode[0] = BIN (instruction->match, instruction->match_bits);
2292 if (IS_INSN_MNEMONIC ("bal") && (instruction->size == 2) && i == 0)
2298 print_operand (cur_size[i], instruction->operands[i].shift,
2306 /* Print the instruction.
2307 Handle also cases where the instruction is relaxable/relocatable. */
2324 insn_size = instruction->size;
2351 as_bad (_("instruction address is not a multiple of 2"));
2355 /* Write the instruction encoding to frag. */
2364 machine dependent instruction. This function is supposed to emit
2374 /* Reset global variables for a new instruction. */
2409 /* Find the instruction. */
2410 instruction = (const inst *) hash_find (cr16_inst_hash, op);
2424 /* Find the instruction. */
2425 instruction = (const inst *) hash_find (cr16_inst_hash, op);
2426 if (instruction == NULL)
2435 /* Parse the instruction's operands. */
2438 /* Assemble the instruction - return upon failure. */
2442 /* Print the instruction. */