[PATCH] Fix undefined behavior breaking clang-compiled as

Joerg Sonnenberger joerg@britannica.bec.de
Wed Nov 19 23:11:00 GMT 2014


Hi all,
can someone please commit one of the attached patchies. The macro
currently triggers undefined behavior for n == 0, since the right shift
by 32 is not defined. Clang does effectively remove the first iteration
based on that and as a result, "cmp r0, #99" fails to assemble.

Regards,
Joerg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tc-arm.c.diff
Type: text/x-diff
Size: 681 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20141119/2850629e/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tc-arm.c-2.diff
Type: text/x-diff
Size: 682 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20141119/2850629e/attachment-0001.bin>


More information about the Binutils mailing list