From 224de7a50d1d755bd561f7e669957bff6b9032b2 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 27 Mar 2000 23:47:09 +0000 Subject: [PATCH] Default LISTING_LHS_WIDTH to depend on LISTING_WORD_SIZE so that bytes per line is 4. Fix tests for LISTING_WORD_SIZE==1. --- gas/ChangeLog | 10 ++++++++-- gas/listing.c | 4 ++-- gas/testsuite/ChangeLog | 7 +++++++ gas/testsuite/gas/all/cond.d | 14 +++++++------- gas/testsuite/gas/all/gas.exp | 8 ++++---- gas/testsuite/gas/ieee-fp/x930509a.exp | 7 +++---- 6 files changed, 31 insertions(+), 19 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index d649c3b304a..5b6874c15e3 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,9 +1,15 @@ +2000-03-28 Alan Modra + + * listing.c (LISTING_LHS_WIDTH): Default depends on + LISTING_WORD_SIZE. + (LISTING_LHS_WIDTH_SECOND): Default to LISTING_LHS_WIDTH. + 2000-03-27 Ian Lance Taylor * config/tc-sh.c (md_show_usage): Use backslash before newline in string literal. -2000-03-27 Alan Modra +2000-03-27 Alan Modra * config/tc-avr.h (TC_HANDLES_FX_DONE): Define. @@ -46,7 +52,7 @@ * internals.texi: Document new macro hooks. * as.h: New prototypes added. -2000-03-26 Alan Modra +2000-03-26 Alan Modra * config/tc-i386.c: Don't start any as_bad or as_warn message with an initial capital letter. diff --git a/gas/listing.c b/gas/listing.c index 205d62815d5..cecf2450bac 100644 --- a/gas/listing.c +++ b/gas/listing.c @@ -109,10 +109,10 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #define LISTING_WORD_SIZE 4 #endif #ifndef LISTING_LHS_WIDTH -#define LISTING_LHS_WIDTH 1 +#define LISTING_LHS_WIDTH ((LISTING_WORD_SIZE) > 4 ? 1 : 4 / (LISTING_WORD_SIZE)) #endif #ifndef LISTING_LHS_WIDTH_SECOND -#define LISTING_LHS_WIDTH_SECOND 1 +#define LISTING_LHS_WIDTH_SECOND LISTING_LHS_WIDTH #endif #ifndef LISTING_RHS_WIDTH #define LISTING_RHS_WIDTH 100 diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index ef99b865cf9..6659f66ca05 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2000-03-27 Alan Modra + + * gas/ieee-fp/x930509a.exp (dotest): Fix test for + LISTING_WORD_SIZE==1. + * gas/all/gas.exp (do_930509a): Same here. + * gas/all/cond.d: And here. + 2000-03-10 Geoffrey Keating * gas/mips/empic.d: New file. diff --git a/gas/testsuite/gas/all/cond.d b/gas/testsuite/gas/all/cond.d index 4ee3942efb8..a496287916c 100644 --- a/gas/testsuite/gas/all/cond.d +++ b/gas/testsuite/gas/all/cond.d @@ -7,14 +7,14 @@ 8[ ]+.else 9[ ]+.if 1 10[ ]+.endc - 11 0000 0[02]00 ?000[02][ ]+.long[ ]+2 + 11 0000 0[02] ?00 ?00 ?0[02][ ]+.long[ ]+2 12[ ]+.if 0 14[ ]+.else - 15 0004 0[04]00 ?000[04][ ]+.long[ ]+4 + 15 0004 0[04] ?00 ?00 ?0[04][ ]+.long[ ]+4 16[ ]+.endc 17[ ]+.endc - 18 0008 0000 ?0000[ ]+.p2align 5,0 - 18[ ]+0000 ?0000 - 18[ ]+0000 ?0000 - 18[ ]+0000 ?0000 - 18[ ]+0000 ?0000 + 18 0008 00 ?00 ?00 ?00[ ]+.p2align 5,0 + 18[ ]+00 ?00 ?00 ?00 + 18[ ]+00 ?00 ?00 ?00 + 18[ ]+00 ?00 ?00 ?00 + 18[ ]+00 ?00 ?00 ?00 diff --git a/gas/testsuite/gas/all/gas.exp b/gas/testsuite/gas/all/gas.exp index bd397051872..49d94219c14 100644 --- a/gas/testsuite/gas/all/gas.exp +++ b/gas/testsuite/gas/all/gas.exp @@ -65,9 +65,9 @@ proc do_930509a {} { # If ".long" means an 8-byte value on some target someday, this test will have # to be fixed. expect { - -re "^ +1 .... 0000 *0000" { fail $testname; set x 1 } - -re "^ +1 .... 0400 *0000" { pass $testname; set x 1 } - -re "^ +1 .... 0000 *0004" { pass $testname; set x 1 } + -re "^ +1 .... 00 ?00 ?00 ?00" { fail $testname; set x 1 } + -re "^ +1 .... 04 ?00 ?00 ?00" { pass $testname; set x 1 } + -re "^ +1 .... 00 ?00 ?00 ?04" { pass $testname; set x 1 } -re "\[^\n\]*\n" { } timeout { perror "timeout\n"; break } eof { break } @@ -124,7 +124,7 @@ proc test_cond {} { global subdir set testname "conditional listings" - gas_run cond.s -alc ">dump.out" + gas_run cond.s "-alc" ">dump.out" if ![string match "" $comp_output] { send_log "$comp_output\n" fail $testname diff --git a/gas/testsuite/gas/ieee-fp/x930509a.exp b/gas/testsuite/gas/ieee-fp/x930509a.exp index d788d2c9e44..8556972776c 100644 --- a/gas/testsuite/gas/ieee-fp/x930509a.exp +++ b/gas/testsuite/gas/ieee-fp/x930509a.exp @@ -7,10 +7,9 @@ proc dotest {} { gas_start "x930509a.s" "-al" while 1 { expect { - -re " 00008000\[ \]+.single" { pass $testname; set x 1 } - -re " 00800000\[ \]+.single" { pass $testname; set x 1 } - -re " 0080 0000\[ \]+.single" { pass $testname; set x 1 } - -re " ........ +.single" { fail $testname; set x 1 } + -re " 00 ?00 ?80 ?00\[ \]+.single" { pass $testname; set x 1 } + -re " 00 ?80 ?00 ?00\[ \]+.single" { pass $testname; set x 1 } + -re ".single" { fail $testname; set x 1 } -re "\[^\n\]*\n" { } timeout { perror "timeout\n"; break } eof { break } -- 2.30.2