1 /* SHmedia opcode support. -*- C -*-
3 Copyright 2000 Free Software Foundation, Inc.
5 Contributed by Red Hat Inc; developed under contract from Hitachi
6 Semiconductor (America) Inc.
8 This file is part of the GNU Binutils.
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
25 /* This file is an addendum to sh-media.cpu. Heavy use of C code isn't
26 appropriate in .cpu files, so it resides here. This especially applies
27 to assembly/disassembly where parsing/printing can be quite involved.
28 Such things aren't really part of the specification of the cpu, per se,
29 so .cpu files provide the general framework and .opc files handle the
30 nitty-gritty details as necessary.
32 Each section is delimited with start and end markers.
34 <arch>-opc.h additions use: "-- opc.h"
35 <arch>-opc.c additions use: "-- opc.c"
36 <arch>-asm.c additions use: "-- asm.c"
37 <arch>-dis.c additions use: "-- dis.c"
38 <arch>-ibd.h additions use: "-- ibd.h"
43 /* Allows reason codes to be output when assembler errors occur. */
44 #define CGEN_VERBOSE_ASSEMBLER_ERRORS
46 /* Override disassembly hashing - there are variable bits in the top
47 byte of these instructions. */
48 #define CGEN_DIS_HASH_SIZE 8
49 #define CGEN_DIS_HASH(buf,value) (((* (unsigned char*) (buf)) >> 6) % CGEN_DIS_HASH_SIZE)
54 parse_fsd (cd, strp, opindex, valuep)
66 print_likely (cd, dis_info, value, attrs, pc, length)
74 disassemble_info *info = (disassemble_info *) dis_info;
75 (*info->fprintf_func) (info->stream, (value) ? "/l" : "/u");