Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/binutils/dist/gas/config Add support for the ....



details:   https://anonhg.NetBSD.org/src/rev/87854c9396d9
branches:  trunk
changeset: 794597:87854c9396d9
user:      matt <matt%NetBSD.org@localhost>
date:      Tue Mar 18 23:41:36 2014 +0000

description:
Add support for the .cfi pseudo-ops for VAX.

diffstat:

 external/gpl3/binutils/dist/gas/config/tc-vax.c |  35 +++++++++++++++++++++++++
 external/gpl3/binutils/dist/gas/config/tc-vax.h |  20 ++++++++++----
 2 files changed, 49 insertions(+), 6 deletions(-)

diffs (76 lines):

diff -r 4d01cf6885bd -r 87854c9396d9 external/gpl3/binutils/dist/gas/config/tc-vax.c
--- a/external/gpl3/binutils/dist/gas/config/tc-vax.c   Tue Mar 18 23:41:02 2014 +0000
+++ b/external/gpl3/binutils/dist/gas/config/tc-vax.c   Tue Mar 18 23:41:36 2014 +0000
@@ -24,6 +24,7 @@
 
 #include "vax-inst.h"
 #include "obstack.h"           /* For FRAG_APPEND_1_CHAR macro in "frags.h" */
+#include "dw2gencfi.h"
 #include "subsegs.h"
 #include "safe-ctype.h"
 
@@ -3570,3 +3571,37 @@
 {
   return vax_md_atof (type, litP, sizeP);
 }
+
+void
+vax_cfi_frame_initial_instructions (void)
+{
+  cfi_add_CFA_def_cfa (14, 0);
+}
+
+int
+tc_vax_regname_to_dw2regnum (char *regname)
+{
+  unsigned int i;
+  static const struct { char *name; int dw2regnum; } regnames[] =
+    {
+      { "r0",   0 }, { "r1",  1 }, { "r2",   2 }, { "r3",   3 },
+      { "r4",   4 }, { "r5",  5 }, { "r6",   6 }, { "r7",   7 },
+      { "r8",   8 }, { "r9",  9 }, { "r10", 10 }, { "r11", 11 },
+      { "ap",  12 }, { "fp", 13 }, { "sp",  14 }, { "pc",  15 },
+      { "psw", 16 },
+    };
+
+  for (i = 0; i < ARRAY_SIZE (regnames); ++i)
+    if (strcmp (regnames[i].name, regname) == 0)
+      return regnames[i].dw2regnum;
+
+  return -1;
+}
+
+void
+vax_cfi_emit_pcrel_expr (expressionS *exp, unsigned int nbytes)
+{
+  vax_cons_special_reloc = "pcrel";
+  emit_expr (exp, nbytes);
+  vax_cons_special_reloc = NULL;
+}
diff -r 4d01cf6885bd -r 87854c9396d9 external/gpl3/binutils/dist/gas/config/tc-vax.h
--- a/external/gpl3/binutils/dist/gas/config/tc-vax.h   Tue Mar 18 23:41:02 2014 +0000
+++ b/external/gpl3/binutils/dist/gas/config/tc-vax.h   Tue Mar 18 23:41:36 2014 +0000
@@ -71,9 +71,17 @@
                     == S_GET_SEGMENT ((FIX)->fx_addsy)))       \
             || S_IS_LOCAL ((FIX)->fx_addsy)))
 
-/*
- * Local Variables:
- * comment-column: 0
- * fill-column: 131
- * End:
- */
+#define TARGET_USE_CFIPOP 1
+
+#define tc_cfi_frame_initial_instructions vax_cfi_frame_initial_instructions
+extern void vax_cfi_frame_initial_instructions (void);
+
+#define tc_regname_to_dw2regnum tc_vax_regname_to_dw2regnum
+extern int tc_vax_regname_to_dw2regnum (char *);
+
+#define tc_cfi_emit_pcrel_expr vax_cfi_emit_pcrel_expr
+extern void vax_cfi_emit_pcrel_expr (expressionS *, unsigned int);
+
+#define DWARF2_LINE_MIN_INSN_LENGTH     1
+#define DWARF2_DEFAULT_RETURN_COLUMN    15
+#define DWARF2_CIE_DATA_ALIGNMENT       -4



Home | Main Index | Thread Index | Old Index