00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #include "bfd.h"
00028 #include "sysdep.h"
00029 #include "libbfd.h"
00030
00031
00032
00033
00034 static const bfd_arch_info_type *rs6000_compatible
00035 PARAMS ((const bfd_arch_info_type *, const bfd_arch_info_type *));
00036
00037 static const bfd_arch_info_type *
00038 rs6000_compatible (a,b)
00039 const bfd_arch_info_type *a;
00040 const bfd_arch_info_type *b;
00041 {
00042 BFD_ASSERT (a->arch == bfd_arch_rs6000);
00043 switch (b->arch)
00044 {
00045 default:
00046 return NULL;
00047 case bfd_arch_rs6000:
00048 return bfd_default_compatible (a, b);
00049 case bfd_arch_powerpc:
00050 if (a->mach == bfd_mach_rs6k)
00051 return b;
00052 return NULL;
00053 }
00054
00055 }
00056
00057 static const bfd_arch_info_type arch_info_struct[] =
00058 {
00059 {
00060 32,
00061 32,
00062 8,
00063 bfd_arch_rs6000,
00064 bfd_mach_rs6k_rs1,
00065 "rs6000",
00066 "rs6000:rs1",
00067 3,
00068 FALSE,
00069 rs6000_compatible,
00070 bfd_default_scan,
00071 &arch_info_struct[1]
00072 },
00073 {
00074 32,
00075 32,
00076 8,
00077 bfd_arch_rs6000,
00078 bfd_mach_rs6k_rsc,
00079 "rs6000",
00080 "rs6000:rsc",
00081 3,
00082 FALSE,
00083 rs6000_compatible,
00084 bfd_default_scan,
00085 &arch_info_struct[2]
00086 },
00087 {
00088 32,
00089 32,
00090 8,
00091 bfd_arch_rs6000,
00092 bfd_mach_rs6k_rs2,
00093 "rs6000",
00094 "rs6000:rs2",
00095 3,
00096 FALSE,
00097 rs6000_compatible,
00098 bfd_default_scan,
00099 0
00100 }
00101 };
00102
00103 const bfd_arch_info_type bfd_rs6000_arch =
00104 {
00105 32,
00106 32,
00107 8,
00108 bfd_arch_rs6000,
00109 bfd_mach_rs6k,
00110 "rs6000",
00111 "rs6000:6000",
00112 3,
00113 TRUE,
00114 rs6000_compatible,
00115 bfd_default_scan,
00116 &arch_info_struct[0]
00117 };