Skip to contentSkip to conversation

Can't compile on whacky 2.6/2.4 hybrid

Qemu-devel David Barrett 2 participants 3 messages Mar 17, 2008 – Mar 21, 2008

lore
Share & tools
lore
#0 lore raw

To be clear, I'm not at all surprised this doesn't compile on my server.
I have a custom 2.6 kernel injected into a 2.4 distribution running a
bunch of ancient libraries and -- *gasp* -- I'm having trouble compiling. (As you might guess, this isn't by choice.) I don't honestly expect to get this to work, but on the off chance that it's obvious to somebody, can you suggest any way to get past this compile error?

In file included from /tmp/qemu-0.9.1/target-i386/op.c:2499:
/tmp/qemu-0.9.1/target-i386/ops_sse.h: In function `op_shufps':
/tmp/qemu-0.9.1/target-i386/ops_sse.h:607: Unable to find a register to spill in class `SIREG'. /tmp/qemu-0.9.1/target-i386/ops_sse.h:607: This is the insn:
(insn 72 71 73 (parallel[

            (set (reg:SI 2 ecx [66])
                (const_int 0 [0x0]))
            (set (reg/f:SI 64)
                (plus:SI (ashift:SI (reg:SI 2 ecx [66])
                        (const_int 2 [0x2]))
                    (reg/v/f:SI 42)))
            (set (reg/f:SI 0 eax [65])
                (plus:SI (ashift:SI (reg:SI 2 ecx [66])
                        (const_int 2 [0x2]))
                    (reg/f:SI 0 eax [65])))
            (set (mem/s:BLK (reg/v/f:SI 42) 0)
                (mem/s:BLK (reg/f:SI 0 eax [65]) 0))
            (use (reg:SI 2 ecx [66]))
            (use (reg:SI 19 dirflag))
        ] ) 394 {rep_movsi} (insn_list 68 (insn_list 69 (insn_list 71 
(nil))))
    (expr_list:REG_DEAD (reg:SI 19 dirflag)
        (expr_list:REG_DEAD (reg/v/f:SI 42)
            (expr_list:REG_UNUSED (reg:SI 2 ecx [66])
                (expr_list:REG_UNUSED (reg/f:SI 64)
                    (expr_list:REG_UNUSED (reg/f:SI 0 eax [65])
                        (nil)))))))

/tmp/qemu-0.9.1/target-i386/ops_sse.h:607: confused by earlier errors, bailing out

I configured it with:

	./configure --disable-sdl --disable-gfx-check

Here's my GCC configuration:

Reading specs from /usr/lib/gcc-lib/i386-linux/3.0.4/specs
Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,proto,objc --prefix=/usr --infodir=/share/info --mandir=/share/man --enable-shared --with-gnu-as --with-gnu-ld --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --disable-checking --enable-threads=posix --enable-java-gc=boehm --with-cpp-install-dir=bin --enable-objc-gc i386-linux Thread model: posix
gcc version 3.0.4

Thanks for any suggestions you have!

-david

#1 lore raw
Quoted 6 lines · David Barrett

To be clear, I'm not at all surprised this doesn't compile on my server.
I have a custom 2.6 kernel injected into a 2.4 distribution running a
bunch of ancient libraries and -- *gasp* -- I'm having trouble compiling. (As you might guess, this isn't by choice.) I don't honestly expect to get this to work, but on the off chance that it's obvious to somebody, can you suggest any way to get past this compile error?

Could you test the attached patch? It's not a real fix, but I'm trying to find the range of instructions that need to be converted to TCG. If the compile fails, please report the error message.

target-i386/op.c +2 -0
Index: qemu/target-i386/op.c
===================================================================
@@ -2222,11 +2222,13 @@
     *(uint32_t *)(env->fptags + 4) = 0x01010101;
 }
 
+#if 0
 #define SHIFT 0
 #include "ops_sse.h"
 
 #define SHIFT 1
 #include "ops_sse.h"
+#endif
 
 /* Secure Virtual Machine ops */
 
