This is the mail archive of the binutils@sources.redhat.com 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]

Re: [PATCH] MIPS32 DSP instructions again


Nigel Stephens <nigel@mips.com> writes:

> However the MIPS32 and MIPS64 architectures are defined carefully and
> rigorously to avoid such opcode and name collisions. So long as an ASE
> or ISA revision is defined as part of the MIPS32 / MIPS64
> architecture, then it will be guaranteed not to clash with any other
> MIPS32 / MIPS64 ASE or ISA revision. This means that it is enough to
> know that you are assembling or disassembling code for MIPS32 (or
> MIPS64) to enable all of the ASEs, such as the DSP ASE in this
> case. If the programmer happens to use a machine instruction which
> isn't supported on their particular CPU core, then that's their
> mistake, and they're guaranteed to get a reserved instruction
> exception if they try to execute it. Of course they may also be clever
> enough to check at run-time which ASEs are available, and then choose
> whether or not to execute those instructions (e.g. inside a generic OS
> kernel designed to run on a range of cores with different ASEs).

I disagree.  I think it is appropriate and useful for the assembler to
be able to correctly accept or reject instructions based on the
command line options and .set options.

I agree that the disassembler doesn't need to know.

> A final argument against labelling each and every ASE in the opcode
> tables, is that you might then argue yourself into saying that the
> ASEs also need to be recorded within the ELF header, so that the
> disassembler and debugger can decide whether or not to decode those
> instructions, or a kernel can decide whether or not to run an
> executable - but we're running out of spare bits in there! :-)

I think using a .note section would be appropriate, but I don't feel
all that strongly about it.

Ian


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