1 /* tc-mn10300.c -- Assembler code for the Matsushita 10300
3 Copyright (C) 1996, 1997, 1998 Free Software Foundation.
5 This file is part of GAS, the GNU Assembler.
7 GAS is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
12 GAS is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GAS; see the file COPYING. If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. */
26 #include "opcode/mn10300.h"
28 /* Structure to hold information about predefined registers. */
35 /* Generic assembler global variables which must be defined by all targets. */
37 /* Characters which always start a comment. */
38 const char comment_chars
[] = "#";
40 /* Characters which start a comment at the beginning of a line. */
41 const char line_comment_chars
[] = ";#";
43 /* Characters which may be used to separate multiple commands on a
45 const char line_separator_chars
[] = ";";
47 /* Characters which are used to indicate an exponent in a floating
49 const char EXP_CHARS
[] = "eE";
51 /* Characters which mean that a number is a floating point constant,
53 const char FLT_CHARS
[] = "dD";
56 const relax_typeS md_relax_table
[] = {
59 {0x7fff, -0x8000, 5, 2},
60 {0x7fffffff, -0x80000000, 7, 0},
62 /* bCC relaxing (uncommon cases) */
64 {0x7fff, -0x8000, 6, 5},
65 {0x7fffffff, -0x80000000, 8, 0},
68 {0x7fff, -0x8000, 5, 7},
69 {0x7fffffff, -0x80000000, 7, 0},
72 {0x7fff, -0x8000, 4, 9},
73 {0x7fffffff, -0x80000000, 6, 0},
77 {0x7fff, -0x8000, 3, 12},
78 {0x7fffffff, -0x80000000, 5, 0},
83 static void mn10300_insert_operand
PARAMS ((unsigned long *, unsigned long *,
84 const struct mn10300_operand
*,
85 offsetT
, char *, unsigned,
87 static unsigned long check_operand
PARAMS ((unsigned long,
88 const struct mn10300_operand
*,
90 static int reg_name_search
PARAMS ((const struct reg_name
*, int, const char *));
91 static boolean data_register_name
PARAMS ((expressionS
*expressionP
));
92 static boolean address_register_name
PARAMS ((expressionS
*expressionP
));
93 static boolean other_register_name
PARAMS ((expressionS
*expressionP
));
94 static void set_arch_mach
PARAMS ((int));
96 static int current_machine
;
99 #define MAX_INSN_FIXUPS (5)
104 bfd_reloc_code_real_type reloc
;
106 struct mn10300_fixup fixups
[MAX_INSN_FIXUPS
];
109 /* We must store the value of each register operand so that we can
110 verify that certain registers do not match. */
111 int mn10300_reg_operands
[MN10300_MAX_OPERANDS
];
113 const char *md_shortopts
= "";
114 struct option md_longopts
[] = {
115 {NULL
, no_argument
, NULL
, 0}
117 size_t md_longopts_size
= sizeof(md_longopts
);
119 /* The target specific pseudo-ops which we support. */
120 const pseudo_typeS md_pseudo_table
[] =
122 { "am30", set_arch_mach
, 300 },
123 /* start-sanitize-cygnus */
124 { "am33", set_arch_mach
, 330 },
125 /* end-sanitize-cygnus */
126 { "mn10300", set_arch_mach
, 300 },
130 /* Opcode hash table. */
131 static struct hash_control
*mn10300_hash
;
133 /* This table is sorted. Suitable for searching by a binary search. */
134 static const struct reg_name data_registers
[] =
141 #define DATA_REG_NAME_CNT (sizeof(data_registers) / sizeof(struct reg_name))
143 static const struct reg_name address_registers
[] =
150 #define ADDRESS_REG_NAME_CNT (sizeof(address_registers) / sizeof(struct reg_name))
152 /* start-sanitize-cygnus */
153 static const struct reg_name r_registers
[] =
196 #define R_REG_NAME_CNT (sizeof(r_registers) / sizeof(struct reg_name))
198 static const struct reg_name xr_registers
[] =
222 #define XR_REG_NAME_CNT (sizeof(xr_registers) / sizeof(struct reg_name))
224 /* end-sanitize-cygnus */
226 static const struct reg_name other_registers
[] =
232 #define OTHER_REG_NAME_CNT (sizeof(other_registers) / sizeof(struct reg_name))
234 /* reg_name_search does a binary search of the given register table
235 to see if "name" is a valid regiter name. Returns the register
236 number from the array on success, or -1 on failure. */
239 reg_name_search (regs
, regcount
, name
)
240 const struct reg_name
*regs
;
244 int middle
, low
, high
;
252 middle
= (low
+ high
) / 2;
253 cmp
= strcasecmp (name
, regs
[middle
].name
);
259 return regs
[middle
].value
;
266 /* start-sanitize-cygnus */
267 /* Summary of register_name().
269 * in: Input_line_pointer points to 1st char of operand.
271 * out: A expressionS.
272 * The operand may have been a register: in this case, X_op == O_register,
273 * X_add_number is set to the register number, and truth is returned.
274 * Input_line_pointer->(next non-blank) char after operand, or is in
275 * its original state.
278 r_register_name (expressionP
)
279 expressionS
*expressionP
;
286 /* Find the spelling of the operand */
287 start
= name
= input_line_pointer
;
289 c
= get_symbol_end ();
290 reg_number
= reg_name_search (r_registers
, R_REG_NAME_CNT
, name
);
292 /* look to see if it's in the register table */
295 expressionP
->X_op
= O_register
;
296 expressionP
->X_add_number
= reg_number
;
298 /* make the rest nice */
299 expressionP
->X_add_symbol
= NULL
;
300 expressionP
->X_op_symbol
= NULL
;
301 *input_line_pointer
= c
; /* put back the delimiting char */
306 /* reset the line as if we had not done anything */
307 *input_line_pointer
= c
; /* put back the delimiting char */
308 input_line_pointer
= start
; /* reset input_line pointer */
313 /* Summary of register_name().
315 * in: Input_line_pointer points to 1st char of operand.
317 * out: A expressionS.
318 * The operand may have been a register: in this case, X_op == O_register,
319 * X_add_number is set to the register number, and truth is returned.
320 * Input_line_pointer->(next non-blank) char after operand, or is in
321 * its original state.
324 xr_register_name (expressionP
)
325 expressionS
*expressionP
;
332 /* Find the spelling of the operand */
333 start
= name
= input_line_pointer
;
335 c
= get_symbol_end ();
336 reg_number
= reg_name_search (xr_registers
, XR_REG_NAME_CNT
, name
);
338 /* look to see if it's in the register table */
341 expressionP
->X_op
= O_register
;
342 expressionP
->X_add_number
= reg_number
;
344 /* make the rest nice */
345 expressionP
->X_add_symbol
= NULL
;
346 expressionP
->X_op_symbol
= NULL
;
347 *input_line_pointer
= c
; /* put back the delimiting char */
352 /* reset the line as if we had not done anything */
353 *input_line_pointer
= c
; /* put back the delimiting char */
354 input_line_pointer
= start
; /* reset input_line pointer */
358 /* end-sanitize-cygnus */
360 /* Summary of register_name().
362 * in: Input_line_pointer points to 1st char of operand.
364 * out: A expressionS.
365 * The operand may have been a register: in this case, X_op == O_register,
366 * X_add_number is set to the register number, and truth is returned.
367 * Input_line_pointer->(next non-blank) char after operand, or is in
368 * its original state.
371 data_register_name (expressionP
)
372 expressionS
*expressionP
;
379 /* Find the spelling of the operand */
380 start
= name
= input_line_pointer
;
382 c
= get_symbol_end ();
383 reg_number
= reg_name_search (data_registers
, DATA_REG_NAME_CNT
, name
);
385 /* look to see if it's in the register table */
388 expressionP
->X_op
= O_register
;
389 expressionP
->X_add_number
= reg_number
;
391 /* make the rest nice */
392 expressionP
->X_add_symbol
= NULL
;
393 expressionP
->X_op_symbol
= NULL
;
394 *input_line_pointer
= c
; /* put back the delimiting char */
399 /* reset the line as if we had not done anything */
400 *input_line_pointer
= c
; /* put back the delimiting char */
401 input_line_pointer
= start
; /* reset input_line pointer */
406 /* Summary of register_name().
408 * in: Input_line_pointer points to 1st char of operand.
410 * out: A expressionS.
411 * The operand may have been a register: in this case, X_op == O_register,
412 * X_add_number is set to the register number, and truth is returned.
413 * Input_line_pointer->(next non-blank) char after operand, or is in
414 * its original state.
417 address_register_name (expressionP
)
418 expressionS
*expressionP
;
425 /* Find the spelling of the operand */
426 start
= name
= input_line_pointer
;
428 c
= get_symbol_end ();
429 reg_number
= reg_name_search (address_registers
, ADDRESS_REG_NAME_CNT
, name
);
431 /* look to see if it's in the register table */
434 expressionP
->X_op
= O_register
;
435 expressionP
->X_add_number
= reg_number
;
437 /* make the rest nice */
438 expressionP
->X_add_symbol
= NULL
;
439 expressionP
->X_op_symbol
= NULL
;
440 *input_line_pointer
= c
; /* put back the delimiting char */
445 /* reset the line as if we had not done anything */
446 *input_line_pointer
= c
; /* put back the delimiting char */
447 input_line_pointer
= start
; /* reset input_line pointer */
452 /* Summary of register_name().
454 * in: Input_line_pointer points to 1st char of operand.
456 * out: A expressionS.
457 * The operand may have been a register: in this case, X_op == O_register,
458 * X_add_number is set to the register number, and truth is returned.
459 * Input_line_pointer->(next non-blank) char after operand, or is in
460 * its original state.
463 other_register_name (expressionP
)
464 expressionS
*expressionP
;
471 /* Find the spelling of the operand */
472 start
= name
= input_line_pointer
;
474 c
= get_symbol_end ();
475 reg_number
= reg_name_search (other_registers
, OTHER_REG_NAME_CNT
, name
);
477 /* look to see if it's in the register table */
480 expressionP
->X_op
= O_register
;
481 expressionP
->X_add_number
= reg_number
;
483 /* make the rest nice */
484 expressionP
->X_add_symbol
= NULL
;
485 expressionP
->X_op_symbol
= NULL
;
486 *input_line_pointer
= c
; /* put back the delimiting char */
491 /* reset the line as if we had not done anything */
492 *input_line_pointer
= c
; /* put back the delimiting char */
493 input_line_pointer
= start
; /* reset input_line pointer */
499 md_show_usage (stream
)
502 fprintf(stream
, _("MN10300 options:\n\
507 md_parse_option (c
, arg
)
515 md_undefined_symbol (name
)
522 md_atof (type
, litp
, sizep
)
528 LITTLENUM_TYPE words
[4];
544 return "bad call to md_atof";
547 t
= atof_ieee (input_line_pointer
, type
, words
);
549 input_line_pointer
= t
;
553 for (i
= prec
- 1; i
>= 0; i
--)
555 md_number_to_chars (litp
, (valueT
) words
[i
], 2);
564 md_convert_frag (abfd
, sec
, fragP
)
569 static unsigned long label_count
= 0;
572 subseg_change (sec
, 0);
573 if (fragP
->fr_subtype
== 0)
575 fix_new (fragP
, fragP
->fr_fix
+ 1, 1, fragP
->fr_symbol
,
576 fragP
->fr_offset
+ 1, 1, BFD_RELOC_8_PCREL
);
580 else if (fragP
->fr_subtype
== 1)
582 /* Reverse the condition of the first branch. */
583 int offset
= fragP
->fr_fix
;
584 int opcode
= fragP
->fr_literal
[offset
] & 0xff;
621 fragP
->fr_literal
[offset
] = opcode
;
623 /* Create a fixup for the reversed conditional branch. */
624 sprintf (buf
, ".%s_%d", FAKE_LABEL_NAME
, label_count
++);
625 fix_new (fragP
, fragP
->fr_fix
+ 1, 1,
626 symbol_new (buf
, sec
, 0, fragP
->fr_next
),
627 fragP
->fr_offset
+ 1, 1, BFD_RELOC_8_PCREL
);
629 /* Now create the unconditional branch + fixup to the
631 fragP
->fr_literal
[offset
+ 2] = 0xcc;
632 fix_new (fragP
, fragP
->fr_fix
+ 3, 2, fragP
->fr_symbol
,
633 fragP
->fr_offset
+ 1, 1, BFD_RELOC_16_PCREL
);
637 else if (fragP
->fr_subtype
== 2)
639 /* Reverse the condition of the first branch. */
640 int offset
= fragP
->fr_fix
;
641 int opcode
= fragP
->fr_literal
[offset
] & 0xff;
678 fragP
->fr_literal
[offset
] = opcode
;
680 /* Create a fixup for the reversed conditional branch. */
681 sprintf (buf
, ".%s_%d", FAKE_LABEL_NAME
, label_count
++);
682 fix_new (fragP
, fragP
->fr_fix
+ 1, 1,
683 symbol_new (buf
, sec
, 0, fragP
->fr_next
),
684 fragP
->fr_offset
+ 1, 1, BFD_RELOC_8_PCREL
);
686 /* Now create the unconditional branch + fixup to the
688 fragP
->fr_literal
[offset
+ 2] = 0xdc;
689 fix_new (fragP
, fragP
->fr_fix
+ 3, 4, fragP
->fr_symbol
,
690 fragP
->fr_offset
+ 1, 1, BFD_RELOC_32_PCREL
);
694 else if (fragP
->fr_subtype
== 3)
696 fix_new (fragP
, fragP
->fr_fix
+ 2, 1, fragP
->fr_symbol
,
697 fragP
->fr_offset
+ 2, 1, BFD_RELOC_8_PCREL
);
701 else if (fragP
->fr_subtype
== 4)
703 /* Reverse the condition of the first branch. */
704 int offset
= fragP
->fr_fix
;
705 int opcode
= fragP
->fr_literal
[offset
+ 1] & 0xff;
724 fragP
->fr_literal
[offset
+ 1] = opcode
;
726 /* Create a fixup for the reversed conditional branch. */
727 sprintf (buf
, ".%s_%d", FAKE_LABEL_NAME
, label_count
++);
728 fix_new (fragP
, fragP
->fr_fix
+ 2, 1,
729 symbol_new (buf
, sec
, 0, fragP
->fr_next
),
730 fragP
->fr_offset
+ 2, 1, BFD_RELOC_8_PCREL
);
732 /* Now create the unconditional branch + fixup to the
734 fragP
->fr_literal
[offset
+ 3] = 0xcc;
735 fix_new (fragP
, fragP
->fr_fix
+ 4, 2, fragP
->fr_symbol
,
736 fragP
->fr_offset
+ 1, 1, BFD_RELOC_16_PCREL
);
740 else if (fragP
->fr_subtype
== 5)
742 /* Reverse the condition of the first branch. */
743 int offset
= fragP
->fr_fix
;
744 int opcode
= fragP
->fr_literal
[offset
+ 1] & 0xff;
760 fragP
->fr_literal
[offset
+ 1] = opcode
;
762 /* Create a fixup for the reversed conditional branch. */
763 sprintf (buf
, ".%s_%d", FAKE_LABEL_NAME
, label_count
++);
764 fix_new (fragP
, fragP
->fr_fix
+ 2, 1,
765 symbol_new (buf
, sec
, 0, fragP
->fr_next
),
766 fragP
->fr_offset
+ 2, 1, BFD_RELOC_8_PCREL
);
768 /* Now create the unconditional branch + fixup to the
770 fragP
->fr_literal
[offset
+ 3] = 0xdc;
771 fix_new (fragP
, fragP
->fr_fix
+ 4, 4, fragP
->fr_symbol
,
772 fragP
->fr_offset
+ 1, 1, BFD_RELOC_32_PCREL
);
776 else if (fragP
->fr_subtype
== 6)
778 int offset
= fragP
->fr_fix
;
779 fragP
->fr_literal
[offset
] = 0xcd;
780 fix_new (fragP
, fragP
->fr_fix
+ 1, 2, fragP
->fr_symbol
,
781 fragP
->fr_offset
+ 1, 1, BFD_RELOC_16_PCREL
);
785 else if (fragP
->fr_subtype
== 7)
787 int offset
= fragP
->fr_fix
;
788 fragP
->fr_literal
[offset
] = 0xdd;
789 fragP
->fr_literal
[offset
+ 5] = fragP
->fr_literal
[offset
+ 3];
790 fragP
->fr_literal
[offset
+ 6] = fragP
->fr_literal
[offset
+ 4];
792 fix_new (fragP
, fragP
->fr_fix
+ 1, 4, fragP
->fr_symbol
,
793 fragP
->fr_offset
+ 1, 1, BFD_RELOC_32_PCREL
);
797 else if (fragP
->fr_subtype
== 8)
799 int offset
= fragP
->fr_fix
;
800 fragP
->fr_literal
[offset
] = 0xfa;
801 fragP
->fr_literal
[offset
+ 1] = 0xff;
802 fix_new (fragP
, fragP
->fr_fix
+ 2, 2, fragP
->fr_symbol
,
803 fragP
->fr_offset
+ 2, 1, BFD_RELOC_16_PCREL
);
807 else if (fragP
->fr_subtype
== 9)
809 int offset
= fragP
->fr_fix
;
810 fragP
->fr_literal
[offset
] = 0xfc;
811 fragP
->fr_literal
[offset
+ 1] = 0xff;
813 fix_new (fragP
, fragP
->fr_fix
+ 2, 4, fragP
->fr_symbol
,
814 fragP
->fr_offset
+ 2, 1, BFD_RELOC_32_PCREL
);
818 else if (fragP
->fr_subtype
== 10)
820 fragP
->fr_literal
[fragP
->fr_fix
] = 0xca;
821 fix_new (fragP
, fragP
->fr_fix
+ 1, 1, fragP
->fr_symbol
,
822 fragP
->fr_offset
+ 1, 1, BFD_RELOC_8_PCREL
);
826 else if (fragP
->fr_subtype
== 11)
828 int offset
= fragP
->fr_fix
;
829 fragP
->fr_literal
[offset
] = 0xcc;
831 fix_new (fragP
, fragP
->fr_fix
+ 1, 4, fragP
->fr_symbol
,
832 fragP
->fr_offset
+ 1, 1, BFD_RELOC_16_PCREL
);
836 else if (fragP
->fr_subtype
== 12)
838 int offset
= fragP
->fr_fix
;
839 fragP
->fr_literal
[offset
] = 0xdc;
841 fix_new (fragP
, fragP
->fr_fix
+ 1, 4, fragP
->fr_symbol
,
842 fragP
->fr_offset
+ 1, 1, BFD_RELOC_32_PCREL
);
851 md_section_align (seg
, addr
)
855 int align
= bfd_get_section_alignment (stdoutput
, seg
);
856 return ((addr
+ (1 << align
) - 1) & (-1 << align
));
862 char *prev_name
= "";
863 register const struct mn10300_opcode
*op
;
865 mn10300_hash
= hash_new();
867 /* Insert unique names into hash table. The MN10300 instruction set
868 has many identical opcode names that have different opcodes based
869 on the operands. This hash table then provides a quick index to
870 the first opcode with a particular name in the opcode table. */
872 op
= mn10300_opcodes
;
875 if (strcmp (prev_name
, op
->name
))
877 prev_name
= (char *) op
->name
;
878 hash_insert (mn10300_hash
, op
->name
, (char *) op
);
883 /* This is both a simplification (we don't have to write md_apply_fix)
884 and support for future optimizations (branch shortening and similar
885 stuff in the linker). */
888 /* Set the default machine type. */
889 if (!bfd_set_arch_mach (stdoutput
, bfd_arch_mn10300
, 300))
890 as_warn (_("could not set architecture and machine"));
892 current_machine
= 300;
900 struct mn10300_opcode
*opcode
;
901 struct mn10300_opcode
*next_opcode
;
902 const unsigned char *opindex_ptr
;
903 int next_opindex
, relaxable
;
904 unsigned long insn
, extension
, size
= 0;
909 /* Get the opcode. */
910 for (s
= str
; *s
!= '\0' && ! isspace (*s
); s
++)
915 /* find the first opcode with the proper name */
916 opcode
= (struct mn10300_opcode
*)hash_find (mn10300_hash
, str
);
919 as_bad (_("Unrecognized opcode: `%s'"), str
);
924 while (isspace (*str
))
927 input_line_pointer
= str
;
937 errmsg
= _("Invalid opcode/operands");
939 /* Reset the array of register operands. */
940 memset (mn10300_reg_operands
, -1, sizeof (mn10300_reg_operands
));
946 insn
= opcode
->opcode
;
949 /* If the instruction is not available on the current machine
950 then it can not possibly match. */
952 && (opcode
->machine
!= current_machine
))
955 for (op_idx
= 1, opindex_ptr
= opcode
->operands
;
957 opindex_ptr
++, op_idx
++)
959 const struct mn10300_operand
*operand
;
962 if (next_opindex
== 0)
964 operand
= &mn10300_operands
[*opindex_ptr
];
968 operand
= &mn10300_operands
[next_opindex
];
972 while (*str
== ' ' || *str
== ',')
975 if (operand
->flags
& MN10300_OPERAND_RELAX
)
978 /* Gather the operand. */
979 hold
= input_line_pointer
;
980 input_line_pointer
= str
;
982 if (operand
->flags
& MN10300_OPERAND_PAREN
)
984 if (*input_line_pointer
!= ')' && *input_line_pointer
!= '(')
986 input_line_pointer
= hold
;
990 input_line_pointer
++;
993 /* See if we can match the operands. */
994 else if (operand
->flags
& MN10300_OPERAND_DREG
)
996 if (!data_register_name (&ex
))
998 input_line_pointer
= hold
;
1003 else if (operand
->flags
& MN10300_OPERAND_AREG
)
1005 if (!address_register_name (&ex
))
1007 input_line_pointer
= hold
;
1012 else if (operand
->flags
& MN10300_OPERAND_SP
)
1014 char *start
= input_line_pointer
;
1015 char c
= get_symbol_end ();
1017 if (strcasecmp (start
, "sp") != 0)
1019 *input_line_pointer
= c
;
1020 input_line_pointer
= hold
;
1024 *input_line_pointer
= c
;
1027 /* start-sanitize-cygnus */
1028 else if (operand
->flags
& MN10300_OPERAND_RREG
)
1030 if (!r_register_name (&ex
))
1032 input_line_pointer
= hold
;
1037 else if (operand
->flags
& MN10300_OPERAND_XRREG
)
1039 if (!xr_register_name (&ex
))
1041 input_line_pointer
= hold
;
1046 else if (operand
->flags
& MN10300_OPERAND_USP
)
1048 char *start
= input_line_pointer
;
1049 char c
= get_symbol_end ();
1051 if (strcasecmp (start
, "usp") != 0)
1053 *input_line_pointer
= c
;
1054 input_line_pointer
= hold
;
1058 *input_line_pointer
= c
;
1061 else if (operand
->flags
& MN10300_OPERAND_SSP
)
1063 char *start
= input_line_pointer
;
1064 char c
= get_symbol_end ();
1066 if (strcasecmp (start
, "ssp") != 0)
1068 *input_line_pointer
= c
;
1069 input_line_pointer
= hold
;
1073 *input_line_pointer
= c
;
1076 else if (operand
->flags
& MN10300_OPERAND_MSP
)
1078 char *start
= input_line_pointer
;
1079 char c
= get_symbol_end ();
1081 if (strcasecmp (start
, "msp") != 0)
1083 *input_line_pointer
= c
;
1084 input_line_pointer
= hold
;
1088 *input_line_pointer
= c
;
1091 else if (operand
->flags
& MN10300_OPERAND_PC
)
1093 char *start
= input_line_pointer
;
1094 char c
= get_symbol_end ();
1096 if (strcasecmp (start
, "pc") != 0)
1098 *input_line_pointer
= c
;
1099 input_line_pointer
= hold
;
1103 *input_line_pointer
= c
;
1106 else if (operand
->flags
& MN10300_OPERAND_EPSW
)
1108 char *start
= input_line_pointer
;
1109 char c
= get_symbol_end ();
1111 if (strcasecmp (start
, "epsw") != 0)
1113 *input_line_pointer
= c
;
1114 input_line_pointer
= hold
;
1118 *input_line_pointer
= c
;
1121 else if (operand
->flags
& MN10300_OPERAND_PLUS
)
1123 if (*input_line_pointer
!= '+')
1125 input_line_pointer
= hold
;
1129 input_line_pointer
++;
1132 /* end-sanitize-cygnus */
1133 else if (operand
->flags
& MN10300_OPERAND_PSW
)
1135 char *start
= input_line_pointer
;
1136 char c
= get_symbol_end ();
1138 if (strcasecmp (start
, "psw") != 0)
1140 *input_line_pointer
= c
;
1141 input_line_pointer
= hold
;
1145 *input_line_pointer
= c
;
1148 else if (operand
->flags
& MN10300_OPERAND_MDR
)
1150 char *start
= input_line_pointer
;
1151 char c
= get_symbol_end ();
1153 if (strcasecmp (start
, "mdr") != 0)
1155 *input_line_pointer
= c
;
1156 input_line_pointer
= hold
;
1160 *input_line_pointer
= c
;
1163 else if (operand
->flags
& MN10300_OPERAND_REG_LIST
)
1165 unsigned int value
= 0;
1166 if (*input_line_pointer
!= '[')
1168 input_line_pointer
= hold
;
1174 input_line_pointer
++;
1176 /* We used to reject a null register list here; however,
1177 we accept it now so the compiler can emit "call" instructions
1178 for all calls to named functions.
1180 The linker can then fill in the appropriate bits for the
1181 register list and stack size or change the instruction
1182 into a "calls" if using "call" is not profitable. */
1183 while (*input_line_pointer
!= ']')
1188 if (*input_line_pointer
== ',')
1189 input_line_pointer
++;
1191 start
= input_line_pointer
;
1192 c
= get_symbol_end ();
1194 if (strcasecmp (start
, "d2") == 0)
1197 *input_line_pointer
= c
;
1199 else if (strcasecmp (start
, "d3") == 0)
1202 *input_line_pointer
= c
;
1204 else if (strcasecmp (start
, "a2") == 0)
1207 *input_line_pointer
= c
;
1209 else if (strcasecmp (start
, "a3") == 0)
1212 *input_line_pointer
= c
;
1214 else if (strcasecmp (start
, "other") == 0)
1217 *input_line_pointer
= c
;
1219 /* start-sanitize-cygnus */
1220 else if (strcasecmp (start
, "exreg0") == 0)
1223 *input_line_pointer
= c
;
1225 else if (strcasecmp (start
, "exreg1") == 0)
1228 *input_line_pointer
= c
;
1230 else if (strcasecmp (start
, "exother") == 0)
1233 *input_line_pointer
= c
;
1235 else if (strcasecmp (start
, "all") == 0)
1238 *input_line_pointer
= c
;
1240 /* end-sanitize-cygnus */
1243 input_line_pointer
= hold
;
1248 input_line_pointer
++;
1249 mn10300_insert_operand (&insn
, &extension
, operand
,
1250 value
, (char *) NULL
, 0, 0);
1254 else if (data_register_name (&ex
))
1256 input_line_pointer
= hold
;
1260 else if (address_register_name (&ex
))
1262 input_line_pointer
= hold
;
1266 else if (other_register_name (&ex
))
1268 input_line_pointer
= hold
;
1272 /* start-sanitize-cygnus */
1273 else if (r_register_name (&ex
))
1275 input_line_pointer
= hold
;
1279 else if (xr_register_name (&ex
))
1281 input_line_pointer
= hold
;
1285 /* end-sanitize-cygnus */
1286 else if (*str
== ')' || *str
== '(')
1288 input_line_pointer
= hold
;
1300 errmsg
= _("illegal operand");
1303 errmsg
= _("missing operand");
1309 mask
= MN10300_OPERAND_DREG
| MN10300_OPERAND_AREG
;
1310 /* start-sanitize-cygnus */
1311 mask
|= MN10300_OPERAND_RREG
| MN10300_OPERAND_XRREG
;
1312 /* end-sanitize-cygnus */
1313 if ((operand
->flags
& mask
) == 0)
1315 input_line_pointer
= hold
;
1320 if (opcode
->format
== FMT_D1
|| opcode
->format
== FMT_S1
)
1322 else if (opcode
->format
== FMT_D2
1323 || opcode
->format
== FMT_D4
1324 || opcode
->format
== FMT_S2
1325 || opcode
->format
== FMT_S4
1326 || opcode
->format
== FMT_S6
1327 || opcode
->format
== FMT_D5
)
1329 /* start-sanitize-cygnus */
1330 else if (opcode
->format
== FMT_D7
)
1332 else if (opcode
->format
== FMT_D8
|| opcode
->format
== FMT_D9
)
1334 /* end-sanitize-cygnus */
1338 mn10300_insert_operand (&insn
, &extension
, operand
,
1339 ex
.X_add_number
, (char *) NULL
,
1343 /* And note the register number in the register array. */
1344 mn10300_reg_operands
[op_idx
- 1] = ex
.X_add_number
;
1349 /* If this operand can be promoted, and it doesn't
1350 fit into the allocated bitfield for this insn,
1351 then promote it (ie this opcode does not match). */
1353 & (MN10300_OPERAND_PROMOTE
| MN10300_OPERAND_RELAX
)
1354 && ! check_operand (insn
, operand
, ex
.X_add_number
))
1356 input_line_pointer
= hold
;
1361 mn10300_insert_operand (&insn
, &extension
, operand
,
1362 ex
.X_add_number
, (char *) NULL
,
1367 /* If this operand can be promoted, then this opcode didn't
1368 match since we can't know if it needed promotion! */
1369 if (operand
->flags
& MN10300_OPERAND_PROMOTE
)
1371 input_line_pointer
= hold
;
1376 /* We need to generate a fixup for this expression. */
1377 if (fc
>= MAX_INSN_FIXUPS
)
1378 as_fatal (_("too many fixups"));
1379 fixups
[fc
].exp
= ex
;
1380 fixups
[fc
].opindex
= *opindex_ptr
;
1381 fixups
[fc
].reloc
= BFD_RELOC_UNUSED
;
1387 str
= input_line_pointer
;
1388 input_line_pointer
= hold
;
1390 while (*str
== ' ' || *str
== ',')
1395 /* Make sure we used all the operands! */
1399 /* If this instruction has registers that must not match, verify
1400 that they do indeed not match. */
1401 if (opcode
->no_match_operands
)
1405 /* Look at each operand to see if it's marked. */
1406 for (i
= 0; i
< MN10300_MAX_OPERANDS
; i
++)
1408 if ((1 << i
) & opcode
->no_match_operands
)
1412 /* operand I is marked. Check that it does not match any
1413 operands > I which are marked. */
1414 for (j
= i
+ 1; j
< MN10300_MAX_OPERANDS
; j
++)
1416 if (((1 << j
) & opcode
->no_match_operands
)
1417 && mn10300_reg_operands
[i
] == mn10300_reg_operands
[j
])
1419 errmsg
= _("Invalid register specification.");
1431 next_opcode
= opcode
+ 1;
1432 if (!strcmp(next_opcode
->name
, opcode
->name
))
1434 opcode
= next_opcode
;
1438 as_bad ("%s", errmsg
);
1444 while (isspace (*str
))
1448 as_bad (_("junk at end of line: `%s'"), str
);
1450 input_line_pointer
= str
;
1452 /* Determine the size of the instruction. */
1453 if (opcode
->format
== FMT_S0
)
1456 if (opcode
->format
== FMT_S1
|| opcode
->format
== FMT_D0
)
1459 if (opcode
->format
== FMT_S2
|| opcode
->format
== FMT_D1
)
1462 /* start-sanitize-cygnus */
1463 if (opcode
->format
== FMT_D6
)
1466 if (opcode
->format
== FMT_D7
|| opcode
->format
== FMT_D10
)
1469 if (opcode
->format
== FMT_D8
)
1472 if (opcode
->format
== FMT_D9
)
1474 /* end-sanitize-cygnus */
1476 if (opcode
->format
== FMT_S4
)
1479 if (opcode
->format
== FMT_S6
|| opcode
->format
== FMT_D5
)
1482 if (opcode
->format
== FMT_D2
)
1485 if (opcode
->format
== FMT_D4
)
1488 if (relaxable
&& fc
> 0)
1495 /* Handle bra specially. Basically treat it like jmp so
1496 that we automatically handle 8, 16 and 32 bit offsets
1497 correctly as well as jumps to an undefined address.
1499 It is also important to not treat it like other bCC
1500 instructions since the long forms of bra is different
1501 from other bCC instructions. */
1502 if (opcode
->opcode
== 0xca00)
1514 else if (size
== 3 && opcode
->opcode
== 0xcc0000)
1516 /* bCC (uncommon cases) */
1520 f
= frag_var (rs_machine_dependent
, 8, 8 - size
, type
,
1521 fixups
[0].exp
.X_add_symbol
,
1522 fixups
[0].exp
.X_add_number
,
1523 (char *)fixups
[0].opindex
);
1525 /* This is pretty hokey. We basically just care about the
1526 opcode, so we have to write out the first word big endian.
1528 The exception is "call", which has two operands that we
1531 The first operand (the register list) happens to be in the
1532 first instruction word, and will be in the right place if
1533 we output the first word in big endian mode.
1535 The second operand (stack size) is in the extension word,
1536 and we want it to appear as the first character in the extension
1537 word (as it appears in memory). Luckily, writing the extension
1538 word in big endian format will do what we want. */
1539 number_to_chars_bigendian (f
, insn
, size
> 4 ? 4 : size
);
1542 number_to_chars_bigendian (f
+ 4, extension
, 4);
1543 number_to_chars_bigendian (f
+ 8, 0, size
- 8);
1546 number_to_chars_bigendian (f
+ 4, extension
, size
- 4);
1550 /* Allocate space for the instruction. */
1551 f
= frag_more (size
);
1553 /* Fill in bytes for the instruction. Note that opcode fields
1554 are written big-endian, 16 & 32bit immediates are written
1555 little endian. Egad. */
1556 if (opcode
->format
== FMT_S0
1557 || opcode
->format
== FMT_S1
1558 || opcode
->format
== FMT_D0
1559 /* start-sanitize-cygnus */
1560 || opcode
->format
== FMT_D6
1561 || opcode
->format
== FMT_D7
1562 || opcode
->format
== FMT_D10
1563 /* end-sanitize-cygnus */
1564 || opcode
->format
== FMT_D1
)
1566 number_to_chars_bigendian (f
, insn
, size
);
1568 else if (opcode
->format
== FMT_S2
1569 && opcode
->opcode
!= 0xdf0000
1570 && opcode
->opcode
!= 0xde0000)
1572 /* A format S2 instruction that is _not_ "ret" and "retf". */
1573 number_to_chars_bigendian (f
, (insn
>> 16) & 0xff, 1);
1574 number_to_chars_littleendian (f
+ 1, insn
& 0xffff, 2);
1576 else if (opcode
->format
== FMT_S2
)
1578 /* This must be a ret or retf, which is written entirely in
1579 big-endian format. */
1580 number_to_chars_bigendian (f
, insn
, 3);
1582 else if (opcode
->format
== FMT_S4
1583 && opcode
->opcode
!= 0xdc000000)
1585 /* This must be a format S4 "call" instruction. What a pain. */
1586 unsigned long temp
= (insn
>> 8) & 0xffff;
1587 number_to_chars_bigendian (f
, (insn
>> 24) & 0xff, 1);
1588 number_to_chars_littleendian (f
+ 1, temp
, 2);
1589 number_to_chars_bigendian (f
+ 3, insn
& 0xff, 1);
1590 number_to_chars_bigendian (f
+ 4, extension
& 0xff, 1);
1592 else if (opcode
->format
== FMT_S4
)
1594 /* This must be a format S4 "jmp" instruction. */
1595 unsigned long temp
= ((insn
& 0xffffff) << 8) | (extension
& 0xff);
1596 number_to_chars_bigendian (f
, (insn
>> 24) & 0xff, 1);
1597 number_to_chars_littleendian (f
+ 1, temp
, 4);
1599 else if (opcode
->format
== FMT_S6
)
1601 unsigned long temp
= ((insn
& 0xffffff) << 8)
1602 | ((extension
>> 16) & 0xff);
1603 number_to_chars_bigendian (f
, (insn
>> 24) & 0xff, 1);
1604 number_to_chars_littleendian (f
+ 1, temp
, 4);
1605 number_to_chars_bigendian (f
+ 5, (extension
>> 8) & 0xff, 1);
1606 number_to_chars_bigendian (f
+ 6, extension
& 0xff, 1);
1608 else if (opcode
->format
== FMT_D2
1609 && opcode
->opcode
!= 0xfaf80000
1610 && opcode
->opcode
!= 0xfaf00000
1611 && opcode
->opcode
!= 0xfaf40000)
1613 /* A format D2 instruction where the 16bit immediate is
1614 really a single 16bit value, not two 8bit values. */
1615 number_to_chars_bigendian (f
, (insn
>> 16) & 0xffff, 2);
1616 number_to_chars_littleendian (f
+ 2, insn
& 0xffff, 2);
1618 else if (opcode
->format
== FMT_D2
)
1620 /* A format D2 instruction where the 16bit immediate
1621 is really two 8bit immediates. */
1622 number_to_chars_bigendian (f
, insn
, 4);
1624 else if (opcode
->format
== FMT_D4
)
1626 unsigned long temp
= ((insn
& 0xffff) << 16) | (extension
& 0xffff);
1627 number_to_chars_bigendian (f
, (insn
>> 16) & 0xffff, 2);
1628 number_to_chars_littleendian (f
+ 2, temp
, 4);
1630 else if (opcode
->format
== FMT_D5
)
1632 unsigned long temp
= ((insn
& 0xffff) << 16)
1633 | ((extension
>> 8) & 0xffff);
1634 number_to_chars_bigendian (f
, (insn
>> 16) & 0xffff, 2);
1635 number_to_chars_littleendian (f
+ 2, temp
, 4);
1636 number_to_chars_bigendian (f
+ 6, extension
& 0xff, 1);
1638 /* start-sanitize-cygnus */
1639 else if (opcode
->format
== FMT_D8
)
1641 unsigned long temp
= ((insn
& 0xff) << 16) | (extension
& 0xffff);
1642 number_to_chars_bigendian (f
, (insn
>> 8) & 0xffffff, 3);
1643 number_to_chars_bigendian (f
+ 3, (temp
& 0xff), 1);
1644 number_to_chars_littleendian (f
+ 4, temp
>> 8, 2);
1646 else if (opcode
->format
== FMT_D9
)
1648 unsigned long temp
= ((insn
& 0xff) << 24) | (extension
& 0xffffff);
1649 number_to_chars_bigendian (f
, (insn
>> 8) & 0xffffff, 3);
1650 number_to_chars_littleendian (f
+ 3, temp
, 4);
1652 /* end-sanitize-cygnus */
1654 /* Create any fixups. */
1655 for (i
= 0; i
< fc
; i
++)
1657 const struct mn10300_operand
*operand
;
1659 operand
= &mn10300_operands
[fixups
[i
].opindex
];
1660 if (fixups
[i
].reloc
!= BFD_RELOC_UNUSED
)
1662 reloc_howto_type
*reloc_howto
;
1667 reloc_howto
= bfd_reloc_type_lookup (stdoutput
, fixups
[i
].reloc
);
1672 size
= bfd_get_reloc_size (reloc_howto
);
1674 if (size
< 1 || size
> 4)
1678 fixP
= fix_new_exp (frag_now
, f
- frag_now
->fr_literal
+ offset
,
1679 size
, &fixups
[i
].exp
,
1680 reloc_howto
->pc_relative
,
1685 int reloc
, pcrel
, reloc_size
, offset
;
1688 reloc
= BFD_RELOC_NONE
;
1689 /* How big is the reloc? Remember SPLIT relocs are
1690 implicitly 32bits. */
1691 if ((operand
->flags
& MN10300_OPERAND_SPLIT
) != 0)
1693 /* start-sanitize-cygnus */
1694 else if ((operand
->flags
& MN10300_OPERAND_24BIT
) != 0)
1696 /* end-sanitize-cygnus */
1698 reloc_size
= operand
->bits
;
1700 /* Is the reloc pc-relative? */
1701 pcrel
= (operand
->flags
& MN10300_OPERAND_PCREL
) != 0;
1703 /* Gross. This disgusting hack is to make sure we
1704 get the right offset for the 16/32 bit reloc in
1705 "call" instructions. Basically they're a pain
1706 because the reloc isn't at the end of the instruction. */
1707 if ((size
== 5 || size
== 7)
1708 && (((insn
>> 24) & 0xff) == 0xcd
1709 || ((insn
>> 24) & 0xff) == 0xdd))
1712 /* Similarly for certain bit instructions which don't
1713 hav their 32bit reloc at the tail of the instruction. */
1715 && (((insn
>> 16) & 0xffff) == 0xfe00
1716 || ((insn
>> 16) & 0xffff) == 0xfe01
1717 || ((insn
>> 16) & 0xffff) == 0xfe02))
1720 offset
= size
- reloc_size
/ 8;
1722 /* Choose a proper BFD relocation type. */
1725 if (reloc_size
== 32)
1726 reloc
= BFD_RELOC_32_PCREL
;
1727 else if (reloc_size
== 16)
1728 reloc
= BFD_RELOC_16_PCREL
;
1729 else if (reloc_size
== 8)
1730 reloc
= BFD_RELOC_8_PCREL
;
1736 if (reloc_size
== 32)
1737 reloc
= BFD_RELOC_32
;
1738 else if (reloc_size
== 16)
1739 reloc
= BFD_RELOC_16
;
1740 else if (reloc_size
== 8)
1741 reloc
= BFD_RELOC_8
;
1746 /* Convert the size of the reloc into what fix_new_exp wants. */
1747 reloc_size
= reloc_size
/ 8;
1748 if (reloc_size
== 8)
1750 else if (reloc_size
== 16)
1752 else if (reloc_size
== 32)
1755 fixP
= fix_new_exp (frag_now
, f
- frag_now
->fr_literal
+ offset
,
1756 reloc_size
, &fixups
[i
].exp
, pcrel
,
1757 ((bfd_reloc_code_real_type
) reloc
));
1760 fixP
->fx_offset
+= offset
;
1767 /* if while processing a fixup, a reloc really needs to be created */
1768 /* then it is done here */
1771 tc_gen_reloc (seg
, fixp
)
1776 reloc
= (arelent
*) xmalloc (sizeof (arelent
));
1778 reloc
->howto
= bfd_reloc_type_lookup (stdoutput
, fixp
->fx_r_type
);
1779 if (reloc
->howto
== (reloc_howto_type
*) NULL
)
1781 as_bad_where (fixp
->fx_file
, fixp
->fx_line
,
1782 _("reloc %d not supported by object file format"),
1783 (int)fixp
->fx_r_type
);
1786 reloc
->address
= fixp
->fx_frag
->fr_address
+ fixp
->fx_where
;
1788 if (fixp
->fx_addsy
&& fixp
->fx_subsy
)
1791 if ((S_GET_SEGMENT (fixp
->fx_addsy
) != S_GET_SEGMENT (fixp
->fx_subsy
))
1792 || S_GET_SEGMENT (fixp
->fx_addsy
) == undefined_section
)
1794 as_bad_where (fixp
->fx_file
, fixp
->fx_line
,
1795 "Difference of symbols in different sections is not supported");
1799 reloc
->sym_ptr_ptr
= &bfd_abs_symbol
;
1800 reloc
->addend
= (S_GET_VALUE (fixp
->fx_addsy
)
1801 - S_GET_VALUE (fixp
->fx_subsy
) + fixp
->fx_offset
);
1805 reloc
->sym_ptr_ptr
= &fixp
->fx_addsy
->bsym
;
1806 reloc
->addend
= fixp
->fx_offset
;
1812 md_estimate_size_before_relax (fragp
, seg
)
1816 if (fragp
->fr_subtype
== 0)
1818 if (fragp
->fr_subtype
== 3)
1820 if (fragp
->fr_subtype
== 6)
1822 if (!S_IS_DEFINED (fragp
->fr_symbol
)
1823 || seg
!= S_GET_SEGMENT (fragp
->fr_symbol
))
1825 fragp
->fr_subtype
= 7;
1831 if (fragp
->fr_subtype
== 8)
1833 if (!S_IS_DEFINED (fragp
->fr_symbol
)
1834 || seg
!= S_GET_SEGMENT (fragp
->fr_symbol
))
1836 fragp
->fr_subtype
= 9;
1842 if (fragp
->fr_subtype
== 10)
1844 if (!S_IS_DEFINED (fragp
->fr_symbol
)
1845 || seg
!= S_GET_SEGMENT (fragp
->fr_symbol
))
1847 fragp
->fr_subtype
= 12;
1856 md_pcrel_from (fixp
)
1859 return fixp
->fx_frag
->fr_address
;
1861 if (fixp
->fx_addsy
!= (symbolS
*) NULL
&& ! S_IS_DEFINED (fixp
->fx_addsy
))
1863 /* The symbol is undefined. Let the linker figure it out. */
1866 return fixp
->fx_frag
->fr_address
+ fixp
->fx_where
;
1871 md_apply_fix3 (fixp
, valuep
, seg
)
1876 /* We shouldn't ever get here because linkrelax is nonzero. */
1882 /* Insert an operand value into an instruction. */
1885 mn10300_insert_operand (insnp
, extensionp
, operand
, val
, file
, line
, shift
)
1886 unsigned long *insnp
;
1887 unsigned long *extensionp
;
1888 const struct mn10300_operand
*operand
;
1894 /* No need to check 32bit operands for a bit. Note that
1895 MN10300_OPERAND_SPLIT is an implicit 32bit operand. */
1896 if (operand
->bits
!= 32
1897 && (operand
->flags
& MN10300_OPERAND_SPLIT
) == 0)
1903 bits
= operand
->bits
;
1904 /* start-sanitize-cygnus */
1905 if (operand
->flags
& MN10300_OPERAND_24BIT
)
1907 /* end-sanitize-cygnus */
1909 if ((operand
->flags
& MN10300_OPERAND_SIGNED
) != 0)
1911 max
= (1 << (bits
- 1)) - 1;
1912 min
= - (1 << (bits
- 1));
1916 max
= (1 << bits
) - 1;
1923 if (test
< (offsetT
) min
|| test
> (offsetT
) max
)
1926 _("operand out of range (%s not between %ld and %ld)");
1929 sprint_value (buf
, test
);
1930 if (file
== (char *) NULL
)
1931 as_warn (err
, buf
, min
, max
);
1933 as_warn_where (file
, line
, err
, buf
, min
, max
);
1937 if ((operand
->flags
& MN10300_OPERAND_SPLIT
) != 0)
1939 *insnp
|= (val
>> (32 - operand
->bits
)) & ((1 << operand
->bits
) - 1);
1940 *extensionp
|= ((val
& ((1 << (32 - operand
->bits
)) - 1))
1943 /* start-sanitize-cygnus */
1944 else if ((operand
->flags
& MN10300_OPERAND_24BIT
) != 0)
1946 *insnp
|= (val
>> (24 - operand
->bits
)) & ((1 << operand
->bits
) - 1);
1947 *extensionp
|= ((val
& ((1 << (24 - operand
->bits
)) - 1))
1950 /* end-sanitize-cygnus */
1951 else if ((operand
->flags
& MN10300_OPERAND_EXTENDED
) == 0)
1953 *insnp
|= (((long) val
& ((1 << operand
->bits
) - 1))
1954 << (operand
->shift
+ shift
));
1956 if ((operand
->flags
& MN10300_OPERAND_REPEATED
) != 0)
1957 *insnp
|= (((long) val
& ((1 << operand
->bits
) - 1))
1958 << (operand
->shift
+ shift
+ operand
->bits
));
1962 *extensionp
|= (((long) val
& ((1 << operand
->bits
) - 1))
1963 << (operand
->shift
+ shift
));
1965 if ((operand
->flags
& MN10300_OPERAND_REPEATED
) != 0)
1966 *extensionp
|= (((long) val
& ((1 << operand
->bits
) - 1))
1967 << (operand
->shift
+ shift
+ operand
->bits
));
1971 static unsigned long
1972 check_operand (insn
, operand
, val
)
1974 const struct mn10300_operand
*operand
;
1977 /* No need to check 32bit operands for a bit. Note that
1978 MN10300_OPERAND_SPLIT is an implicit 32bit operand. */
1979 if (operand
->bits
!= 32
1980 && (operand
->flags
& MN10300_OPERAND_SPLIT
) == 0)
1986 bits
= operand
->bits
;
1987 /* start-sanitize-cygnus */
1988 if (operand
->flags
& MN10300_OPERAND_24BIT
)
1990 /* end-sanitize-cygnus */
1992 if ((operand
->flags
& MN10300_OPERAND_SIGNED
) != 0)
1994 max
= (1 << (bits
- 1)) - 1;
1995 min
= - (1 << (bits
- 1));
1999 max
= (1 << bits
) - 1;
2006 if (test
< (offsetT
) min
|| test
> (offsetT
) max
)
2015 set_arch_mach (mach
)
2018 if (!bfd_set_arch_mach (stdoutput
, bfd_arch_mn10300
, mach
))
2019 as_warn (_("could not set architecture and machine"));
2021 current_machine
= mach
;