Robin Getz wrote:
On Tue 20 Oct 2009 10:57, Jie Zhang pondered:
This patch fixes

FAIL: gcc.target/bfin/builtins/shl_fr1x32-2.c execution, -O2
FAIL: gcc.target/bfin/builtins/shl_fr1x32-4.c execution, -O2

by teaching GCC the correct semantics of Blackfin shift instructions. It converts negative shift amount to positive shift amount which GCC can optimize. With this patch, the computation in these two test cases will be optimized away when -O2.

This patch also adds

__builtin_bfin_shr_fr1x16
__builtin_bfin_shr_fr2x16
__builtin_bfin_shrl_fr1x16
__builtin_bfin_shrl_fr2x16
__builtin_bfin_shr_fr1x32

This patch has not been completed. I'm going to rename all the shift patterns to the standard names, such that gcc can use them.

Any comments?


How much of the fractional stuff we are adding can be re-used for the standard gcc fixed point fractional stuff? (looks like some of it is just naming differences?)

http://gcc.gnu.org/onlinedocs/gccint/Fixed_002dpoint-fractional-library-routines.html

Those are emulation routines. They are for ports which don't have hardware fixed point instructons.

http://gcc.gnu.org/wiki/FixedPointArithmetic

We don't use fixed-point modes in Blackfin port. The first step would be adding new patterns and/or modifying existing patterns to use fixed-point modes.


Jie

_______________________________________________
Toolchain-devel mailing list
Toolchain-devel@blackfin.uclinux.org
https://blackfin.uclinux.org/mailman/listinfo/toolchain-devel

Reply via email to