ARM: Fix register misuse bug in Allocate().
The bug is triggered if flags contains DOUBLE_ALIGNMENT and the object_size is not an ARM immediate value. In this case, the code for DOUBLE_ALIGNMENT uses the scratch2 register, which is aliased to obj_size_reg containing the object_size. Instead of pre-loading the object_size, which is difficult since we are out of registers here, we simply generate a non-empty sequence of add instructions for the addition of the constant object_size (carefully handling possible overflow in each step). Also turn static ASSERT into STATIC_ASSERT in Allocate(). BUG=v8:2851 R=svenpanne@chromium.org Review URL: https://codereview.chromium.org/23323002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16221 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Showing
Please
register
or
sign in
to comment