aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/libgnat/g-md5.adb
diff options
context:
space:
mode:
authorGeorg-Johann Lay <avr@gjlay.de>2025-01-30 12:16:50 +0100
committerGeorg-Johann Lay <avr@gjlay.de>2025-01-30 20:43:14 +0100
commit1e819a997dd5507e52cafc540656fc15160322fd (patch)
tree54ae5ca715e6ea1339ae43b6a5c1ee470ba176d2 /gcc/ada/libgnat/g-md5.adb
parentcde452e270e500db776e75d0bdda0b32d9c37981 (diff)
downloadgcc-1e819a997dd5507e52cafc540656fc15160322fd.zip
gcc-1e819a997dd5507e52cafc540656fc15160322fd.tar.gz
gcc-1e819a997dd5507e52cafc540656fc15160322fd.tar.bz2
AVR: Provide built-ins for strlen where the string lives in some AS.
This patch adds built-in functions __builtin_avr_strlen_flash, __builtin_avr_strlen_flashx and __builtin_avr_strlen_memx. Purpose is that higher-level functions can use __builtin_constant_p on strlen without raising a diagnostic due to -Waddr-space-convert. gcc/ * config/avr/builtins.def (STRLEN_FLASH, STRLEN_FLASHX) (STRLEN_MEMX): New DEF_BUILTIN's. * config/avr/avr.cc (avr_ftype_strlen): New static function. (avr_builtin_supported_p): New built-ins are not for AVR_TINY. (avr_init_builtins) <strlen_flash_node, strlen_flashx_node, strlen_memx_node>: Provide new fntypes. (avr_fold_builtin) [AVR_BUILTIN_STRLEN_FLASH] [AVR_BUILTIN_STRLEN_FLASHX, AVR_BUILTIN_STRLEN_MEMX]: Fold if possible. * doc/extend.texi (AVR Built-in Functions): Document __builtin_avr_strlen_flash, __builtin_avr_strlen_flashx, __builtin_avr_strlen_memx. libgcc/ * config/avr/t-avr (LIB1ASMFUNCS): Add _strlen_memx. * config/avr/lib1funcs.S <L_strlen_memx, __strlen_memx>: Implement.
Diffstat (limited to 'gcc/ada/libgnat/g-md5.adb')
0 files changed, 0 insertions, 0 deletions