aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-arm.h9
-rw-r--r--gas/testsuite/ChangeLog4
-rw-r--r--gas/testsuite/gas/arm/align64.d15
4 files changed, 18 insertions, 15 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 4bdbe5d..7ea12d9 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2015-04/24 Richard Earnshaw <rearnsha@arm.com>
+
+ * config/tc-arm.h (arm_min): New function.
+ (SUB_SEGMENT_ALIGN): Define.
+
2015-04-23 Matthew Fortune <matthew.fortune@imgtec.com>
* config/tc-mips.c (macro): State the recommended way of creating
diff --git a/gas/config/tc-arm.h b/gas/config/tc-arm.h
index b604f04..2216267 100644
--- a/gas/config/tc-arm.h
+++ b/gas/config/tc-arm.h
@@ -236,10 +236,19 @@ struct arm_frag_type
#endif
};
+static inline int
+arm_min (int am_p1, int am_p2)
+{
+ return am_p1 < am_p2 ? am_p1 : am_p2;
+}
+
#define TC_FRAG_TYPE struct arm_frag_type
/* NOTE: max_chars is a local variable from frag_var / frag_variant. */
#define TC_FRAG_INIT(fragp) arm_init_frag (fragp, max_chars)
#define HANDLE_ALIGN(fragp) arm_handle_align (fragp)
+#define SUB_SEGMENT_ALIGN(SEG, FRCHAIN) \
+ ((!(FRCHAIN)->frch_next && subseg_text_p (SEG)) \
+ ? arm_min (2, get_recorded_alignment (SEG)) : 0)
#define md_do_align(N, FILL, LEN, MAX, LABEL) \
if (FILL == NULL && (N) != 0 && ! need_pass_2 && subseg_text_p (now_seg)) \
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index c28a6a2..8a62d53 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2015-04-24 Richard Earnshaw <rearnsha@arm.com>
+
+ * gas/arm/align64.d: Delete trailing padding NOPs.
+
2015-04-23 Matthew Fortune <matthew.fortune@imgtec.com>
* gas/mips/dla-warn.l: New file.
diff --git a/gas/testsuite/gas/arm/align64.d b/gas/testsuite/gas/arm/align64.d
index cee7442..ee67c82 100644
--- a/gas/testsuite/gas/arm/align64.d
+++ b/gas/testsuite/gas/arm/align64.d
@@ -52,18 +52,3 @@ Disassembly of section .text:
00000078 <foo2\+0x34> e1a00000.*nop.*
0000007c <foo2\+0x38> e1a00000.*nop.*
00000080 <foo2\+0x3c> e3a00004.*mov.*r0, #4
-00000084 <foo2\+0x40> e1a00000.*nop.*
-00000088 <foo2\+0x44> e1a00000.*nop.*
-0000008c <foo2\+0x48> e1a00000.*nop.*
-00000090 <foo2\+0x4c> e1a00000.*nop.*
-00000094 <foo2\+0x50> e1a00000.*nop.*
-00000098 <foo2\+0x54> e1a00000.*nop.*
-0000009c <foo2\+0x58> e1a00000.*nop.*
-000000a0 <foo2\+0x5c> e1a00000.*nop.*
-000000a4 <foo2\+0x60> e1a00000.*nop.*
-000000a8 <foo2\+0x64> e1a00000.*nop.*
-000000ac <foo2\+0x68> e1a00000.*nop.*
-000000b0 <foo2\+0x6c> e1a00000.*nop.*
-000000b4 <foo2\+0x70> e1a00000.*nop.*
-000000b8 <foo2\+0x74> e1a00000.*nop.*
-000000bc <foo2\+0x78> e1a00000.*nop.*