[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/19311] arm-linux-as build on Mac OS X with Xcode7 fails to
From: |
Loria at phantasia dot org |
Subject: |
[Bug binutils/19311] arm-linux-as build on Mac OS X with Xcode7 fails to assemble code from FreePascal cross-compiler |
Date: |
Thu, 28 Jan 2016 08:33:35 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=19311
--- Comment #14 from Loria <Loria at phantasia dot org> ---
I did some further investigateion about the issue of the shiftoperator. It is
no violation on the syntaxlevel of C & C++ for (uint32 VAL; uint32 X = VAL >>
32;), the behaviour of the shiftoperation >= bitsize of the value is
undefinied.
At least Microsoft does state it in their documentation
https://msdn.microsoft.com/en-us/library/336xbhcz.aspx#Anchor_5
There are more places, which state the same.
So it seems the use of ">>32" confuses clangs optimizer.
But I now think the behaviour of the current version of
encode_arm_immediate to be undefined and should be fixed.
I sugest the code to be changed to:
<--
unsigned int
encode_arm_immediate (unsigned int val)
{
unsigned int a, i;
if(val <= 0xFF)
return val;
for (i = 2; i < 32 ; i += 2)
if((a = rotate_left (val, i)) <= 0xFF)
return a | (i << 7) ; /* 12-bit pack: [shift-cnt,const]. */
return FAIL;
}
<--
shall I produce an patchfile ?
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/19311] arm-linux-as build on Mac OS X with Xcode7 fails to assemble code from FreePascal cross-compiler, (continued)
- [Bug binutils/19311] arm-linux-as build on Mac OS X with Xcode7 fails to assemble code from FreePascal cross-compiler, Loria at phantasia dot org, 2016/01/24
- [Bug binutils/19311] arm-linux-as build on Mac OS X with Xcode7 fails to assemble code from FreePascal cross-compiler, nickc at redhat dot com, 2016/01/25
- [Bug binutils/19311] arm-linux-as build on Mac OS X with Xcode7 fails to assemble code from FreePascal cross-compiler, Loria at phantasia dot org, 2016/01/25
- [Bug binutils/19311] arm-linux-as build on Mac OS X with Xcode7 fails to assemble code from FreePascal cross-compiler, nickc at redhat dot com, 2016/01/26
- [Bug binutils/19311] arm-linux-as build on Mac OS X with Xcode7 fails to assemble code from FreePascal cross-compiler, Loria at phantasia dot org, 2016/01/26
- [Bug binutils/19311] arm-linux-as build on Mac OS X with Xcode7 fails to assemble code from FreePascal cross-compiler, Loria at phantasia dot org, 2016/01/26
- [Bug binutils/19311] arm-linux-as build on Mac OS X with Xcode7 fails to assemble code from FreePascal cross-compiler, nickc at redhat dot com, 2016/01/27
- [Bug binutils/19311] arm-linux-as build on Mac OS X with Xcode7 fails to assemble code from FreePascal cross-compiler, Loria at phantasia dot org, 2016/01/27
- [Bug binutils/19311] arm-linux-as build on Mac OS X with Xcode7 fails to assemble code from FreePascal cross-compiler, Loria at phantasia dot org, 2016/01/27
- [Bug binutils/19311] arm-linux-as build on Mac OS X with Xcode7 fails to assemble code from FreePascal cross-compiler, Loria at phantasia dot org, 2016/01/27
- [Bug binutils/19311] arm-linux-as build on Mac OS X with Xcode7 fails to assemble code from FreePascal cross-compiler,
Loria at phantasia dot org <=
- [Bug binutils/19311] arm-linux-as build on Mac OS X with Xcode7 fails to assemble code from FreePascal cross-compiler, Loria at phantasia dot org, 2016/01/28
- [Bug binutils/19311] arm-linux-as build on Mac OS X with Xcode7 fails to assemble code from FreePascal cross-compiler, Loria at phantasia dot org, 2016/01/31