This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [Fwd: Re: [PATCH] MIPS32 DSP instructions again]
- From: Dominic Sweetman <dom at mips dot com>
- To: Ian Lance Taylor <ian at airs dot com>
- Cc: Dominic Sweetman <dom at mips dot com>, Paul Koning <pkoning at equallogic dot com>, nigel at mips dot com, echristo at redhat dot com, fu at mips dot com, rsandifo at nildram dot co dot uk, radhika at mips dot com, binutils at sourceware dot org
- Date: Thu, 9 Jun 2005 21:56:17 +0100
- Subject: Re: [Fwd: Re: [PATCH] MIPS32 DSP instructions again]
- References: <42A86D4B.9010304@mips.com><17064.33380.406352.792952@arsenal.mips.com><m3r7fbwdup.fsf@gossamer.airs.com>
Ian Lance Taylor (ian@airs.com) writes:
> > Which comes down to this: under what circumstances might it be helpful
> > for the assembler to reject a piece of code which it could have
> > assembled?
>
> In general, it is better to get a compile-time error than a run-time
> error.
Depends whether it's a real one, of course.
> For example, suppose some library is written to use the new
> instructions. Suppose it's a portable library, for various
> processors. I get the source code for that library, and I compile it
> with the options appropriate for my processor. Unfortunately, there
> is a bug, and the library uses an asm statement with an instruction
> which is not supported on my processor. I would prefer to get a
> compile-time error rather than a run-time error.
I see where you're coming from. But if your configuration was screwed
up you would be quite likely to send the wrong flag to the assembler
too :-(.
Perhaps I'm from an old school, but I do really hate programs which
could have given you some useful output, but second-guess you and give
you an error message instead. There are always corner cases where
you're doing bizarre things (running DSP instructions on a non-DSP CPU
and trap-emulating them, for example) which you end up having to
figure out how to lie to the toolchain. I think an assembler is a
low-level thing which should do what it's told to do, and not argue
overmuch.
Are you convinced? Half...?
--
Dominic