diff options
| author | Takayuki 'January June' Suwa <jjsuwa_sys3175@yahoo.co.jp> | 2025-10-31 15:23:15 +0900 |
|---|---|---|
| committer | Max Filippov <jcmvbkbc@gmail.com> | 2025-10-31 21:38:54 -0700 |
| commit | 806b229561f5380c00057c16bc1644dbf58cfa9b (patch) | |
| tree | f35459d2153b4efb5b35010f5a3bfd0808fb4f88 /gcc/rust/parse/rust-parse-impl.h | |
| parent | 0e71df96e2e34d1d6163bdeab06edecb34fb1c16 (diff) | |
| download | gcc-806b229561f5380c00057c16bc1644dbf58cfa9b.zip gcc-806b229561f5380c00057c16bc1644dbf58cfa9b.tar.gz gcc-806b229561f5380c00057c16bc1644dbf58cfa9b.tar.bz2 | |
xtensa: Add alternative negsf2 insn pattern
If both the source and destination are address (GP) registers, emitting
instructions that invert the MSB of the address register is two bytes
shorter if TARGET_DENSITY is enabled than emitting a NEG.S machine inst-
ruction that uses hardware FP registers with two reloads.
/* example */
float test(float a) {
return -a;
}
;; before
test:
entry sp, 32
wfr f0, a2
neg.s f0, f0
rfr a2, f0
retw.n
;; after
test:
entry sp, 32
movi.n a8, 1
slli a8, a8, 31
add.n a2, a2, a8
retw.n
By the way, in configurations that do not use hardware FP register, the
RTL expansion pass will emit such insns by default.
gcc/ChangeLog:
* config/xtensa/xtensa.md (negsf2):
Add another insn pattern that is valid when TARGET_DENSITY is
enabled and both the source and destination are address registers.
Diffstat (limited to 'gcc/rust/parse/rust-parse-impl.h')
0 files changed, 0 insertions, 0 deletions
