aboutsummaryrefslogtreecommitdiff
path: root/gcc/data-streamer-in.cc
diff options
context:
space:
mode:
authorJan Dubiec <jdx@o2.pl>2025-03-01 08:21:16 -0700
committerJeff Law <jlaw@ventanamicro.com>2025-03-01 08:21:16 -0700
commit898f22d15805229a932fff7f22a0a8054e1b9b31 (patch)
tree259c4e7d7e9066a46456460d7c0719a95041eabf /gcc/data-streamer-in.cc
parentdfdbad87aeb2deff9e13a394659ac7b37173648a (diff)
downloadgcc-898f22d15805229a932fff7f22a0a8054e1b9b31.zip
gcc-898f22d15805229a932fff7f22a0a8054e1b9b31.tar.gz
gcc-898f22d15805229a932fff7f22a0a8054e1b9b31.tar.bz2
[PATCH] H8/300, libgcc: PR target/114222 For HImode call internal ffs() implementation instead of an external one
When INT_TYPE_SIZE < BITS_PER_WORD gcc emits a call to an external ffs() implementation instead of a call to "__builtin_ffs()" – see function init_optabs() in <SRCROOT>/gcc/optabs-libfuncs.cc. External ffs() (which is usually the one from newlib) in turn calls __builtin_ffs() what causes infinite recursion and stack overflow. This patch overrides default gcc bahaviour for H8/300H (and newer) and provides a generic ffs() implementation for HImode. PR target/114222 gcc/ChangeLog: * config/h8300/h8300.cc (h8300_init_libfuncs): For HImode override calls to external ffs() (from newlib) with calls to __ffshi2() from libgcc. The implementation of ffs() in newlib calls __builtin_ffs() what causes infinite recursion and finally a stack overflow. libgcc/ChangeLog: * config/h8300/t-h8300: Add __ffshi2(). * config/h8300/ffshi2.c: New file.
Diffstat (limited to 'gcc/data-streamer-in.cc')
0 files changed, 0 insertions, 0 deletions