aboutsummaryrefslogtreecommitdiff
path: root/gcc/print-rtl-function.c
diff options
context:
space:
mode:
authorThomas Preud'homme <thomas.preudhomme@arm.com>2016-10-26 16:17:44 +0000
committerThomas Preud'homme <thopre01@gcc.gnu.org>2016-10-26 16:17:44 +0000
commit12286f25cddbf8e8b3a810442ffa4959da315c31 (patch)
treec8632b4205444925ba31c7042892f0ca848154a8 /gcc/print-rtl-function.c
parent4f4bf94e9c3c8b11607234439a72347729717ae6 (diff)
downloadgcc-12286f25cddbf8e8b3a810442ffa4959da315c31.zip
gcc-12286f25cddbf8e8b3a810442ffa4959da315c31.tar.gz
gcc-12286f25cddbf8e8b3a810442ffa4959da315c31.tar.bz2
Refactor atomic compare_and_swap to make it fit for ARMv8-M Baseline
2016-10-26 Thomas Preud'homme <thomas.preudhomme@arm.com> gcc/ * config/arm/arm.c (arm_expand_compare_and_swap): Add new bdst local variable. Add the new parameter to the insn generator. Set that parameter to be CC flag for 32-bit targets, bval otherwise. Set the return value from the negation of that parameter for Thumb-1, keeping the logic unchanged otherwise except for using bdst as the destination register of the compare_and_swap insn. (arm_split_compare_and_swap): Add explanation about how is the value returned to the function comment. Rename scratch variable to neg_bval. Adapt initialization of variables holding operands to the new operand numbers. Use return register to hold result of store exclusive for Thumb-1, scratch register otherwise. Construct the appropriate cbranch for Thumb-1 targets, keeping the logic unchanged for 32-bit targets. Guard Z flag setting to restrict to 32bit targets. Use gen_cbranchsi4 rather than hand-written conditional branch to loop for strongly ordered compare_and_swap. * config/arm/predicates.md (cc_register_operand): New predicate. * config/arm/sync.md (atomic_compare_and_swap<mode>_1): Use a match_operand with the new predicate to accept either the CC flag or a destination register for the boolean return value, restricting it to CC flag only via constraint. Adapt operand numbers accordingly. From-SVN: r241577
Diffstat (limited to 'gcc/print-rtl-function.c')
0 files changed, 0 insertions, 0 deletions