*** empty log message ***
[deliverable/binutils-gdb.git] / cpu / sh.opc
CommitLineData
299d901c
AC
1/* SHmedia opcode support. -*- C -*-
2
47b0e7ad 3 Copyright 2000, 2005 Free Software Foundation, Inc.
299d901c
AC
4
5 Contributed by Red Hat Inc; developed under contract from Hitachi
6 Semiconductor (America) Inc.
7
8 This file is part of the GNU Binutils.
9
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.
14
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.
19
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
47b0e7ad
NC
22 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
23 MA 02110-1301, USA. */
299d901c 24
299d901c
AC
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.
31
32 Each section is delimited with start and end markers.
33
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"
47b0e7ad 38 <arch>-ibd.h additions use: "-- ibd.h" */
299d901c
AC
39\f
40/* -- opc.h */
41
42/* Allows reason codes to be output when assembler errors occur. */
43#define CGEN_VERBOSE_ASSEMBLER_ERRORS
44
45/* Override disassembly hashing - there are variable bits in the top
46 byte of these instructions. */
47#define CGEN_DIS_HASH_SIZE 8
48#define CGEN_DIS_HASH(buf,value) (((* (unsigned char*) (buf)) >> 6) % CGEN_DIS_HASH_SIZE)
49
50/* -- asm.c */
51
52static const char *
47b0e7ad
NC
53parse_fsd (CGEN_CPU_DESC cd,
54 const char ** strp,
55 int opindex,
56 long * valuep)
299d901c 57{
47b0e7ad 58 abort ();
299d901c
AC
59}
60
61/* -- dis.c */
62
63static void
47b0e7ad
NC
64print_likely (CGEN_CPU_DESC cd,
65 void * dis_info,
66 long value,
67 unsigned int attrs,
68 bfd_vma pc,
69 int length)
299d901c
AC
70{
71 disassemble_info *info = (disassemble_info *) dis_info;
47b0e7ad 72
299d901c
AC
73 (*info->fprintf_func) (info->stream, (value) ? "/l" : "/u");
74}
75
76/* -- */
This page took 0.141128 seconds and 4 git commands to generate.