Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(931)

Side by Side Diff: bfd/cpu-cris.c

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « bfd/cpu-cr16c.c ('k') | bfd/cpu-crx.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* BFD support for the Axis CRIS architecture. 1 /* BFD support for the Axis CRIS architecture.
2 Copyright 2000, 2002, 2004, 2005, 2007 2 Copyright 2000, 2002, 2004, 2005, 2007, 2012
3 Free Software Foundation, Inc. 3 Free Software Foundation, Inc.
4 Contributed by Axis Communications AB. 4 Contributed by Axis Communications AB.
5 Written by Hans-Peter Nilsson. 5 Written by Hans-Peter Nilsson.
6 6
7 This file is part of BFD, the Binary File Descriptor library. 7 This file is part of BFD, the Binary File Descriptor library.
8 8
9 This program is free software; you can redistribute it and/or modify 9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by 10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3 of the License, or 11 the Free Software Foundation; either version 3 of the License, or
12 (at your option) any later version. 12 (at your option) any later version.
(...skipping 10 matching lines...) Expand all
23 23
24 #include "sysdep.h" 24 #include "sysdep.h"
25 #include "bfd.h" 25 #include "bfd.h"
26 #include "libbfd.h" 26 #include "libbfd.h"
27 27
28 /* This routine is provided two arch_infos and returns the lowest common 28 /* This routine is provided two arch_infos and returns the lowest common
29 denominator. CRIS v0..v10 vs. v32 are not compatible in general, but 29 denominator. CRIS v0..v10 vs. v32 are not compatible in general, but
30 there's a compatible subset for which we provide an arch_info. */ 30 there's a compatible subset for which we provide an arch_info. */
31 31
32 static const bfd_arch_info_type * get_compatible 32 static const bfd_arch_info_type * get_compatible
33 PARAMS ((const bfd_arch_info_type *, const bfd_arch_info_type *)); 33 (const bfd_arch_info_type *, const bfd_arch_info_type *);
34 34
35 static const bfd_arch_info_type * 35 static const bfd_arch_info_type *
36 get_compatible (a,b) 36 get_compatible (const bfd_arch_info_type *a,
37 const bfd_arch_info_type *a; 37 » » const bfd_arch_info_type *b)
38 const bfd_arch_info_type *b;
39 { 38 {
40 /* Arches must match. */ 39 /* Arches must match. */
41 if (a->arch != b->arch) 40 if (a->arch != b->arch)
42 return NULL; 41 return NULL;
43 42
44 /* If either is the compatible mach, return the other. */ 43 /* If either is the compatible mach, return the other. */
45 if (a->mach == bfd_mach_cris_v10_v32) 44 if (a->mach == bfd_mach_cris_v10_v32)
46 return b; 45 return b;
47 if (b->mach == bfd_mach_cris_v10_v32) 46 if (b->mach == bfd_mach_cris_v10_v32)
48 return a; 47 return a;
(...skipping 13 matching lines...) Expand all
62 /* Except for the compatible mach, machs must match. */ 61 /* Except for the compatible mach, machs must match. */
63 if (a->mach != b->mach) 62 if (a->mach != b->mach)
64 return NULL; 63 return NULL;
65 #endif 64 #endif
66 65
67 return a; 66 return a;
68 } 67 }
69 68
70 #define N(NUMBER, PRINT, NEXT) \ 69 #define N(NUMBER, PRINT, NEXT) \
71 { 32, 32, 8, bfd_arch_cris, NUMBER, "cris", PRINT, 1, FALSE, \ 70 { 32, 32, 8, bfd_arch_cris, NUMBER, "cris", PRINT, 1, FALSE, \
72 get_compatible, bfd_default_scan, NEXT } 71 get_compatible, bfd_default_scan, bfd_arch_default_fill, NEXT }
73 72
74 static const bfd_arch_info_type bfd_cris_arch_compat_v10_v32 = 73 static const bfd_arch_info_type bfd_cris_arch_compat_v10_v32 =
75 N (bfd_mach_cris_v10_v32, "cris:common_v10_v32", NULL); 74 N (bfd_mach_cris_v10_v32, "cris:common_v10_v32", NULL);
76 75
77 static const bfd_arch_info_type bfd_cris_arch_v32 = 76 static const bfd_arch_info_type bfd_cris_arch_v32 =
78 N (bfd_mach_cris_v32, "crisv32", &bfd_cris_arch_compat_v10_v32); 77 N (bfd_mach_cris_v32, "crisv32", &bfd_cris_arch_compat_v10_v32);
79 78
80 const bfd_arch_info_type bfd_cris_arch = 79 const bfd_arch_info_type bfd_cris_arch =
81 { 80 {
82 32, /* There's 32 bits_per_word. */ 81 32, /* There's 32 bits_per_word. */
83 32, /* There's 32 bits_per_address. */ 82 32, /* There's 32 bits_per_address. */
84 8, /* There's 8 bits_per_byte. */ 83 8, /* There's 8 bits_per_byte. */
85 bfd_arch_cris, /* One of enum bfd_architecture, defined 84 bfd_arch_cris, /* One of enum bfd_architecture, defined
86 in archures.c and provided in 85 in archures.c and provided in
87 generated header files. */ 86 generated header files. */
88 bfd_mach_cris_v0_v10, /* Random BFD-internal number for this 87 bfd_mach_cris_v0_v10, /* Random BFD-internal number for this
89 machine, similarly listed in 88 machine, similarly listed in
90 archures.c. Not emitted in output. */ 89 archures.c. Not emitted in output. */
91 "cris", /* The arch_name. */ 90 "cris", /* The arch_name. */
92 "cris", /* The printable name is the same. */ 91 "cris", /* The printable name is the same. */
93 1, /* Section alignment power; each section 92 1, /* Section alignment power; each section
94 is aligned to (only) 2^1 bytes. */ 93 is aligned to (only) 2^1 bytes. */
95 TRUE, /* This is the default "machine". */ 94 TRUE, /* This is the default "machine". */
96 get_compatible, /* A function for testing 95 get_compatible, /* A function for testing
97 "machine" compatibility of two 96 "machine" compatibility of two
98 bfd_arch_info_type. */ 97 bfd_arch_info_type. */
99 bfd_default_scan, /* Check if a bfd_arch_info_type is a 98 bfd_default_scan, /* Check if a bfd_arch_info_type is a
100 match. */ 99 match. */
100 bfd_arch_default_fill, /* Default fill. */
101 &bfd_cris_arch_v32 /* Pointer to next bfd_arch_info_type in 101 &bfd_cris_arch_v32 /* Pointer to next bfd_arch_info_type in
102 the same family. */ 102 the same family. */
103 }; 103 };
104 104
105 /* 105 /*
106 * Local variables: 106 * Local variables:
107 * eval: (c-set-style "gnu") 107 * eval: (c-set-style "gnu")
108 * indent-tabs-mode: t 108 * indent-tabs-mode: t
109 * End: 109 * End:
110 */ 110 */
OLDNEW
« no previous file with comments | « bfd/cpu-cr16c.c ('k') | bfd/cpu-crx.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698