Current code to handle -mslow-flash-data in machine description files suffers from a number of issues which this patch fixes: 1) The insn_and_split in vfp.md to load a generic floating-point constant via GPR first and move it to VFP register are guarded by !reload_completed which is forbidden explicitely in the GCC internals documentation section 17.2 point 3; 2) A number of testcase in the testsuite ICEs under -mslow-flash-data when targeting the hardfloat ABI [1]; 3) Instructions performing load from literal pool are not disabled. These problems are addressed by 2 separate actions: 1) Making the splitters take a clobber and changing the expanders accordingly to generate a mov with clobber in cases where a literal pool would be used. The splitter can thus be enabled after reload since it does not call gen_reg_rtx anymore; 2) Adding new predicates and constraints to disable literal pool loads in existing instructions when -mslow-flash-data is in effect. The patch also rework the splitter for DFmode slightly to generate an intermediate DI load instead of 2 intermediate SI loads, thus relying on the existing DI splitters instead of redoing their job. At last, the patch adds some missing arm_fp_ok effective target to some of the slow-flash-data testcases. [1] c-c++-common/Wunused-var-3.c gcc.c-torture/compile/pr72771.c gcc.c-torture/compile/vector-5.c gcc.c-torture/compile/vector-6.c gcc.c-torture/execute/20030914-1.c gcc.c-torture/execute/20050316-1.c gcc.c-torture/execute/pr59643.c gcc.dg/builtin-tgmath-1.c gcc.dg/debug/pr55730.c gcc.dg/graphite/interchange-7.c gcc.dg/pr56890-2.c gcc.dg/pr68474.c gcc.dg/pr80286.c gcc.dg/torture/pr35227.c gcc.dg/torture/pr65077.c gcc.dg/torture/pr86363.c g++.dg/torture/pr81112.C g++.dg/torture/pr82985.C g++.dg/warn/Wunused-var-7.C and a lot more in libstdc++ in special_functions/*_comp_ellint_* and special_functions/*_ellint_* directories. 2018-12-14 Thomas Preud'homme <thomas.preudhomme@arm.com> gcc/ * config/arm/arm.md (arm_movdi): Split if -mslow-flash-data and source is a constant that would be loaded by literal pool. (movsf expander): Generate a no_literal_pool_sf_immediate insn if -mslow-flash-data is present, targeting hardfloat ABI and source is a float constant that cannot be loaded via vmov. (movdf expander): Likewise but generate a no_literal_pool_df_immediate insn. (arm_movsf_soft_insn): Split if -mslow-flash-data and source is a float constant that would be loaded by literal pool. (softfloat constant movsf splitter): Splitter for the above case. (movdf_soft_insn): Split if -mslow-flash-data and source is a float constant that would be loaded by literal pool. (softfloat constant movdf splitter): Splitter for the above case. * config/arm/constraints.md (Pz): Document existing constraint. (Ha): Define constraint. (Tu): Likewise. * config/arm/predicates.md (hard_sf_operand): New predicate. (hard_df_operand): Likewise. * config/arm/thumb2.md (thumb2_movsi_insn): Split if -mslow-flash-data and constant would be loaded by literal pool. * constant/arm/vfp.md (thumb2_movsi_vfp): Likewise and disable constant load in VFP register. (movdi_vfp): Likewise. (thumb2_movsf_vfp): Use hard_sf_operand as predicate for source to prevent match for a constant load if -mslow-flash-data and constant cannot be loaded via vmov. Adapt constraint accordingly by using Ha instead of E for generic floating-point constant load. (thumb2_movdf_vfp): Likewise using hard_df_operand predicate instead. (no_literal_pool_df_immediate): Add a clobber to use as the intermediate general purpose register and also enable it after reload but disable it constant is a valid FP constant. Add constraints and generate a DI intermediate load rather than 2 SI loads. (no_literal_pool_sf_immediate): Add a clobber to use as the intermediate general purpose register and also enable it after reload. 2018-11-14 Thomas Preud'homme <thomas.preudhomme@arm.com> gcc/testsuite/ * gcc.target/arm/thumb2-slow-flash-data-2.c: Require arm_fp_ok effective target. * gcc.target/arm/thumb2-slow-flash-data-3.c: Likewise. * gcc.target/arm/thumb2-slow-flash-data-4.c: Likewise. * gcc.target/arm/thumb2-slow-flash-data-5.c: Likewise. From-SVN: r267141
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
aarch64 | Loading commit data... | |
alpha | Loading commit data... | |
arc | Loading commit data... | |
arm | Loading commit data... | |
avr | Loading commit data... | |
bfin | Loading commit data... | |
c6x | Loading commit data... | |
cr16 | Loading commit data... | |
cris | Loading commit data... | |
csky | Loading commit data... | |
epiphany | Loading commit data... | |
fr30 | Loading commit data... | |
frv | Loading commit data... | |
ft32 | Loading commit data... | |
h8300 | Loading commit data... | |
i386 | Loading commit data... | |
ia64 | Loading commit data... | |
iq2000 | Loading commit data... | |
lm32 | Loading commit data... | |
m32c | Loading commit data... | |
m32r | Loading commit data... | |
m68k | Loading commit data... | |
mcore | Loading commit data... | |
microblaze | Loading commit data... | |
mips | Loading commit data... | |
mmix | Loading commit data... | |
mn10300 | Loading commit data... | |
moxie | Loading commit data... | |
msp430 | Loading commit data... | |
nds32 | Loading commit data... | |
nios2 | Loading commit data... | |
nvptx | Loading commit data... | |
or1k | Loading commit data... | |
pa | Loading commit data... | |
pdp11 | Loading commit data... | |
riscv | Loading commit data... | |
rl78 | Loading commit data... | |
rs6000 | Loading commit data... | |
rx | Loading commit data... | |
s390 | Loading commit data... | |
sh | Loading commit data... | |
sparc | Loading commit data... | |
spu | Loading commit data... | |
stormy16 | Loading commit data... | |
tilegx | Loading commit data... | |
tilepro | Loading commit data... | |
v850 | Loading commit data... | |
vax | Loading commit data... | |
visium | Loading commit data... | |
vms | Loading commit data... | |
xtensa | Loading commit data... | |
README | Loading commit data... | |
darwin-c.c | Loading commit data... | |
darwin-driver.c | Loading commit data... | |
darwin-f.c | Loading commit data... | |
darwin-ppc-ldouble-patch.def | Loading commit data... | |
darwin-protos.h | Loading commit data... | |
darwin-sections.def | Loading commit data... | |
darwin.c | Loading commit data... | |
darwin.h | Loading commit data... | |
darwin.opt | Loading commit data... | |
darwin10.h | Loading commit data... | |
darwin12.h | Loading commit data... | |
darwin9.h | Loading commit data... | |
dbx.h | Loading commit data... | |
dbxcoff.h | Loading commit data... | |
dbxelf.h | Loading commit data... | |
default-c.c | Loading commit data... | |
default-d.c | Loading commit data... | |
dragonfly-stdint.h | Loading commit data... | |
dragonfly.h | Loading commit data... | |
dragonfly.opt | Loading commit data... | |
elfos.h | Loading commit data... | |
flat.h | Loading commit data... | |
freebsd-nthr.h | Loading commit data... | |
freebsd-spec.h | Loading commit data... | |
freebsd-stdint.h | Loading commit data... | |
freebsd.h | Loading commit data... | |
freebsd.opt | Loading commit data... | |
fuchsia.h | Loading commit data... | |
fused-madd.opt | Loading commit data... | |
g.opt | Loading commit data... | |
glibc-c.c | Loading commit data... | |
glibc-d.c | Loading commit data... | |
glibc-stdint.h | Loading commit data... | |
gnu-user.h | Loading commit data... | |
gnu-user.opt | Loading commit data... | |
gnu.h | Loading commit data... | |
host-darwin.c | Loading commit data... | |
host-darwin.h | Loading commit data... | |
host-hpux.c | Loading commit data... | |
host-linux.c | Loading commit data... | |
host-netbsd.c | Loading commit data... | |
host-openbsd.c | Loading commit data... | |
host-solaris.c | Loading commit data... | |
hpux-stdint.h | Loading commit data... | |
hpux11.opt | Loading commit data... | |
initfini-array.h | Loading commit data... | |
kfreebsd-gnu.h | Loading commit data... | |
kopensolaris-gnu.h | Loading commit data... | |
linux-android.h | Loading commit data... | |
linux-android.opt | Loading commit data... | |
linux-protos.h | Loading commit data... | |
linux.c | Loading commit data... | |
linux.h | Loading commit data... | |
linux.opt | Loading commit data... | |
lynx.h | Loading commit data... | |
lynx.opt | Loading commit data... | |
netbsd-elf.h | Loading commit data... | |
netbsd-elf.opt | Loading commit data... | |
netbsd-protos.h | Loading commit data... | |
netbsd-stdint.h | Loading commit data... | |
netbsd.c | Loading commit data... | |
netbsd.h | Loading commit data... | |
netbsd.opt | Loading commit data... | |
newlib-stdint.h | Loading commit data... | |
openbsd-libpthread.h | Loading commit data... | |
openbsd-stdint.h | Loading commit data... | |
openbsd.h | Loading commit data... | |
openbsd.opt | Loading commit data... | |
phoenix.h | Loading commit data... | |
print-sysroot-suffix.sh | Loading commit data... | |
rpath.opt | Loading commit data... | |
rtems.h | Loading commit data... | |
rtems.opt | Loading commit data... | |
sol2-c.c | Loading commit data... | |
sol2-clearcap.map | Loading commit data... | |
sol2-clearcapv2.map | Loading commit data... | |
sol2-cxx.c | Loading commit data... | |
sol2-d.c | Loading commit data... | |
sol2-protos.h | Loading commit data... | |
sol2-stubs.c | Loading commit data... | |
sol2.c | Loading commit data... | |
sol2.h | Loading commit data... | |
sol2.opt | Loading commit data... | |
t-darwin | Loading commit data... | |
t-glibc | Loading commit data... | |
t-libunwind | Loading commit data... | |
t-linux | Loading commit data... | |
t-lynx | Loading commit data... | |
t-musl | Loading commit data... | |
t-netbsd | Loading commit data... | |
t-openbsd | Loading commit data... | |
t-pnt16-warn | Loading commit data... | |
t-rtems | Loading commit data... | |
t-slibgcc | Loading commit data... | |
t-sol2 | Loading commit data... | |
t-sysroot-suffix | Loading commit data... | |
t-uclibc | Loading commit data... | |
t-vxworks | Loading commit data... | |
t-winnt | Loading commit data... | |
tm-dwarf2.h | Loading commit data... | |
usegas.h | Loading commit data... | |
usegld.h | Loading commit data... | |
vx-common.h | Loading commit data... | |
vxworks-dummy.h | Loading commit data... | |
vxworks-stdint.h | Loading commit data... | |
vxworks.c | Loading commit data... | |
vxworks.h | Loading commit data... | |
vxworks.opt | Loading commit data... | |
vxworksae.h | Loading commit data... | |
winnt-c.c | Loading commit data... | |
x-cflags-O1 | Loading commit data... | |
x-darwin | Loading commit data... | |
x-hpux | Loading commit data... | |
x-linux | Loading commit data... | |
x-netbsd | Loading commit data... | |
x-openbsd | Loading commit data... | |
x-solaris | Loading commit data... |