target-i386/translate.c +6 -1
Index: qemu/target-i386/translate.c
===================================================================
@@ -2407,6 +2407,7 @@
 #endif
 };
 
+#if 0
 #define SSE_SPECIAL ((GenOpFunc2 *)1)
 
 #define MMX_OP2(x) { gen_op_ ## x ## _mmx, gen_op_ ## x ## _xmm }
@@ -3174,7 +3175,7 @@
         }
     }
 }
-
+#endif
 
 /* convert one instruction. s->is_jmp is set if the translation must
    be stopped. Return the next pc value */
@@ -6252,7 +6253,9 @@
     case 0x1c2:
     case 0x1c4 ... 0x1c6:
     case 0x1d0 ... 0x1fe:
+#if 0
         gen_sse(s, b, pc_start, rex_r);
+#endif
         break;
     default:
         goto illegal_op;
@@ -6427,11 +6430,13 @@
     [INDEX_op_imull_T0_T1] = CC_OSZAPC,
     X86_64_DEF([INDEX_op_imulq_T0_T1] = CC_OSZAPC,)
 
+#if 0
     /* sse */
     [INDEX_op_ucomiss] = CC_OSZAPC,
     [INDEX_op_ucomisd] = CC_OSZAPC,
     [INDEX_op_comiss] = CC_OSZAPC,
     [INDEX_op_comisd] = CC_OSZAPC,
+#endif
 
     /* bcd */
     [INDEX_op_aam] = CC_OSZAPC,
#2 lore raw
Quoted 11 lines · Blue Swirl
Quoted 6 lines · David Barrett

To be clear, I'm not at all surprised this doesn't compile on my server.
I have a custom 2.6 kernel injected into a 2.4 distribution running a
bunch of ancient libraries and -- *gasp* -- I'm having trouble compiling. (As you might guess, this isn't by choice.) I don't honestly expect to get this to work, but on the off chance that it's obvious to somebody, can you suggest any way to get past this compile error?

Could you test the attached patch? It's not a real fix, but I'm trying to find the range of instructions that need to be converted to TCG. If the compile fails, please report the error message.

Well, it gets a lot further now, and compilation stops here:

In file included from /tmp/qemu-0.9.1/target-sparc/op.c:123:
/tmp/qemu-0.9.1/target-sparc/fop_template.h: In function `op_load_fpr_QT0_fprf0':
/tmp/qemu-0.9.1/target-sparc/fop_template.h:91: Unable to find a register to spill in class `SIREG'. /tmp/qemu-0.9.1/target-sparc/fop_template.h:91: This is the insn:
(insn 35 34 36 (parallel[

            (set (reg:SI 2 ecx [49])
                (const_int 0 [0x0]))
            (set (reg/f:SI 1 edx [47])
                (plus:SI (ashift:SI (reg:SI 2 ecx [49])
                        (const_int 2 [0x2]))
                    (reg/f:SI 1 edx [47])))
            (set (reg/f:SI 0 eax [48])
                (plus:SI (ashift:SI (reg:SI 2 ecx [49])
                        (const_int 2 [0x2]))
                    (reg/f:SI 0 eax [48])))
            (set (mem/s:BLK (reg/f:SI 1 edx [47]) 0)
                (mem/s:BLK (reg/f:SI 0 eax [48]) 0))
            (use (reg:SI 2 ecx [49]))
            (use (reg:SI 19 dirflag))
        ] ) 394 {rep_movsi} (insn_list 29 (insn_list 31 (insn_list 32 
(insn_list 34 (nil)))))
    (expr_list:REG_DEAD (reg:SI 19 dirflag)
        (expr_list:REG_UNUSED (reg:SI 2 ecx [49])
            (expr_list:REG_UNUSED (reg/f:SI 1 edx [47])
                (expr_list:REG_UNUSED (reg/f:SI 0 eax [48])
                    (nil))))))

/tmp/qemu-0.9.1/target-sparc/fop_template.h:91: confused by earlier errors, bailing out

-david