http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54222



--- Comment #10 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2013-01-25 
09:28:14 UTC ---

Author: gjl

Date: Fri Jan 25 09:28:09 2013

New Revision: 195464



URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195464

Log:

gcc/

    PR target/54222

    * config/avr/builtins.def (DEF_BUILTIN): Add LIBNAME argument.

    Add NULL LIBNAME argument to existing definitions.

    (ABSHR, ABSR, ABSLR, ABSLLR, ABSHK, ABSK, ABSLK, ABSLLK): New.

    * config/avr/avr-c.c (DEF_BUILTIN): Add LIBNAME argument.

    * config/avr/avr.c (DEF_BUILTIN): Same.

    (avr_init_builtins): Pass down LIBNAME to add_builtin_function.

    (avr_expand_builtin): Expand to a vanilla call if a libgcc

    implementation is available (DECL_ASSEMBLER_NAME is set).

    (avr_fold_absfx): New static function.

    (avr_fold_builtin): Use it to handle: AVR_BUILTIN_ABSHR,

    AVR_BUILTIN_ABSR, AVR_BUILTIN_ABSLR, AVR_BUILTIN_ABSLLR,

    AVR_BUILTIN_ABSHK, AVR_BUILTIN_ABSK, AVR_BUILTIN_ABSLK,

    AVR_BUILTIN_ABSLLK.

    * config/avr/stdfix.h (abshr, absr, abslr, absllr)

    (abshk, absk, abslk, absllk): Provide as static inline functions.



gcc/testsuite/

    PR target/54222

    * gcc.target/avr/torture/builtins-3-absfx.c: New test.





Added:

    trunk/gcc/testsuite/gcc.target/avr/torture/builtins-3-absfx.c

Modified:

    trunk/gcc/ChangeLog

    trunk/gcc/config/avr/avr-c.c

    trunk/gcc/config/avr/avr.c

    trunk/gcc/config/avr/builtins.def

    trunk/gcc/config/avr/stdfix.h

    trunk/gcc/testsuite/ChangeLog

Reply via email to