+2006-10-29 Randolph Chung <tausq@debian.org>
+
+ * config/tc-hppa.c (hppa_cfi_frame_initial_instructions)
+ (hppa_regname_to_dw2regnum): New funcions.
+ * config/tc-hppa.h [OBJ_ELF] (TARGET_USE_CFIPOP): Define.
+ (tc_cfi_frame_initial_instructions)
+ (tc_regname_to_dw2regnum): Define.
+ (hppa_cfi_frame_initial_instructions)
+ (hppa_regname_to_dw2regnum): Declare.
+ (DWARF2_LINE_MIN_INSN_LENGTH, DWARF2_DEFAULT_RETURN_COLUMN)
+ (DWARF2_CIE_DATA_ALIGNMENT): Define.
+
2006-10-29 Nick Clifton <nickc@redhat.com>
* config/tc-spu.c (md_assemble): Cast printf string size parameter
#include "as.h"
#include "safe-ctype.h"
#include "subsegs.h"
+#include "dw2gencfi.h"
#include "bfd/libhppa.h"
{"word", pa_cons, 4},
{NULL, 0, 0}
};
+
+#ifdef OBJ_ELF
+void
+hppa_cfi_frame_initial_instructions (void)
+{
+ cfi_add_CFA_def_cfa (30, 0);
+}
+
+int
+hppa_regname_to_dw2regnum (char *regname)
+{
+ unsigned int regnum = -1;
+ unsigned int i;
+ const char *p;
+ char *q;
+ static struct { char *name; int dw2regnum; } regnames[] =
+ {
+ { "sp", 30 }, { "rp", 2 },
+ };
+
+ for (i = 0; i < ARRAY_SIZE (regnames); ++i)
+ if (strcmp (regnames[i].name, regname) == 0)
+ return regnames[i].dw2regnum;
+
+ if (regname[0] == 'r')
+ {
+ p = regname + 1;
+ regnum = strtoul (p, &q, 10);
+ if (p == q || *q || regnum >= 32)
+ return -1;
+ }
+ else if (regname[0] == 'f' && regname[1] == 'r')
+ {
+ p = regname + 2;
+ regnum = strtoul (p, &q, 10);
+ if (p == q || *q || regnum <= 4 || regnum >= 32)
+ return -1;
+ regnum += 32 - 4;
+ }
+ return regnum;
+}
+#endif
#define TC_FIX_TYPE PTR
#define TC_INIT_FIX_DATA(FIX) ((FIX)->tc_fix_data = NULL)
+#ifdef OBJ_ELF
+#define TARGET_USE_CFIPOP 1
+
+#define tc_cfi_frame_initial_instructions hppa_cfi_frame_initial_instructions
+extern void hppa_cfi_frame_initial_instructions (void);
+
+#define tc_regname_to_dw2regnum hppa_regname_to_dw2regnum
+extern int hppa_regname_to_dw2regnum (char *regname);
+
+#define DWARF2_LINE_MIN_INSN_LENGTH 4
+#define DWARF2_DEFAULT_RETURN_COLUMN 2
+#if TARGET_ARCH_SIZE == 64
+#define DWARF2_CIE_DATA_ALIGNMENT -8
+#else
+#define DWARF2_CIE_DATA_ALIGNMENT -4
+#endif
+#endif
+
#endif /* _TC_HPPA_H */