PR 12610
authorRichard Henderson <rth@redhat.com>
Tue, 29 Mar 2011 18:16:16 +0000 (18:16 +0000)
committerRichard Henderson <rth@redhat.com>
Tue, 29 Mar 2011 18:16:16 +0000 (18:16 +0000)
* config/tc-alpha.c (s_alpha_align): Don't auto-align a previous
label; zap alpha_insn_label.

gas/ChangeLog
gas/config/tc-alpha.c
gas/config/tc-avr.c
gas/config/tc-avr.h
gas/testsuite/gas/alpha/auto-align-1.d [new file with mode: 0644]
gas/testsuite/gas/alpha/auto-align-1.s [new file with mode: 0644]

index 42757677587139f46428e23996067d52afcdd4ef..d61c95262112c975ac4cc1a86ff82e972192eb98 100644 (file)
@@ -1,3 +1,9 @@
+2011-03-29  Richard Henderson  <rth@redhat.com>
+
+       PR 12610
+       * config/tc-alpha.c (s_alpha_align): Don't auto-align a previous
+       label; zap alpha_insn_label.
+
 2011-03-29  H.J. Lu  <hongjiu.lu@intel.com>
 
        * config/tc-i386.c (handle_quad): Properly handle multiple
index d1de6f92cf09dc607e233954e2e413a53488079f..5c1c73e991f94ad902ce5b8054bab96b7765c77f 100644 (file)
@@ -5081,12 +5081,13 @@ s_alpha_align (int ignore ATTRIBUTE_UNUSED)
   if (align != 0)
     {
       alpha_auto_align_on = 1;
-      alpha_align (align, pfill, alpha_insn_label, 1);
+      alpha_align (align, pfill, NULL, 1);
     }
   else
     {
       alpha_auto_align_on = 0;
     }
+  alpha_insn_label = NULL;
 
   demand_empty_rest_of_line ();
 }
index ef8cf9391526e74e2563070601cae42b40eee7e8..98fc0f5476b4c4f30c43807ff361c313cbd58521 100644 (file)
@@ -24,6 +24,8 @@
 #include "as.h"
 #include "safe-ctype.h"
 #include "subsegs.h"
+#include "dw2gencfi.h"
+
 
 struct avr_opcodes_s
 {
@@ -1543,3 +1545,18 @@ avr_cons_fix_new (fragS *frag,
       exp_mod_pm = 0;
     }
 }
+
+void
+tc_cfi_frame_initial_instructions (void)
+{
+  /* AVR6 pushes 3 bytes for calls.  */
+  int return_size = (avr_mcu->mach == bfd_mach_avr6 ? 3 : 2);
+
+  /* The CFA is the caller's stack location before the call insn.  */
+  /* Note that the stack pointer is dwarf register number 32.  */
+  cfi_add_CFA_def_cfa (32, return_size);
+
+  /* Note that AVR consistently uses post-decrement, which means that things
+     do not line up the same way as for targers that use pre-decrement.  */
+  cfi_add_CFA_offset (DWARF2_DEFAULT_RETURN_COLUMN, 1-return_size);
+}
index b976d5a89bfa9eb0ed9774302e1b404f8f2f84cd..777a9df37a23e9d3fe2e4857fa4bebc7e8c87d39 100644 (file)
@@ -153,3 +153,16 @@ extern long md_pcrel_from_section (struct fix *, segT);
 
 /* 32 bits pseudo-addresses are used on AVR.  */
 #define DWARF2_ADDR_SIZE(bfd) 4
+
+/* Enable cfi directives.  */
+#define TARGET_USE_CFIPOP 1
+
+/* The stack grows down, and is only byte aligned.  */
+#define DWARF2_CIE_DATA_ALIGNMENT -1
+
+/* Define the column that represents the PC.  */
+#define DWARF2_DEFAULT_RETURN_COLUMN  36
+
+/* Define a hook to setup initial CFI state.  */
+extern void tc_cfi_frame_initial_instructions (void);
+#define tc_cfi_frame_initial_instructions tc_cfi_frame_initial_instructions
diff --git a/gas/testsuite/gas/alpha/auto-align-1.d b/gas/testsuite/gas/alpha/auto-align-1.d
new file mode 100644 (file)
index 0000000..971f117
--- /dev/null
@@ -0,0 +1,6 @@
+#objdump: -s -j .data
+#name: alpha auto-align-1
+
+.*:     file format *
+Contents of section .data:
+ 0000 04000000 .*
diff --git a/gas/testsuite/gas/alpha/auto-align-1.s b/gas/testsuite/gas/alpha/auto-align-1.s
new file mode 100644 (file)
index 0000000..0b088c2
--- /dev/null
@@ -0,0 +1,7 @@
+.text
+       .align  4
+$B:     unop
+$E:    .align  4
+       fnop
+.data
+       .long   $E - $B
This page took 0.031452 seconds and 4 git commands to generate.