bug-binutils
[Top][All Lists]
Advanced

[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: Tue, 26 Jan 2016 10:36:01 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=19311

--- Comment #8 from Loria <Loria at phantasia dot org> ---
I found a LLVM Bug, which seems to be at least correlated with the problem I a
encountered:
https://llvm.org/bugs/show_bug.cgi?id=24688
I will do some more checks, if it really is.

since it is unknown how many times this bug hits the compiler generated, I
would actually like to disable that type of optimization instead of changing
the correct code to circumwent such compiler issue :/ you never know where it
hits again :/

If the following change would help (will test):
encode_arm_immediate (unsigned int val)
{
  unsigned int a, i;

  for (i = 0; i < 32; i += 2)
    if ((a = rotate_left (val, i)) <= 0xff)
      return a | (i << 7); /* 12-bit pack: [shift-cnt,const].  */

  return FAIL;
}
changed to:
encode_arm_immediate (unsigned int val)
{
  unsigned int a, i;

  for (i = 0; i < 16; i++)
    if ((a = rotate_left (val, i*2)) <= 0xff)
      return a | (i << 8); /* 12-bit pack: [shift-cnt,const].  */

  return FAIL;
}
or using the inline funktion instead of a macro ...
Will test those.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]