* [testsuite] new test case to check address generation of symbol for H8300H normal mode target
@ 2004-07-15 13:46 Nitin Yewale
2004-07-15 14:05 ` Nick Clifton
0 siblings, 1 reply; 2+ messages in thread
From: Nitin Yewale @ 2004-07-15 13:46 UTC (permalink / raw)
To: binutils
Hi,
Please find below patch which adds a new binutils dejagnu test case.
Test case description:-
There was a problem with objdump utility regarding symbol address generation
for H8300H normal mode target due to which it was not able to distinguish
between 24bit and 32 bit addressing.
Below test case is just to ensure that objdump shows 16 bit address for symbols.
==========================================================================
testsuite/Changelog
2004-07-15 Nitin Yewale <nitiny@kpitcummins.com>
* gas/h8300/h8300.exp (do_h8300hn_addressgen): Addition of
new test case for H8300H normal target to check symbol
address generation.
* gas/h8300/symaddgen.s : New test
==========================================================================
--- binutils-040628/gas/testsuite/gas/h8300/h8300.exp 2004-07-08 14:55:53.000000000 +0530
+++ binutils-040628/gas/testsuite/gas/h8300/h8300.exp 2004-07-15 10:38:59.000000000 +0530
@@ -2114,6 +2114,34 @@ proc do_h8300h_mov32bug {} {
if [expr $x == 1] then { pass $testname } else { fail $testname }
}
+proc do_h8300hn_addressgen {} {
+ set testname "symaddgen.s: h8300hn symbol address generation"
+ set x 0
+
+ gas_start "symaddgen.s" "-al"
+
+ # Check each instruction bit pattern to verify it got
+ # assembled correctly.
+ while 1 {
+ expect {
+ -re " +\[0-9\]+ 0000 01006DF6\[^\n\]*\n" { set x [expr $x+1] }
+ -re " +\[0-9\]+ 0004 0D76\[^\n\]*\n" { set x [expr $x+1] }
+ -re " +\[0-9\]+ 0006 790207D0\[^\n\]*\n" { set x [expr $x+1] }
+ -re " +\[0-9\]+ 000a 6B82F020\[^\n\]*\n" { set x [expr $x+1] }
+ -re " +\[0-9\]+ 000e 79022710\[^\n\]*\n" { set x [expr $x+1] }
+ -re " +\[0-9\]+ 0012 6B820000\[^\n\]*\n" { set x [expr $x+1] }
+ -re " +\[0-9\]+ 0016 01006D76\[^\n\]*\n" { set x [expr $x+1] }
+ -re " +\[0-9\]+ 001a 5470\[^\n\]*\n" { set x [expr $x+1] }
+
+ eof { break }
+ }
+ }
+ # This was intended to do any cleanup necessary. It kinda looks like it
+ # isn't needed, but just in case, please keep it in for now.
+ gas_finish
+ # Did we find what we were looking for? If not, flunk it.
+ if [expr $x == 8] then { pass $testname } else { fail $testname }
+}
if [istarget h8300*-*-*] then {
# Test the basic h8300 instruction parser
do_h8300_add_sub
@@ -2131,6 +2159,7 @@ if [istarget h8300*-*-*] then {
do_h8300_movw
do_h8300_pushpop
do_h8300_rotate_shift
+ do_h8300hn_addressgen
# Now test the h8300h instruction parser
do_h8300h_add_sub
--- /dev/null 2002-08-31 05:01:37.000000000 +0530
+++ binutils-040628/gas/testsuite/gas/h8300/symaddgen.s 2004-07-14 17:36:50.000000000 +0530
@@ -0,0 +1,14 @@
+ .h8300hn
+ .text
+foo:
+ mov.l er6,@-er7
+ mov.w r7,r6
+ mov.w #2000,r2
+ mov.w r2,@-4064:16
+ mov.w #10000,r2
+ mov.w r2,@_var2
+ mov.l @er7+,er6
+ rts
+ .comm _var2,2,2
+ .end
==========================================================================
Regards,
Nitin Yewale,
KPIT Cummins InfoSystems Ltd.
Pune, India
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Free download of GNU based tool-chains for Renesas' SH and H8 Series.
The following site also offers free technical support to its users.
Visit http://www.kpitgnutools.com for details.
Latest versions of KPIT GNU tools were released on June 1, 2004.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [testsuite] new test case to check address generation of symbol for H8300H normal mode target
2004-07-15 13:46 [testsuite] new test case to check address generation of symbol for H8300H normal mode target Nitin Yewale
@ 2004-07-15 14:05 ` Nick Clifton
0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2004-07-15 14:05 UTC (permalink / raw)
To: Nitin Yewale; +Cc: binutils
Hi Nitin,
> 2004-07-15 Nitin Yewale <nitiny@kpitcummins.com>
>
> * gas/h8300/h8300.exp (do_h8300hn_addressgen): Addition of
> new test case for H8300H normal target to check symbol
> address generation.
> * gas/h8300/symaddgen.s : New test
Approved and applied.
Note - I had to make one small adjustment so that the test would work
with the h8300-coff target as well as the h8300-elf target.
Cheers
Nick
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-07-15 14:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-15 13:46 [testsuite] new test case to check address generation of symbol for H8300H normal mode target Nitin Yewale
2004-07-15 14:05 ` Nick Clifton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).