aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/interface.c
diff options
context:
space:
mode:
authorThomas Preud'homme <thomas.preudhomme@arm.com>2017-11-09 16:34:43 +0000
committerThomas Preud'homme <thopre01@gcc.gnu.org>2017-11-09 16:34:43 +0000
commit9f28fe39be68ca484d025ff49f783f050a0a2360 (patch)
treeb73603173913a3bac468233bff4b41854e42eebe /gcc/fortran/interface.c
parent9222c9e36869c345790b2b654e8cba059ec50b14 (diff)
downloadgcc-9f28fe39be68ca484d025ff49f783f050a0a2360.zip
gcc-9f28fe39be68ca484d025ff49f783f050a0a2360.tar.gz
gcc-9f28fe39be68ca484d025ff49f783f050a0a2360.tar.bz2
[ARM] Fix cmse_nonsecure_entry return insn size
A number of instructions are output in assembler form by output_return_instruction () when compiling a function with the cmse_nonsecure_entry attribute for Armv8-M Mainline with hardfloat float ABI. However, the corresponding thumb2_cmse_entry_return insn pattern does not account for all these instructions in its computing of the length of the instruction. This may lead GCC to use the wrong branching instruction due to incorrect computation of the offset between the branch instruction's address and the target address. This commit fixes the mismatch between what output_return_instruction () does and what the pattern think it does and adds a note warning about mismatch in the affected functions' heading comments to ensure code does not get out of sync again. Note: no test is provided because the C testcase is fragile (only works on GCC 6) and the extracted RTL test fails to compile due to bugs in the RTL frontend (PR82815 and PR82817) 2017-11-09 Thomas Preud'homme <thomas.preudhomme@arm.com> gcc/ * config/arm/arm.c (output_return_instruction): Add comments to indicate requirement for cmse_nonsecure_entry return to account for the size of clearing instruction output here. (thumb_exit): Likewise. * config/arm/thumb2.md (thumb2_cmse_entry_return): Fix length for return in hardfloat mode. From-SVN: r254601
Diffstat (limited to 'gcc/fortran/interface.c')
0 files changed, 0 insertions, 0 deletions