aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorThomas Preud'homme <thomas.preudhomme@arm.com>2017-11-22 15:58:22 +0000
committerThomas Preud'homme <thopre01@gcc.gnu.org>2017-11-22 15:58:22 +0000
commitfc7160b2c718d7974aee97ca9b8448ec760bbfb7 (patch)
tree518896eb9721f8ef7c85871655e1ed784b2ae673 /gcc/tree.c
parent9388732aa53da50828a37884c88adae7fd313839 (diff)
downloadgcc-fc7160b2c718d7974aee97ca9b8448ec760bbfb7.zip
gcc-fc7160b2c718d7974aee97ca9b8448ec760bbfb7.tar.gz
gcc-fc7160b2c718d7974aee97ca9b8448ec760bbfb7.tar.bz2
[ARM] Factor out CMSE register clearing code
Functions cmse_nonsecure_call_clear_caller_saved and cmse_nonsecure_entry_clear_before_return both contain very similar code to clear registers. What's worse, they differ slightly at times so if a bug is found in one careful thoughts is needed to decide whether the other function needs fixing too. This commit addresses the situation by factoring the two pieces of code into a new function. In doing so the code generated to clear VFP registers in cmse_nonsecure_call now uses the same sequence as cmse_nonsecure_entry functions. Tests expectation are thus updated accordingly. 2017-11-22 Thomas Preud'homme <thomas.preudhomme@arm.com> gcc/ * config/arm/arm.c (cmse_clear_registers): New function. (cmse_nonsecure_call_clear_caller_saved): Replace register clearing code by call to cmse_clear_registers. (cmse_nonsecure_entry_clear_before_return): Likewise. gcc/testsuite/ * gcc.target/arm/cmse/mainline/hard-sp/cmse-13.c: Adapt expectations to vmov instructions now generated. * gcc.target/arm/cmse/mainline/hard-sp/cmse-7.c: Likewise. * gcc.target/arm/cmse/mainline/hard-sp/cmse-8.c: Likewise. * gcc.target/arm/cmse/mainline/hard/cmse-13.c: Likewise. * gcc.target/arm/cmse/mainline/hard/cmse-7.c: Likewise. * gcc.target/arm/cmse/mainline/hard/cmse-8.c: Likewise. From-SVN: r255065
Diffstat (limited to 'gcc/tree.c')
0 files changed, 0 insertions, 0 deletions