Lines Matching refs:MODE
63 How far Forward this mode will reach.
64 How far Backward this mode will reach.
65 How many bytes this mode will add to the size of the frag.
66 Which mode to go to if the offset won't fit in this one. */
149 int mode;
250 /* Change the direct addressing mode into an absolute addressing mode
309 /* .mode instruction (ala SH). */
310 {"mode", s_m68hc11_mode, 0},
340 {"strict-direct-mode", no_argument, NULL, OPTION_STRICT_DIRECT_MODE},
429 --strict-direct-mode do not turn the direct mode into extended mode\n\
430 when the instruction does not support direct mode\n\
598 #define IS_CALL_SYMBOL(MODE) \
599 (((MODE) & (M6812_OP_PAGE|M6811_OP_IND16)) \
1138 Operand mode[0] mode[1] exp[0] exp[1]
1155 int mode;
1161 mode = M6811_OP_NONE;
1173 mode = M6811_OP_DIRECT;
1185 mode = M6811_OP_IMM16;
1190 mode |= M6811_OP_HIGH_ADDR;
1195 mode |= M6811_OP_LOW_ADDR;
1202 mode |= M6811_OP_PAGE_ADDR;
1213 mode |= M6811_OP_CALL_ADDR;
1219 mode = M6811_OP_JUMP_REL;
1227 mode = M6812_OP_D_IDX;
1241 oper->mode = M6812_OP_IDX;
1244 as_bad (_("Spurious `,' or bad indirect register addressing mode."));
1251 mode = M6811_OP_PAGE_ADDR | M6812_OP_PAGE | M6811_OP_IND16;
1255 if (mode == M6811_OP_NONE || mode == M6812_OP_D_IDX)
1263 if (*p == ']' && mode == M6812_OP_D_IDX)
1266 (_("Missing second register or offset for indexed-indirect mode."));
1271 oper->mode = mode | M6812_OP_REG;
1274 if (mode == M6812_OP_D_IDX)
1276 as_bad (_("Missing second register for indexed-indirect mode."));
1288 if (mode == M6812_OP_D_IDX)
1292 as_bad (_("Missing `]' to close indexed-indirect mode."));
1296 oper->mode = M6812_OP_D_IDX;
1306 /* In MRI mode, isolate the operand because we can't distinguish
1348 if (mode == M6811_OP_NONE || mode == M6811_OP_DIRECT
1349 || mode == M6812_OP_D_IDX)
1362 if (mode == M6811_OP_NONE)
1381 addressing mode (as in N,x). */
1382 if (reg == REG_NONE && mode == M6811_OP_NONE
1385 oper->mode = M6811_OP_IND16 | M6811_OP_JUMP_REL;
1391 mode = possible_mode;
1395 as_bad (_("Pre-increment mode is not valid for 68HC11"));
1405 if (reg == REG_NONE && mode != M6811_OP_DIRECT
1406 && !(mode == M6811_OP_NONE && opmode & M6811_OP_IND16))
1408 as_bad (_("Wrong register in register indirect mode."));
1411 if (mode == M6812_OP_D_IDX)
1421 oper->mode = M6812_OP_D_IDX_2;
1427 if (mode == M6811_OP_NONE)
1432 mode = M6812_POST_DEC;
1436 (_("Post-decrement mode is not valid for 68HC11."));
1440 mode = M6812_POST_INC;
1444 (_("Post-increment mode is not valid for 68HC11."));
1447 mode = M6812_OP_IDX;
1452 mode |= M6812_OP_IDX;
1454 oper->mode = mode;
1460 if (mode == M6812_OP_D_IDX_2)
1462 as_bad (_("Invalid indexed indirect mode."));
1467 /* If the mode is not known until now, this is either a label
1469 if (mode == M6811_OP_NONE)
1470 mode = M6811_OP_IND16 | M6811_OP_JUMP_REL;
1476 oper->mode = mode;
1484 /* Checks that the number 'num' fits for a given mode. */
1486 check_range (long num, int mode)
1490 switch (mode)
1520 if (mode & M6812_AUTO_INC_DEC)
1524 if (mode & (M6812_INDEXED_IND | M6812_INDEXED | M6812_OP_IDX))
1525 mode = M6811_OP_IND16;
1527 if (mode & M6812_OP_JUMP_REL16)
1528 mode = M6811_OP_IND16;
1530 mode &= ~M6811_OP_BRANCH;
1531 switch (mode)
1574 fixup8 (expressionS *oper, int mode, int opmode)
1582 if (mode & M6812_OP_TRAP_ID
1595 if (!(mode & M6812_OP_TRAP_ID)
1596 && !check_range (oper->X_add_number, mode))
1604 if (mode & M6812_OP_TRAP_ID)
1607 if (mode == M6811_OP_JUMP_REL)
1644 fixup16 (expressionS *oper, int mode, int opmode ATTRIBUTE_UNUSED)
1652 if (!check_range (oper->X_add_number, mode))
1664 if ((opmode & M6811_OP_CALL_ADDR) && (mode & M6811_OP_IMM16))
1666 else if (mode & M6812_OP_JUMP_REL16)
1668 else if (mode & M6812_OP_PAGE)
1692 fixup24 (expressionS *oper, int mode, int opmode ATTRIBUTE_UNUSED)
1700 if (!check_range (oper->X_add_number, mode))
1723 fixup8_xg (expressionS *oper, int mode, int opmode)
1748 if (!(check_range (oper->X_add_number, mode)))
1756 if (mode == M68XG_OP_REL9)
1763 else if (mode == M68XG_OP_REL10)
2070 int mode;
2074 mode = op->mode;
2075 if (mode & M6812_AUTO_INC_DEC)
2078 if (mode & (M6812_POST_INC | M6812_POST_DEC))
2083 if (!check_range (val, mode))
2087 if (mode & (M6812_POST_INC | M6812_PRE_INC))
2120 if (mode & (M6812_OP_IDX | M6812_OP_D_IDX_2))
2151 && ((!(mode & M6812_OP_IDX) && !(mode & M6812_OP_D_IDX_2))
2159 if (val >= -16 && val <= 15 && !(mode & M6812_OP_D_IDX_2))
2167 else if (val >= -256 && val <= 255 && !(mode & M6812_OP_D_IDX_2))
2181 if (mode & M6812_OP_D_IDX_2)
2193 if (mode & M6812_OP_D_IDX_2)
2219 if ((mode & M6812_OP_IDX) && (current_architecture & cpu9s12x))
2274 if (mode & (M6812_OP_REG | M6812_OP_D_IDX))
2276 if (mode & M6812_OP_D_IDX)
2279 as_bad (_("Expecting register D for indexed indirect mode."));
2281 as_bad (_("Indexed indirect mode is not allowed for movb/movw."));
2331 fprintf (stderr, "mode = 0x%x\nop->reg1 = 0x%x\nop->reg2 = 0x%x\n",
2332 mode, op->reg1, op->reg2);
2333 as_fatal (_("Addressing mode not implemented yet."));
2337 /* Assemble the 68HC12 register mode byte. */
2385 if (!(operands[0].mode & (M6811_OP_LOW_ADDR | M6811_OP_HIGH_ADDR)))
2387 operands[0].mode = 0;
2394 fixup8_xg (&operands[0].exp, format, operands[0].mode);
2406 operands[0].mode = M6811_OP_LOW_ADDR;
2416 operands[0].mode = M6811_OP_HIGH_ADDR;
2511 operands[i].mode);
2518 operands[i].mode);
2525 operands[i].mode);
2535 fixup8 (&operands[0].exp, M6811_OP_IX, operands[0].mode);
2552 fixup8 (&operands[i].exp, M6811_OP_BITMASK, operands[i].mode);
2557 fixup8 (&operands[i].exp, M6811_OP_JUMP_REL, operands[i].mode);
2561 fixup16 (&operands[1].exp, M6811_OP_IND16, operands[1].mode);
2565 fixup8 (&operands[i].exp, M6812_OP_PAGE, operands[i].mode);
2592 if (opcode->format == operands[nb_operands-1].mode)
2624 int mode = operands[i].mode;
2626 if (mode & M6811_OP_IMM16)
2633 if (mode == M6811_OP_DIRECT)
2639 possible <abs-16> addressing mode. We mark
2649 if (mode & M6811_OP_IND16)
2660 if (mode & (M6811_OP_JUMP_REL | M6812_OP_JUMP_REL16))
2665 if (mode & M6812_OP_REG)
2689 if (mode & M6812_OP_IDX)
2705 if (mode & format & (M6812_OP_D_IDX | M6812_OP_D_IDX_2))
2710 if (mode & M6812_AUTO_INC_DEC)
2723 /* Operands are ok but an operand uses page 0 addressing mode
2724 while the insn supports abs-16 mode. Keep a reference to this
2780 && (operands[i].mode & M6811_OP_IND16))
2782 operands[i].mode = M6811_OP_IMM16;
2948 operands[0].mode = M68XG_OP_R;
2983 operands[0].mode = M68XG_OP_IMM3;
3048 operands[0].mode = M68XG_OP_R;
3070 as_bad ("No valid mode found\n");
3097 /* For other command formats, parse input line and determine the mode
3133 /* Some kind of immediate mode, check if this is possible. */
3136 as_bad ("Invalid immediate mode for `%s'", opc->opcode->name);
3144 operands[0].mode = M6811_OP_HIGH_ADDR;
3149 operands[0].mode = M6811_OP_LOW_ADDR;
3152 operands[0].mode = 0;
3165 /* ok so far, can only be one mode */
3170 operands[0].mode = M68XG_OP_R_IMM4;
3178 as_bad ("Only constants supported at for IMM4 mode\n");
3192 operands[0].mode = M68XG_OP_R_IMM16;
3224 operands[0].mode = M68XG_OP_R_R;
3260 as_bad ("No valid mode found\n");
3283 operands[0].mode = M68XG_OP_R_R_R;
3297 as_bad ("No valid mode found\n");
3361 /* Ok so far, can only be one mode. */
3363 operands[0].mode = M68XG_OP_R_R_OFFS5;
3373 ("Only constants supported for indexed OFFS5 mode\n");
3394 operands[0].mode = M68XG_OP_RD_RB_RI;
3398 operands[0].mode = M68XG_OP_RD_RB_mRI;
3415 operands[0].mode = M68XG_OP_RD_RB_RIp;
3450 as_bad (_("Failed to find a valid mode for `%s'."),
3601 if (operands[1].mode & (M6812_OP_IDX | M6812_OP_IDX_1
3605 /* first check if valid mode then start building it up */
3606 if (operands[0].mode & (M6811_OP_IMM8 | M6811_OP_IMM16
3611 if (operands[1].mode & (M6811_OP_IND16))
3618 if (operands[0].mode & (M6811_OP_IMM8 | M6811_OP_IMM16))
3621 build_indexed_byte (&operands[1], operands[1].mode, 1);
3624 operands[0].mode);
3627 operands[0].mode);
3631 else if (operands[0].mode & M6811_OP_IND16)
3634 build_indexed_byte (&operands[1], operands[1].mode, 1);
3635 fixup16 (&operands[0].exp, M6811_OP_IND16, operands[0].mode);
3641 build_indexed_byte (&operands[0], operands[0].mode, 1);
3642 build_indexed_byte (&operands[1], operands[1].mode, 1);
3647 else if (operands[1].mode & M6811_OP_IND16)
3649 /* First check if this is valid mode, then start building it up. */
3650 if (operands[0].mode & (M6811_OP_IMM8 | M6811_OP_IMM16
3655 if (operands[1].mode & (M6811_OP_IND16))
3664 if (operands[0].mode & (M6811_OP_IMM8 | M6811_OP_IMM16))
3668 fixup8 (&operands[0].exp, M6811_OP_IMM8, operands[0].mode);
3670 fixup16 (&operands[0].exp, M6811_OP_IMM16, operands[0].mode);
3672 fixup16 (&operands[0].exp, M6811_OP_IND16, operands[0].mode);
3675 else if (operands[0].mode & M6811_OP_IND16)
3678 build_indexed_byte (&operands[1], operands[1].mode, 1);
3679 fixup16 (&operands[0].exp, M6811_OP_IND16, operands[0].mode);
3685 build_indexed_byte (&operands[0], operands[0].mode, 1);
3686 fixup16 (&operands[1].exp, M6811_OP_IND16, operands[1].mode);
3751 as_warn (_("Invalid mode: %s\n"), name);
4175 /* Switch the indexed operation to 16-bit mode. */