[ARM] Fix ICE in Armv8-M Security Extensions code
commit38736c876da1ae926d075ae7e8f92fdacb4124b2
authorthopre01 <thopre01@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 17 Nov 2017 10:00:02 +0000 (17 10:00 +0000)
committerthopre01 <thopre01@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 17 Nov 2017 10:00:02 +0000 (17 10:00 +0000)
treee09a7ff3e3688b706f87812fb51675f076f89a93
parentd42a4959c1c58e4c456e0a3bd5d12945a91bc22a
[ARM] Fix ICE in Armv8-M Security Extensions code

Commit r253825 which introduced some sanity checks for sbitmap revealed
a bug in the conversion of cmse_nonsecure_entry_clear_before_return ()
to using bitmap structure. bitmap_and expects that the two bitmaps have
the same length, yet the code in
cmse_nonsecure_entry_clear_before_return () have different size for
to_clear_bitmap and to_clear_arg_regs_bitmap, with the assumption that
bitmap_and would behave has if the bits not allocated were in fact zero.
This commit makes sure both bitmap are equally sized.

2017-11-17  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/
    * config/arm/arm.c (cmse_nonsecure_entry_clear_before_return): Allocate
    to_clear_arg_regs_bitmap to the same size as to_clear_bitmap.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@254859 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/arm/arm.c