Index: bfd/cpu-nios2.c |
diff --git a/bfd/cpu-alpha.c b/bfd/cpu-nios2.c |
similarity index 56% |
copy from bfd/cpu-alpha.c |
copy to bfd/cpu-nios2.c |
index 902eb8d1c6d418680e68bb808939a16ff5db8852..fa4c859d49682d6abdc7a49df59d7c1ed3c85651 100644 |
--- a/bfd/cpu-alpha.c |
+++ b/bfd/cpu-nios2.c |
@@ -1,6 +1,7 @@ |
-/* BFD support for the Alpha architecture. |
- Copyright 1992, 1993, 1998, 2000, 2002, 2003, 2005, 2007 |
- Free Software Foundation, Inc. |
+/* BFD support for the Altera Nios II processor. |
+ Copyright (C) 2012, 2013 Free Software Foundation, Inc. |
+ Contributed by Nigel Gray (ngray@altera.com). |
+ Contributed by Mentor Graphics, Inc. |
This file is part of BFD, the Binary File Descriptor library. |
@@ -23,32 +24,21 @@ |
#include "bfd.h" |
#include "libbfd.h" |
-#define N(BITS_WORD, BITS_ADDR, NUMBER, PRINT, DEFAULT, NEXT) \ |
+#define N(BITS_WORD, BITS_ADDR, NUMBER, PRINT, DEFAULT, NEXT) \ |
{ \ |
- BITS_WORD, /* bits in a word */ \ |
+ BITS_WORD, /* bits in a word */ \ |
BITS_ADDR, /* bits in an address */ \ |
8, /* 8 bits in a byte */ \ |
- bfd_arch_alpha, \ |
+ bfd_arch_nios2, \ |
NUMBER, \ |
- "alpha", \ |
+ "nios2", \ |
PRINT, \ |
3, \ |
DEFAULT, \ |
- bfd_default_compatible, \ |
+ bfd_default_compatible, \ |
bfd_default_scan, \ |
- bfd_arch_default_fill, \ |
- NEXT, \ |
+ bfd_arch_default_fill, \ |
+ NEXT \ |
} |
-#define NN(index) (&arch_info_struct[index]) |
- |
-/* These exist only so that we can reasonably disassemble PALcode. */ |
-static const bfd_arch_info_type arch_info_struct[] = |
-{ |
- N (64, 64, bfd_mach_alpha_ev4, "alpha:ev4", FALSE, NN(1)), |
- N (64, 64, bfd_mach_alpha_ev5, "alpha:ev5", FALSE, NN(2)), |
- N (64, 64, bfd_mach_alpha_ev6, "alpha:ev6", FALSE, 0), |
-}; |
- |
-const bfd_arch_info_type bfd_alpha_arch = |
- N (64, 64, 0, "alpha", TRUE, NN(0)); |
+const bfd_arch_info_type bfd_nios2_arch = N (32, 32, 0, "nios2", TRUE, NULL); |