From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20349 invoked by alias); 15 Aug 2004 11:00:55 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 20332 invoked by uid 48); 15 Aug 2004 11:00:54 -0000 Date: Sun, 15 Aug 2004 11:00:00 -0000 Message-ID: <20040815110054.20331.qmail@sourceware.org> From: "pluto at pld-linux dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20030616070732.11203.spigel@olvs.miee.ru> References: <20030616070732.11203.spigel@olvs.miee.ru> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug inline-asm/11203] source doesn't compile with -O0 but they compile with -O3 X-Bugzilla-Reason: CC X-SW-Source: 2004-08/txt/msg01440.txt.bz2 List-Id: ------- Additional Comments From pluto at pld-linux dot org 2004-08-15 11:00 ------- confirmed with 3.4.2-20040806 (-O0 works, -O[123] fails). ps). building qemu-0.5.5 also fails. pentium3-pld-linux-gcc -O2 -march=pentium3 --save-temps -fomit-frame-pointer -mpreferred-stack-boundary=2 -falign-functions=0 -fno-reorder-blocks -fno-optimize-sibling-calls -I. -I/home/users/pluto/rpm/BUILD/qemu-0.5.5/target-i386 -I/home/users/pluto/rpm/BUILD/qemu-0.5.5 -D_GNU_SOURCE -c -o op.o /home/users/pluto/rpm/BUILD/qemu-0.5.5/target-i386/op.c /home/users/pluto/rpm/BUILD/qemu-0.5.5/target-i386/ops_template_mem.h: In function `op_rolb_kernel_T0_T1_cc': /home/users/pluto/rpm/BUILD/qemu-0.5.5/softmmu_header.h:179: error: can't find a register in class `GENERAL_REGS' while reloading `asm' static inline void glue(glue(st, SUFFIX), MEMSUFFIX)(void *ptr, RES_TYPE v) { asm volatile ("movl %0, %%edx\n" / * line 179 */ "movl %0, %%eax\n" "shrl %3, %%edx\n" "andl %4, %%eax\n" "andl %2, %%edx\n" "leal %5(%%edx, %%ebp), %%edx\n" "cmpl (%%edx), %%eax\n" "movl %0, %%eax\n" "je 1f\n" #if DATA_SIZE == 1 "movzbl %b1, %%edx\n" #elif DATA_SIZE == 2 "movzwl %w1, %%edx\n" #elif DATA_SIZE == 4 "movl %1, %%edx\n" #else #error unsupported size #endif "pushl %6\n" "call %7\n" "popl %%eax\n" "jmp 2f\n" "1:\n" "addl 4(%%edx), %%eax\n" #if DATA_SIZE == 1 "movb %b1, (%%eax)\n" #elif DATA_SIZE == 2 "movw %w1, (%%eax)\n" #elif DATA_SIZE == 4 "movl %1, (%%eax)\n" #else #error unsupported size #endif "2:\n" : : "r" (ptr), /* NOTE: 'q' would be needed as constraint, but we could not use it with T1 ! */ "r" (v), "i" ((CPU_TLB_SIZE - 1) << 3), "i" (TARGET_PAGE_BITS - 3), "i" (TARGET_PAGE_MASK | (DATA_SIZE - 1)), "m" (*(uint32_t *)offsetof(CPUState, tlb_write[CPU_MEM_INDEX][0].address)), "i" (CPU_MEM_INDEX), "m" (*(uint8_t *)&glue(glue(__st, SUFFIX), MMUSUFFIX)) : "%eax", "%ecx", "%edx", "memory", "cc"); } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11203