This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Enable .fill forward labels


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4f2358bca6910cafbe9b37a713fd96e5ab84d4e8

commit 4f2358bca6910cafbe9b37a713fd96e5ab84d4e8
Author: Andreas Krebbel <krebbel@linux.vnet.ibm.com>
Date:   Fri Oct 6 13:12:32 2017 +0200

    Enable .fill forward labels
    
    gas/ChangeLog:
    
    2017-10-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
    
    	* read.c (s_fill): Invoke expression instead of
    	get_known_segmented_expression.
    	* testsuite/gas/all/fill-1.s: New testcase.
    	* testsuite/gas/all/gas.exp: Run fill-1 testcase

Diff:
---
 gas/read.c                     | 2 +-
 gas/testsuite/gas/all/fill-1.s | 5 +++++
 gas/testsuite/gas/all/gas.exp  | 2 ++
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/gas/read.c b/gas/read.c
index 0b0b058..1643c5c 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -2202,7 +2202,7 @@ s_fill (int ignore ATTRIBUTE_UNUSED)
   md_cons_align (1);
 #endif
 
-  get_known_segmented_expression (&rep_exp);
+  expression (&rep_exp);
   if (*input_line_pointer == ',')
     {
       input_line_pointer++;
diff --git a/gas/testsuite/gas/all/fill-1.s b/gas/testsuite/gas/all/fill-1.s
new file mode 100644
index 0000000..92d495a
--- /dev/null
+++ b/gas/testsuite/gas/all/fill-1.s
@@ -0,0 +1,5 @@
+	.text
+	.fill (2f-1f), 1, 0x90
+1:
+        nop
+2:
diff --git a/gas/testsuite/gas/all/gas.exp b/gas/testsuite/gas/all/gas.exp
index 365cabc..93e31da 100644
--- a/gas/testsuite/gas/all/gas.exp
+++ b/gas/testsuite/gas/all/gas.exp
@@ -486,3 +486,5 @@ run_dump_test "org-3"
 run_dump_test "org-4"
 run_dump_test "org-5"
 run_dump_test "org-6"
+
+gas_test "fill-1.s" "" "" "test .fill forward label references"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]