diff options
author | Takayuki 'January June' Suwa <jjsuwa_sys3175@yahoo.co.jp> | 2023-02-27 02:27:42 +0900 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2023-02-27 04:03:33 -0800 |
commit | ce83c3e492c2fa5a08c15b5f4619d58f42a5dcd0 (patch) | |
tree | 214b49a0e36c7ab170b4b1298bd1c3c633ad5f79 /gcc/hash-map-tests.cc | |
parent | 999b7aab21ca96d58a1dc99f52a3c01cd8760c72 (diff) | |
download | gcc-ce83c3e492c2fa5a08c15b5f4619d58f42a5dcd0.tar.gz |
xtensa: Make use of CLAMPS instruction if configured
This patch introduces the use of CLAMPS instruction when the instruction
is configured.
/* example */
int test(int a) {
if (a < -512)
return -512;
if (a > 511)
return 511;
return a;
}
;; prereq: TARGET_CLAMPS
test:
clamps a2, a2, 9
ret.n
gcc/ChangeLog:
* config/xtensa/xtensa-protos.h (xtensa_match_CLAMPS_imms_p):
New prototype.
* config/xtensa/xtensa.cc (xtensa_match_CLAMPS_imms_p):
New function.
* config/xtensa/xtensa.h (TARGET_CLAMPS): New macro definition.
* config/xtensa/xtensa.md (*xtensa_clamps): New insn pattern.
Diffstat (limited to 'gcc/hash-map-tests.cc')
0 files changed, 0 insertions, 0 deletions