On Wed, Jul 13, 2022 at 4:41 AM Takayuki 'January June' Suwa <jjsuwa_sys3...@yahoo.co.jp> wrote: > > This patch fixes an non-fatal issue about negative constant values derived > from FP constant synthesis on hosts whose 'long' is wider than 'int32_t'. > > And also replaces the dedicated code in FP constant synthesis split > pattern with the appropriate existing function call. > > gcc/ChangeLog: > > * config/xtensa/xtensa.md: > In FP constant synthesis split pattern, subcontract to > avoid_constant_pool_reference() as in the case of integer, > because it can handle well too. And cast to int32_t before > calling xtensa_constantsynth() in order to ignore upper 32-bit. > > gcc/testsuite/ChangeLog: > > * gcc.target/xtensa/constsynth_double.c: > Modify in order to catch the issue. > --- > gcc/config/xtensa/xtensa.md | 35 +++++-------------- > .../gcc.target/xtensa/constsynth_double.c | 2 +- > 2 files changed, 9 insertions(+), 28 deletions(-)
Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master. -- Thanks. -- Max