]> git.ipfire.org Git - thirdparty/gcc.git/commit
i386: Use assign_stack_temp instead of assign_386_stack_local with SLOT_TEMP
authorUros Bizjak <ubizjak@gmail.com>
Wed, 30 Oct 2024 07:17:15 +0000 (08:17 +0100)
committerUros Bizjak <ubizjak@gmail.com>
Wed, 30 Oct 2024 07:17:50 +0000 (08:17 +0100)
commitee09fcc4e37a80d1c5cc0b08144bb1c2c4424747
tree5292dc380d95d46a4222e9a3acfae76efb794480
parentabcfe1e51c18b14d324586f1d9d50e8238497865
i386: Use assign_stack_temp instead of assign_386_stack_local with SLOT_TEMP

It is better to use assign_stack_temp instead of assign_386_stack_local
with SLOT_TEMP because assign_stack_temp also shares sub-space of stack
slots (e.g. HImode temp shares stack slot with SImode stack slot).

Use assign_386_stack_local only for special stack slots (SLOT_STV_TEMP that
can be nested inside other stack temp access, SLOT_FLOATxFDI_387 that has
relaxed alignment constraint) or slots that can't be shared (SLOT_CW_*).

The patch removes SLOT_TEMP. assign_stack_temp should be used instead.

gcc/ChangeLog:

* config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_TEMP.
* config/i386/i386-expand.cc (ix86_expand_builtin)
<case IX86_BUILTIN_LDMXCSR>: Use assign_stack_temp instead of
assign_386_stack_local with SLOT_TEMP.
<case IX86_BUILTIN_LDMXCSR>: Ditto.
(ix86_expand_divmod_libfunc): Ditto.
* config/i386/i386.md (floatunssi<mode>2): Ditto.
* config/i386/sync.md (atomic_load<mode>): Ditto.
(atomic_store<mode>): Ditto.
gcc/config/i386/i386-expand.cc
gcc/config/i386/i386.h
gcc/config/i386/i386.md
gcc/config/i386/sync.md