]> git.lizzy.rs Git - rust.git/commit
Fix removal of function attributes on ARM
authorBjörn Steinbrink <bsteinbr@gmail.com>
Sat, 26 Mar 2016 11:27:33 +0000 (12:27 +0100)
committerBjörn Steinbrink <bsteinbr@gmail.com>
Sat, 26 Mar 2016 12:02:54 +0000 (13:02 +0100)
commit95697a83955c03d42eaaac6ecedcae04bd6986c9
treebf75c17b3c8323e9e9c927a79c7463d4486f2246
parentd322f990b04e3b598afd6a47c09a0277f73031aa
Fix removal of function attributes on ARM

We use a 64bit integer to pass the set of attributes that is to be
removed, but the called C function expects a 32bit integer. On most
platforms this doesn't cause any problems other than being unable to
unset some attributes, but on  ARM even the lower 32bit aren't handled
correctly because the 64bit value is passed in different registers, so
the C function actually sees random garbage.

So we need to fix the relevant functions to use 32bit integers instead.
Additionally we need an implementation that actually accepts 64bit
integers because some attributes can only be unset that way.

Fixes #32360
src/librustc_llvm/lib.rs
src/librustc_trans/trans/attributes.rs
src/rustllvm/RustWrapper.cpp