[Xtensa] make abs and addx/subx instructions optional
Bob Wilson
bwilson@tensilica.com
Tue May 20 23:50:00 GMT 2003
The Xtensa ABS and ADDX/SUBX instructions are currently part of the core
Xtensa instruction set, but it's not necessary to use them. With this patch,
you can get GCC to avoid using these instructions. This may be desireable if
these instructions are expensive to use for some reason or if they become
optional is some future Xtensa ISA. Tested with the xtensa-elf target.
Committed on mainline.
2003-05-20 Bob Wilson <bob.wilson@acm.org>
* config/xtensa/lib1funcs.asm: Avoid use of .Lfe* in .size directives.
(do_abs, do_addx2, do_addx4, do_addx8): New assembler macros.
(__mulsi3): Use do_addx* instead of ADDX* instructions. Formatting.
(nsau): Rename to do_nsau. Provide alternate version for use when
the NSAU instruction is available.
(__udivsi3, __divsi3, __umodsi3, __modsi3): Use do_nsau macro.
(__divsi3, __modsi3): Use do_abs macro instead of ABS instruction.
* config/xtensa/xtensa-config.h: Update comments to match binutils.
(XCHAL_HAVE_ABS, XCHAL_HAVE_ADDX): Define.
* config/xtensa/xtensa.h (MASK_ABS, MASK_ADDX): Define.
(TARGET_ABS, TARGET_ADDX): Define.
(TARGET_DEFAULT): Conditionally add MASK_ABS and MASK_ADDX.
(TARGET_SWITCHES): Add "abs", "no-abs", "addx", and "no-addx".
* config/xtensa/xtensa.md (*addx2, *addx4, *addx8, *subx2, *subx4,
*subx8): Set predicate condition to TARGET_ADDX.
(abssi2): Set predicate condition to TARGET_ABS.
* doc/invoke.texi (Option Summary): Document new "-mabs", "-mno-abs",
"-maddx", and "-mno-addx" options.
(Xtensa Options): Likewise. Also tag some opcode names with @code.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-abs-addx.diff
Type: text/x-diff
Size: 23086 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20030520/928f0571/attachment.bin>
More information about the Gcc-patches
mailing list