Summary: | media-libs/libvisual-0.2.0 Assembler message: {standard input}:288: Error: suffix or operands invalid for `movd', fails due to -funroll-loops | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Hans-Christian Armingeon <mog.johnny> |
Component: | [OLD] KDE | Assignee: | Gentoo Sound Team <sound> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | eldad, kde, nbkolchin |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 90360 | ||
Attachments: |
patch to fix assembler issues
updated ebuild |
Description
Hans-Christian Armingeon
2005-03-27 05:23:19 UTC
I get the same error, only on line 295. Does it happen with basic CFLAGS/CXXFLAGS? How "unbasic" are my cflags? CFLAGS="-m32 -O2" emerge libvisual worked for me. So, you are saying that it fails when you add some specific CFLAGS, is this correct? (BTW: why using -m32?) C(XX)FLAGS=-O0 MAKEOPTS=-j1 works for me libvisual belongs to sound@, doesn't it? Created attachment 58435 [details, diff]
patch to fix assembler issues
Created attachment 58436 [details]
updated ebuild
Thanks, did you submit the patch to the author? I don't know much about assembler, can someone explain in which situations this bug is triggered? 1. No, I didn't submit patch to author. 2. Problem description: GCC 3.4.x treats assembler blocks a bit different from previous versions. I.e. for "g" it generates most optimal possible code (constant in our case). But SSE "mov" doesn't support constants as arguments, so assembler generates an error. Replacing "g", with "m" tells GCC to always treat variable as "memory" operand. This is the same as bug 86321. Maybe we can just filter the -funroll-loops c-flags? Nickolay, I haven't tested your patch but this issue exists on gcc 3.3 as well, and disappears when -funroll-loops is taken out BUT -msse is still used. *** Bug 86321 has been marked as a duplicate of this bug. *** 1. Filtering GCC optimization flags is a poor solution to problem. I.e. if GCC with particular flags generate wrong code, this is a serious issue and must be tracked to GCC team. However, in this application we have a clear source code bug. 2. Look in the sources. Generate assembler (without my patch), contains this command "movd $1000, %m4". (replace $1000, with any constant number you like). "movd" can't have constant arguments. This is generate from this source line: "#1\n\t movd %[fracu], %%mm4" And "fracu" is incorrectly specified as "g" argument. From "GNU Assembler manual": `g' Any register, memory or immediate integer operand is allowed, except for registers that are not general registers. So, we must replace "g" declaration with "m", which guarantees that %[fracu] will be replaced with memory argument. 3. Why removing -funroll-loops help in our case. -funroll-loops changes code scheduling and make %[fracu] substitution with constant possible. 4. We have working patch. What you are afraid of? I just have this habit to make sure I understand something before I do it... Anyway, you are correct and I've committed it to CVS. Thanks alot! Nickolay, care to report this upstream? reported. |