(arm_registers_names): Make static.
* config/arm/tm-arm.h (arm_register_names): Delete declaration.
(arm_register_name): Declare.
(REGISTER_NAME): Use it.
+2002-01-21 Richard Earnshaw <rearnsha@arm.com>
+
+ * arm-tdep.c (arm_register_name): New function.
+ (arm_registers_names): Make static.
+ * config/arm/tm-arm.h (arm_register_names): Delete declaration.
+ (arm_register_name): Declare.
+ (REGISTER_NAME): Use it.
+
2002-01-21 Richard Earnshaw <rearnsha@arm.com>
Kevin Buettner <kevinb@redhat.com>
"f0", "f1", "f2", "f3", /* 16 17 18 19 */
"f4", "f5", "f6", "f7", /* 20 21 22 23 */
"fps", "cpsr" }; /* 24 25 */
-char **arm_register_names = arm_register_name_strings;
+static char **arm_register_names = arm_register_name_strings;
/* Valid register name flavors. */
static const char **valid_flavors;
set_disassembly_flavor ();
}
\f
+/* Return the ARM register name corresponding to register I. */
+char *
+arm_register_name(int i)
+{
+ return arm_register_names[i];
+}
+
static void
set_disassembly_flavor (void)
{
#define NUM_GREGS 16 /* Number of general purpose registers. */
#define NUM_REGS (NUM_GREGS + NUM_FREGS + NUM_SREGS)
-/* An array of names of registers. */
-extern char **arm_register_names;
-
-#define REGISTER_NAME(i) arm_register_names[i]
+#define REGISTER_NAME(i) arm_register_name(i)
+char *arm_register_name (int);
/* Register numbers of various important registers. Note that some of
these values are "real" register numbers, and correspond to the