Join Today
+ Reply to Thread
Results 1 to 4 of 4
  1. Default Bug: gcc 3.3.6 w/iwmmxt goes boom

    Probably a lot fo people know this but I was tyring to compile something that broke and I narrowed it down to a few lines of code. I thought I might post it here just incase somebody was savy enough to troubleshoot it. I built this from the ezx-crosstool-0.5 set of patches. Only happens with -O2

    Code:
    $ /opt/ezx-crosstool/bin/arm-linux-gcc -O2 -o boom boom.c
    boom.c: In function `func1':
    boom.c:24: error: unable to find a register to spill in class `LO_REGS'
    boom.c:24: error: this is the insn:
    (insn:HI 73 86 75 3 0x18dd0360 (set (reg/v:DI 5 r5 [57])
            (ashift:DI (reg/v:DI 5 r5 [57])
                (subreg:SI (reg/v:DI 41 wr10 [56]) 0))) 450 {ashldi3_iwmmxt} (insn_list 47 (insn_list 45 (nil)))
        (expr_list:REG_DEAD (reg/v:DI 41 wr10 [56])
            (expr_list:REG_EQUAL (ashift:DI (const_int 1 [0x1])
                    (subreg:SI (reg/v:DI 41 wr10 [56]) 0))
                (nil))))
    boom.c:24: confused by earlier errors, bailing out
    
    $ /opt/ezx-crosstool/bin/arm-linux-gcc --version
    arm-linux-gcc (GCC) 3.3.6
    Attached Files Attached Files
    <pre>dd if=/dev/zero of=/ram/awsomeswap bs=1024 count=16384
    mkswap -v0 /ram/awesomeswap 16384
    sync
    swapon /ram/awesomeswap</pre>

  2. #2

    Default Re: Bug: gcc 3.3.6 w/iwmmxt goes boom

    Do you get the same effect if you drop the -O2? Turning off optimization?

  3. Default Re: Bug: gcc 3.3.6 w/iwmmxt goes boom

    Nope. Only -O2 and -O3. I can do -O1 or -Os and it will compile. I can do any other experiements that you would like, just let me know. I re-built the crosstool without iwmmxt and I'm going to try -O2 and -O3 later on today (I have company over now).

    Daniel
    <pre>dd if=/dev/zero of=/ram/awsomeswap bs=1024 count=16384
    mkswap -v0 /ram/awesomeswap 16384
    sync
    swapon /ram/awesomeswap</pre>

  4. Default Re: Bug: gcc 3.3.6 w/iwmmxt goes boom

    Ok, so it works with -O0, -O1 and -Os, but not -O2 or -O3. Also, it does compile with the same toolchain built without the iwmmxt support.

    Code:
    /c/Projects/a780/software/boom (Daniel@loudmouth)
    $ /opt/ezx-crosstool-0.5-iwmmxt/bin/arm-linux-gcc -O2 -S -c boom.c
    boom.c: In function `func1':
    boom.c:27: error: unable to find a register to spill in class `LO_REGS'
    boom.c:27: error: this is the insn:
    (insn:HI 73 86 75 3 0x18dd0360 (set (reg/v:DI 5 r5 [57])
            (ashift:DI (reg/v:DI 5 r5 [57])
                (subreg:SI (reg/v:DI 41 wr10 [56]) 0))) 450 {ashldi3_iwmmxt} (insn_list 47 (insn_list 45 (nil)))
        (expr_list:REG_DEAD (reg/v:DI 41 wr10 [56])
            (expr_list:REG_EQUAL (ashift:DI (const_int 1 [0x1])
                    (subreg:SI (reg/v:DI 41 wr10 [56]) 0))
                (nil))))
    boom.c:27: confused by earlier errors, bailing out
    /c/Projects/a780/software/boom (Daniel@loudmouth)
    $ /opt/ezx-crosstool-0.5-iwmmxt/bin/arm-linux-gcc -O3 -S -c boom.c
    boom.c: In function `func1':
    boom.c:27: error: unable to find a register to spill in class `LO_REGS'
    boom.c:27: error: this is the insn:
    (insn:HI 73 86 75 3 0x18dd0360 (set (reg/v:DI 5 r5 [57])
            (ashift:DI (reg/v:DI 5 r5 [57])
                (subreg:SI (reg/v:DI 41 wr10 [56]) 0))) 450 {ashldi3_iwmmxt} (insn_list 47 (insn_list 45 (nil)))
        (expr_list:REG_DEAD (reg/v:DI 41 wr10 [56])
            (expr_list:REG_EQUAL (ashift:DI (const_int 1 [0x1])
                    (subreg:SI (reg/v:DI 41 wr10 [56]) 0))
                (nil))))
    boom.c:27: confused by earlier errors, bailing out
    I made minor changes to the boom.c so it would compile without warnings and then I did a -S for both the iwmmxt and non-iwmmxt using all 5 of the above optomization flags.

    I wish I could do more, but I don't know gcc that intimately and I don't know ARM assembly either Let me know if there's anything else I can do. Also, who else do you think might be able to address this type of problem? I'm not actually doing any GUI stuff right now so it shouldn't effect me at the moment.

    Daniel
    Attached Files Attached Files
    <pre>dd if=/dev/zero of=/ram/awsomeswap bs=1024 count=16384
    mkswap -v0 /ram/awesomeswap 16384
    sync
    swapon /ram/awesomeswap</pre>


 
+ Reply to Thread

Similar Threads

  1. Replies: 1
    Last Post: 05-18-2009, 11:01 AM
  2. Afghan tech boom: Mullah embraces iPhone
    By nodramachicks in forum News
    Replies: 0
    Last Post: 03-04-2009, 04:25 AM
  3. gcc for E6
    By nahtollay in forum E6 General Chat
    Replies: 3
    Last Post: 02-01-2008, 03:47 PM
  4. how to compile NATIVE gcc !!!!!!
    By bitfly in forum Development
    Replies: 0
    Last Post: 04-18-2006, 03:43 AM
  5. soft-float support in MontaVista's iwmmxt gcc
    By mack in forum Development
    Replies: 24
    Last Post: 10-07-2005, 06:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Single Sign On provided by vBSSO

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1