support for extensa mul16, fp, etc ?
Bob Wilson
bwilson@tensilica.com
Fri Aug 20 19:27:00 GMT 2004
Sorry for the slow response -- I just got back from a vacation.
The problem here is that the code in CVS cannot possibly support all potential
Xtensa processor configurations. Besides allowing users to add optional
packages like the FPU, multiplier, etc., Tensilica allows users to define custom
instructions, so there fundamentally has to be some configuration-specific
files. GCC will not generate code that uses arbitrary custom instructions, so
it only needs the xtensa-config.h header to indicate which of the optional
predefined packages should be used. Binutils, in contrast, needs to know how to
encode and decode arbitrary instructions. The code to do that is in the Xtensa
configuration-specific bfd/xtensa-modules.c file. If you want binutils to
support the mul16 and fp options, you'll need a version of xtensa-modules.c that
includes those options. If you already have that code, just replace the default
version and you'll be all set.
When I contributed the Xtensa port of binutils, I somewhat arbitrarily picked an
Xtensa configuration that did not include those options. I think you have a
good point that since GCC can generate these instructions, it would be good if
the binutils code in CVS could handle them as well. I will change the default
Xtensa configuration to include all the instructions supported by GCC. That
will also improve testing coverage for these optional Xtensa packages.
Unfortunately, I'm not prepared to make this change right now. I'm in the
middle of a big project to update the Xtensa port of binutils to support the
upcoming Xtensa LX release, and I don't want to perturb things any more than I
have to until that is done. (I'm also putting off switching the Xtensa files to
ISO C90 until I finish merging the Xtensa LX changes.) If you need a solution
soon and you don't already have a suitable version of the xtensa-modules.c file,
let me know what you need and I'll see if I can help you find a temporary
workaround.
--Bob
Nick Clifton wrote:
> Hi Greg,
>
> [I am including Bob Wilson, the official binutils Xtensa maintainer on
> the To: line - Hi Bob!]
>
>> Does binutils-2.15, with the xtensa target, have support for the
>> 'optional' instruction
>> sets, e.f. mul16 option, fpu option, etc?
>
>
> It does not appear so. :-( I have checked the sources and although
> macros like XCHAL_HAVE_MUL16 and XCHAL_HAVE_FP are defined, they are not
> used anywhere. This applies to both the 2.15 sources and the current
> binutils sources in the CVS repository.
>
>> Because gcc-3.4.1 does .. and my gcc build is
>> failing due to the assembler not recognizing
>> the 'mul16u' instruction.
>
>
> I hope that this is just a temporary snafu and that someone soon will be
> contributing code to binutils to add support for these instructions...
More information about the Binutils
mailing list