Launchpad has imported 5 comments from the remote bug at
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49335.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2011-06-08T22:25:27+00:00 Michael Hope wrote:

Created attachment 24468
Reduced test case

The attached testcase is derived from codeblocks 10.05 and fails to
build on ARM due to generating invalid assembler.

To reproduce:

michaelh@ursa2:~/linaro/bugs$ ~/linaro/toolchains/gcc-4.7~svn174795
-armv7l-maverick-cbuild127-ursa3-cortexa9r1/bin/g++ -c -O2 -save-temps
lp791327.cpp

lp791327.s: Assembler messages:
lp791327.s:76: Error: r13 not allowed here -- `rsb r0,sp,r0,lsl#2'

The fault occurs in 4.6.0 and current trunk.  It does not occur in
4.5.3.

Originally reported at
https://bugs.launchpad.net/ubuntu/+source/codeblocks/+bug/791327

Reply at: https://bugs.launchpad.net/gcc/+bug/791327/comments/3

------------------------------------------------------------------------
On 2011-06-08T22:33:32+00:00 Michael Hope wrote:

Forgot the configuration:

Configured with: '../../gcc-4.7~/configure' 
--prefix='/scratch/cbuild/slave/slaves/ursa3/gcc-4.7~svn174795/gcc/default/install'
 --enable-languages=c,c++,objc,obj-c++,fortran,lto --with-mode=thumb 
--with-arch=armv7-a --with-tune=cortex-a9 --with-float=softfp --with-fpu=neon
Thread model: posix
gcc version 4.7.0 20110608 (experimental) [trunk revision 174795] (GCC) 

michaelh@ursa2:~/linaro/bugs$ as -v
GNU assembler version 2.20.51 (arm-linux-gnueabi) using BFD version (GNU 
Binutils for Ubuntu) 2.20.51-system.20100908

michaelh@ursa2:~/linaro/bugs$ uname -a
Linux ursa2 2.6.35.3-cbuild2+ #8 SMP Mon Apr 4 12:46:46 NZST 2011 armv7l 
GNU/Linux

michaelh@ursa2:~/linaro/bugs$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 10.10
Release:        10.10
Codename:       maverick

The fault also occurs at -O1 and -O3 but not at -O0.

The assembly in the region is:

.L33:
        movs    r1, #0
        movs    r2, #64
        mov     r0, sp
        mov     r9, sp
        bl      memset
        cmp     r4, #4
        beq     .L11
        add     r0, r8, r4, lsl #2
        rsb     r6, r8, #4
        lsls    r6, r6, #2
        rsb     r1, r4, #4
        rsb     r0, sp, r0, lsl #2
        mov     r4, sp
        mov     lr, #0

which matches the final lines of the function.  It looks like the code
should be using r9 instead of sp.

Reply at: https://bugs.launchpad.net/gcc/+bug/791327/comments/4

------------------------------------------------------------------------
On 2011-06-09T10:23:41+00:00 Ramana-gcc wrote:

The problem is that *arith_shiftsi allows *all* shiftable operators to
have the stack pointer as Rn .

In Thumb2 only the add and sub instructions are allowed to have the
stack pointer in this form and all other instructions are UNPREDICTABLE.
This has come as a result of merging the 2 patterns from ARM and Thumb2
into a single pattern and considering the same for both.

Affects only 4.6 branch and FSF trunk.

cheers
Ramana

Reply at: https://bugs.launchpad.net/gcc/+bug/791327/comments/7

------------------------------------------------------------------------
On 2011-06-09T10:25:15+00:00 Ramana-gcc wrote:

(In reply to comment #2)
> The problem is that *arith_shiftsi allows *all* shiftable operators to have 
> the
> stack pointer as Rn . 
> 
> In Thumb2 only the add and sub instructions are allowed to have the stack
> pointer in this form and all other instructions are UNPREDICTABLE. 

This is for operations of the form :

<operation> rd, rn, rm lsl 2

cheers
Ramana

Reply at: https://bugs.launchpad.net/gcc/+bug/791327/comments/8

------------------------------------------------------------------------
On 2011-06-16T01:31:43+00:00 Michael Hope wrote:

Also affects gimp.  See LP: #791279.

Doesn't appear in trunk r172224 but does in r174795.

Reply at: https://bugs.launchpad.net/gcc/+bug/791327/comments/9


** Changed in: gcc
       Status: Unknown => Confirmed

** Changed in: gcc
   Importance: Unknown => Medium

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/791327

Title:
  codeblocks version 10.05-2 failed to build on armel

To manage notifications about this bug go to:
https://bugs.launchpad.net/gcc/+bug/791327/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to