ARMv8-M Security Extension's cmse_nonsecure_call: use __gnu_cmse_nonsecure_call
authorAndre Vieira <andre.simoesdiasvieira@arm.com>
Fri, 2 Dec 2016 15:33:26 +0000 (15:33 +0000)
committerAndre Vieira <avieira@gcc.gnu.org>
Fri, 2 Dec 2016 15:33:26 +0000 (15:33 +0000)
commitc92e08e3d766baf88c7507cd5224d4d241ff8d39
treedcc8522e2fa876b1abe93f1316abf955b7c1e022
parent32ce1e4f244830404328e5a45d062c2f5bee662d
ARMv8-M Security Extension's cmse_nonsecure_call: use __gnu_cmse_nonsecure_call

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

* config/arm/arm.c (detect_cmse_nonsecure_call): New.
(cmse_nonsecure_call_clear_caller_saved): New.
(arm_reorg): Use cmse_nonsecure_call_clear_caller_saved.
(arm_function_ok_for_sibcall): Disable sibcalls for
cmse_nonsecure_call.
* config/arm/arm-protos.h (detect_cmse_nonsecure_call): New.
* config/arm/arm.md (call): Handle cmse_nonsecure_entry.
(call_value): Likewise.
(nonsecure_call_internal): New.
(nonsecure_call_value_internal): New.
* config/arm/thumb1.md (*nonsecure_call_reg_thumb1_v5): New.
(*nonsecure_call_value_reg_thumb1_v5): New.
* config/arm/thumb2.md (*nonsecure_call_reg_thumb2): New.
(*nonsecure_call_value_reg_thumb2): New.
* config/arm/unspecs.md (UNSPEC_NONSECURE_MEM): New.

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

* config/arm/cmse_nonsecure_call.S: New.
* config/arm/t-arm: Compile cmse_nonsecure_call.S

    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: Run tests in mainline dir.
* gcc.target/arm/cmse/cmse-9.c: Added some extra tests.
* gcc.target/arm/cmse/cmse-14.c: New.
* gcc.target/arm/cmse/baseline/bitfield-4.c: New.
* gcc.target/arm/cmse/baseline/bitfield-5.c: New.
* gcc.target/arm/cmse/baseline/bitfield-6.c: New.
* gcc.target/arm/cmse/baseline/bitfield-7.c: New.
* gcc.target/arm/cmse/baseline/bitfield-8.c: New.
* gcc.target/arm/cmse/baseline/bitfield-9.c: New.
* gcc.target/arm/cmse/baseline/bitfield-and-union-1.c: New.
* gcc.target/arm/cmse/baseline/cmse-11.c: New.
* gcc.target/arm/cmse/baseline/cmse-13.c: New.
* gcc.target/arm/cmse/baseline/cmse-6.c: New.
* gcc.target/arm/cmse/baseline/union-1.c: New.
* gcc.target/arm/cmse/baseline/union-2.c: New.
* gcc.target/arm/cmse/mainline/bitfield-4.c: New.
* gcc.target/arm/cmse/mainline/bitfield-5.c: New.
* gcc.target/arm/cmse/mainline/bitfield-6.c: New.
* gcc.target/arm/cmse/mainline/bitfield-7.c: New.
* gcc.target/arm/cmse/mainline/bitfield-8.c: New.
* gcc.target/arm/cmse/mainline/bitfield-9.c: New.
* gcc.target/arm/cmse/mainline/bitfield-and-union-1.c: New.
* gcc.target/arm/cmse/mainline/union-1.c: New.
* gcc.target/arm/cmse/mainline/union-2.c: New.
* gcc.target/arm/cmse/mainline/hard-sp/cmse-13.c: New.
* gcc.target/arm/cmse/mainline/hard-sp/cmse-7.c: New.
* gcc.target/arm/cmse/mainline/hard-sp/cmse-8.c: New.
* gcc.target/arm/cmse/mainline/hard/cmse-13.c: New.
* gcc.target/arm/cmse/mainline/hard/cmse-7.c: New.
* gcc.target/arm/cmse/mainline/hard/cmse-8.c: New.
* gcc.target/arm/cmse/mainline/soft/cmse-13.c: New.
* gcc.target/arm/cmse/mainline/soft/cmse-7.c: New.
* gcc.target/arm/cmse/mainline/soft/cmse-8.c: New.
* gcc.target/arm/cmse/mainline/softfp-sp/cmse-7.c: New.
* gcc.target/arm/cmse/mainline/softfp-sp/cmse-8.c: New.
* gcc.target/arm/cmse/mainline/softfp/cmse-13.c: New.
* gcc.target/arm/cmse/mainline/softfp/cmse-7.c: New.
* gcc.target/arm/cmse/mainline/softfp/cmse-8.c: New.

Co-Authored-By: Thomas Preud'homme <thomas.preudhomme@arm.com>
From-SVN: r243192
49 files changed:
gcc/ChangeLog
gcc/config/arm/arm-protos.h
gcc/config/arm/arm.c
gcc/config/arm/arm.md
gcc/config/arm/thumb1.md
gcc/config/arm/thumb2.md
gcc/config/arm/unspecs.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/cmse/baseline/bitfield-4.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/baseline/bitfield-5.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/baseline/bitfield-6.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/baseline/bitfield-7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/baseline/bitfield-8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/baseline/bitfield-9.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/baseline/bitfield-and-union-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/baseline/cmse-11.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/baseline/cmse-13.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/baseline/cmse-6.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/baseline/union-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/baseline/union-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/cmse-14.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/cmse-9.c
gcc/testsuite/gcc.target/arm/cmse/cmse.exp
gcc/testsuite/gcc.target/arm/cmse/mainline/bitfield-4.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/mainline/bitfield-5.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/mainline/bitfield-6.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/mainline/bitfield-7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/mainline/bitfield-8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/mainline/bitfield-9.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/mainline/bitfield-and-union-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/mainline/hard-sp/cmse-13.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/mainline/hard-sp/cmse-7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/mainline/hard-sp/cmse-8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/mainline/hard/cmse-13.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/mainline/hard/cmse-7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/mainline/hard/cmse-8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/mainline/soft/cmse-13.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/mainline/soft/cmse-7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/mainline/soft/cmse-8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/mainline/softfp-sp/cmse-7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/mainline/softfp-sp/cmse-8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/mainline/softfp/cmse-13.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/mainline/softfp/cmse-7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/mainline/softfp/cmse-8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/mainline/union-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cmse/mainline/union-2.c [new file with mode: 0644]
libgcc/ChangeLog
libgcc/config/arm/cmse_nonsecure_call.S [new file with mode: 0644]
libgcc/config/arm/t-arm