public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* help: question for porting gas/ld to MIPS-X3
@ 2002-02-24  7:02 David Zhang
  2002-02-24  8:47 ` Testing (was: Re: help: question for porting gas/ld to MIPS-X3) Hans-Peter Nilsson
  2002-02-24  9:41 ` help: question for porting gas/ld to MIPS-X3 Eric Christopher
  0 siblings, 2 replies; 4+ messages in thread
From: David Zhang @ 2002-02-24  7:02 UTC (permalink / raw)
  To: binutils

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=gb2312; format=flowed, Size: 577 bytes --]

Hi all,
   I'm trying to port Gas and Ld to a MIPS-X3 processor. Is there a port to 
X3 already under way?
   I have found the gas/ld port examples in the maillist. But I am a 
novice, the testsuite confused me. I don't know what's function of the 
"*.s" and "*.d" files in the testsuite directory and how to build 
testsuite. I can't find the doc introducing them. Could you give me some 
pointers in this regard?
   Thanks a lot.




_________________________________________________________________
Ãâ·ÑÏÂÔØ MSN Explorer£ºhttp://explorer.msn.com/lccn/intl.asp¡£

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Testing (was: Re: help: question for porting gas/ld to MIPS-X3)
  2002-02-24  7:02 help: question for porting gas/ld to MIPS-X3 David Zhang
@ 2002-02-24  8:47 ` Hans-Peter Nilsson
  2002-03-01  1:05   ` Nick Clifton
  2002-02-24  9:41 ` help: question for porting gas/ld to MIPS-X3 Eric Christopher
  1 sibling, 1 reply; 4+ messages in thread
From: Hans-Peter Nilsson @ 2002-02-24  8:47 UTC (permalink / raw)
  To: David Zhang; +Cc: binutils

On Sun, 24 Feb 2002, David Zhang wrote:

>    I have found the gas/ld port examples in the maillist. But I am a
> novice, the testsuite confused me. I don't know what's function of the
> "*.s" and "*.d" files in the testsuite directory and how to build
> testsuite. I can't find the doc introducing them. Could you give me some
> pointers in this regard?

(To all: There really should be a document describing this
procedure, besides the generalizations in the dejagnu manual at
<URL:http://www.gnu.org/manual/dejagnu-1.3/dejagnu.html>.
Maybe there is; if so I've only forgotten where I've read this.
Maybe someone told me or I read it myself on this list long ago;
I honestly don't remember.)

I think you are referring to the test files for run_dump_tests,
as run from for example ld/testsuite/ld-mips-elf/mips-elf.exp
(or better IMHO: ld/testsuite/ld-mmix/mmix.exp).

You write the .s file(s) yourself, as you add functionality or
investigate a bug that is causing errors or incorrect object
files to be generated by gas or ld.  Then you write the head
part of the .d file.  You have to decide on what kind of
"inspection program" you want to run for the test.  The most
common ones are readelf and objdump.  See run_dump_test in
ld/testsuite/lib/ld-lib.exp for what little documentation there
is about this.

The simplest way forward then is that you run just that test,
for example for ld/testsuite/ld-mmix/bpo-1.d with
 "make check-ld RUNTESTFLAGS=mmix.exp=bpo-1".
The test will fail at this point because the expected output is
empty.  The point is that you use the output generated in
ld/tmpdir/dump.out when running the test, and paste it at the
end of the .d file. In the text you pasted in, you have to add \
escapes in front of regexp metacharacters, and you should
replace the output parts that are likely to change and that are
uninteresting for your test, with generalized regexps.

You don't have to do it the way it's described in the paragraph
above (I've just found that to be easiest for me); you can of
course for example run the "inspection program" manually or
cut-and-paste and use the command lines logged in
ld/testsuite/ld.log.

Note the "#..." and "#pass" run_dump_test match features.
Also, note that the gas run_dump_test differs from the ld one.

A run_dump_test doesn't cover all types of tests, and some
features are lacking, for example the ability to test that some
specific output does *not* appear.  One other type of test is
that invalid input is caught correctly in the assembler.  It is
best done with a "dg" test.  Perhaps the best reading for that
is /usr/share/dejagnu/dg.exp (your filepaths may vary) or by
example from grepping for dg-do in the gas testsuited.  I think
it's also described to some extent in the dejagnu manual.

Hope this helps.  If there's anything that I didn't explain good
enough, please don't hesitate to ask (on the list, as always).

brgds, H-P

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: help: question for porting gas/ld to MIPS-X3
  2002-02-24  7:02 help: question for porting gas/ld to MIPS-X3 David Zhang
  2002-02-24  8:47 ` Testing (was: Re: help: question for porting gas/ld to MIPS-X3) Hans-Peter Nilsson
@ 2002-02-24  9:41 ` Eric Christopher
  1 sibling, 0 replies; 4+ messages in thread
From: Eric Christopher @ 2002-02-24  9:41 UTC (permalink / raw)
  To: David Zhang; +Cc: binutils

Hello David,

>    I'm trying to port Gas and Ld to a MIPS-X3 processor. Is there a port to 
> X3 already under way?

I've not heard of the X3 so I cannot tell you whether or not a port is
underway - no port currently exists to my knowledge though. I see that
someone else has already answered your question about the testsuite, so
I'll just suggest that you scan the existing mips gas testsuite to come
up with ideas for your own tests. (src/gas/testsuite/gas/mips/*.[sd]) 

Good Luck.

-eric

-- 
I will not use abbrev.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Testing (was: Re: help: question for porting gas/ld to MIPS-X3)
  2002-02-24  8:47 ` Testing (was: Re: help: question for porting gas/ld to MIPS-X3) Hans-Peter Nilsson
@ 2002-03-01  1:05   ` Nick Clifton
  0 siblings, 0 replies; 4+ messages in thread
From: Nick Clifton @ 2002-03-01  1:05 UTC (permalink / raw)
  To: Hans-Peter Nilsson; +Cc: binutils

Hi Hans-Peter,

> (To all: There really should be a document describing this
> procedure, besides the generalizations in the dejagnu manual at
> <URL:http://www.gnu.org/manual/dejagnu-1.3/dejagnu.html>.
> Maybe there is; if so I've only forgotten where I've read this.
> Maybe someone told me or I read it myself on this list long ago;
> I honestly don't remember.)

There is some documentation in gas/doc/internals.texi.  Perhaps this
is what you were thinking of ?

Cheers
        Nick

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-03-01  9:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-24  7:02 help: question for porting gas/ld to MIPS-X3 David Zhang
2002-02-24  8:47 ` Testing (was: Re: help: question for porting gas/ld to MIPS-X3) Hans-Peter Nilsson
2002-03-01  1:05   ` Nick Clifton
2002-02-24  9:41 ` help: question for porting gas/ld to MIPS-X3 Eric Christopher

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).