ARMv8-M Security Extension's cmse_nonsecure_entry: clear registers
authorAndre Vieira <andre.simoesdiasvieira@arm.com>
Fri, 2 Dec 2016 15:29:03 +0000 (15:29 +0000)
committerAndre Vieira <avieira@gcc.gnu.org>
Fri, 2 Dec 2016 15:29:03 +0000 (15:29 +0000)
commitde954d6a5fb7dbb2c4c0a646a5e59727b06847c1
tree3823fa8a428cd0dcfe7b3c765978c917c4dc3b40
parent9ad1f699b81ce32d1193301ee2c0c188abf64d28
ARMv8-M Security Extension's cmse_nonsecure_entry: clear registers

    gcc/ChangeLog:
    2016-12-02  Andre Vieira  <andre.simoesdiasvieira@arm.com>
Thomas Preud'homme  <thomas.preudhomme@arm.com>

* config/arm/arm.c (output_return_instruction): Clear
registers.
(thumb2_expand_return): Likewise.
(thumb1_expand_epilogue): Likewise.
(thumb_exit): Likewise.
(arm_expand_epilogue): Likewise.
(cmse_nonsecure_entry_clear_before_return): New.
(comp_not_to_clear_mask_str_un): New.
(compute_not_to_clear_mask): New.
* config/arm/thumb1.md (*epilogue_insns): Change length attribute.
* config/arm/thumb2.md (*thumb2_return): Disable for
cmse_nonsecure_entry functions.
(*thumb2_cmse_entry_return): Duplicate thumb2_return pattern for
cmse_nonsecure_entry functions.

    gcc/testsuite/ChangeLog:
    2016-12-02  Andre Vieira  <andre.simoesdiasvieira@arm.com>
Thomas Preud'homme  <thomas.preudhomme@arm.com>

* gcc.target/arm/cmse/cmse.exp: Test different multilibs separate.
* gcc.target/arm/cmse/struct-1.c: New.
* gcc.target/arm/cmse/bitfield-1.c: New.
* gcc.target/arm/cmse/bitfield-2.c: New.
* gcc.target/arm/cmse/bitfield-3.c: New.
* gcc.target/arm/cmse/baseline/cmse-2.c: New.
* gcc.target/arm/cmse/baseline/softfp.c: New.
* gcc.target/arm/cmse/mainline/soft/cmse-5.c: New.
* gcc.target/arm/cmse/mainline/hard/cmse-5.c: New.
* gcc.target/arm/cmse/mainline/hard-sp/cmse-5.c: New.
* gcc.target/arm/cmse/mainline/softfp/cmse-5.c: New.
* gcc.target/arm/cmse/mainline/softfp-sp/cmse-5.c: New.

Co-Authored-By: Thomas Preud'homme <thomas.preudhomme@arm.com>
From-SVN: r243190
17 files changed:
gcc/ChangeLog
gcc/config/arm/arm.c
gcc/config/arm/thumb1.md
gcc/config/arm/thumb2.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/cmse/baseline/cmse-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/baseline/softfp.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/bitfield-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/bitfield-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/bitfield-3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/cmse.exp
gcc/testsuite/gcc.target/arm/cmse/mainline/hard-sp/cmse-5.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/mainline/hard/cmse-5.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/mainline/soft/cmse-5.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/mainline/softfp-sp/cmse-5.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/mainline/softfp/cmse-5.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/struct-1.c [new file with mode: 0644]