On Tue, Jul 31, 2018 at 6:36 AM, Kyrill Tkachov <kyrylo.tkac...@foss.arm.com> wrote: > Hi Thomas, > > > On 25/07/18 14:28, Thomas Preudhomme wrote: >> >> Hi Kyrill, >> >> Using memory_operand worked, the issues I encountered when using it in >> earlier versions of the patch must have been due to the missing test >> on address_operand in the preparation statements which I added later. >> Please find an updated patch in attachment. ChangeLog entry is as >> follows: >> >> *** gcc/ChangeLog *** >> >> 2018-07-05 Thomas Preud'homme <thomas.preudho...@linaro.org> >> >> * target-insns.def (stack_protect_combined_set): Define new standard >> pattern name. >> (stack_protect_combined_test): Likewise. >> * cfgexpand.c (stack_protect_prologue): Try new >> stack_protect_combined_set pattern first. >> * function.c (stack_protect_epilogue): Try new >> stack_protect_combined_test pattern first. >> * config/arm/arm.c (require_pic_register): Add pic_reg and >> compute_now >> parameters to control which register to use as PIC register and force >> reloading PIC register respectively. Insert in the stream of insns >> if >> possible. >> (legitimize_pic_address): Expose above new parameters in prototype >> and >> adapt recursive calls accordingly. >> (arm_legitimize_address): Adapt to new legitimize_pic_address >> prototype. >> (thumb_legitimize_address): Likewise. >> (arm_emit_call_insn): Adapt to new require_pic_register prototype. >> * config/arm/arm-protos.h (legitimize_pic_address): Adapt to >> prototype >> change. >> * config/arm/arm.md (movsi expander): Adapt to legitimize_pic_address >> prototype change. >> (stack_protect_combined_set): New insn_and_split pattern. >> (stack_protect_set): New insn pattern. >> (stack_protect_combined_test): New insn_and_split pattern. >> (stack_protect_test): New insn pattern. >> * config/arm/unspecs.md (UNSPEC_SP_SET): New unspec. >> (UNSPEC_SP_TEST): Likewise. >> * doc/md.texi (stack_protect_combined_set): Document new standard >> pattern name. >> (stack_protect_set): Clarify that the operand for guard's address is >> legal. >> (stack_protect_combined_test): Document new standard pattern name. >> (stack_protect_test): Clarify that the operand for guard's address is >> legal. >> >> *** gcc/testsuite/ChangeLog *** >> >> 2018-07-05 Thomas Preud'homme <thomas.preudho...@linaro.org> >> >> * gcc.target/arm/pr85434.c: New test. >> >> Bootstrapped again for Arm and Thumb-2 and regtested with and without >> -fstack-protector-all without any regression. > > > This looks ok to me now. > Thank you for your patience and addressing my comments from before. >
This breaks x86: FAIL: gcc.dg/fstack-protector-strong.c (internal compiler error) FAIL: gcc.dg/fstack-protector-strong.c (test for excess errors) FAIL: gcc.dg/fstack-protector-strong.c (test for warnings, line 109) FAIL: gcc.dg/pr71585-3.c (internal compiler error) FAIL: gcc.dg/pr71585-3.c (test for excess errors) FAIL: gcc.dg/pr71585.c (internal compiler error) FAIL: gcc.dg/pr71585.c (test for excess errors) FAIL: gcc.target/i386/pr37275.c (internal compiler error) FAIL: gcc.target/i386/pr37275.c (test for excess errors) FAIL: gcc.target/i386/pr47780.c (internal compiler error) FAIL: gcc.target/i386/pr47780.c (test for excess errors) FAIL: gcc.target/i386/pr50788.c (internal compiler error) FAIL: gcc.target/i386/pr50788.c (test for excess errors) FAIL: gcc.target/i386/pr68680.c (internal compiler error) FAIL: gcc.target/i386/pr68680.c (test for excess errors) FAIL: gcc.target/i386/stack-prot-guard.c (internal compiler error) FAIL: gcc.target/i386/stack-prot-guard.c (test for excess errors) FAIL: gcc.target/i386/stack-prot-sym.c (internal compiler error) FAIL: gcc.target/i386/stack-prot-sym.c (test for excess errors) FAIL: g++.dg/fstack-protector-strong.C -std=gnu++11 (internal compiler error) FAIL: g++.dg/fstack-protector-strong.C -std=gnu++11 (test for excess errors) FAIL: g++.dg/fstack-protector-strong.C -std=gnu++14 (internal compiler error) FAIL: g++.dg/fstack-protector-strong.C -std=gnu++14 (test for excess errors) FAIL: g++.dg/fstack-protector-strong.C -std=gnu++98 (internal compiler error) FAIL: g++.dg/fstack-protector-strong.C -std=gnu++98 (test for excess errors) FAIL: g++.dg/pr65032.C (internal compiler error) FAIL: g++.dg/pr65032.C (test for excess errors) FAIL: g++.dg/stackprotectexplicit2.C -std=gnu++11 (internal compiler error) FAIL: g++.dg/stackprotectexplicit2.C -std=gnu++11 (test for excess errors) FAIL: g++.dg/stackprotectexplicit2.C -std=gnu++14 (internal compiler error) FAIL: g++.dg/stackprotectexplicit2.C -std=gnu++14 (test for excess errors) FAIL: g++.dg/stackprotectexplicit2.C -std=gnu++98 (internal compiler error) FAIL: g++.dg/stackprotectexplicit2.C -std=gnu++98 (test for excess errors) -- H.J.