[Bug inline-asm/10396] Constraint alternatives cause error " `asm' operand requires impossible reload"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10396 Bernd Edlinger changed: What|Removed |Added CC||bernd.edlinger at hotmail dot de --- Comment #23 from Bernd Edlinger --- (In reply to David from comment #22) > Despite the impression you may get from comments 17-21, gcc DOES support > multi-alternatives with inline asm (see > https://gcc.gnu.org/ml/gcc/2015-10/msg00249.html). > > I do not have an arm build with which to test, but using 5.2 on x64, the > samples in this bug do not produce errors. Perhaps in the 7-12 years since > they were added, something got fixed? Or maybe this problem is > platform-specific. you can build a cross-compiler out of nothing, if you want. cd binutils-build-arm ../binutils-2.25.1/configure --prefix=../arm-eabi --target=arm-unknown-eabi make && make install cd ../gcc-build-arm ../gcc-trunk/configure --prefix=/home/ed/gnu/arm-eabi --target=arm-unknown-eabi --enable-languages=c --disable-libssp make && make install
[Bug inline-asm/10396] Constraint alternatives cause error " `asm' operand requires impossible reload"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10396 David changed: What|Removed |Added CC||gccbugzilla@limegreensocks. ||com --- Comment #22 from David --- Despite the impression you may get from comments 17-21, gcc DOES support multi-alternatives with inline asm (see https://gcc.gnu.org/ml/gcc/2015-10/msg00249.html). I do not have an arm build with which to test, but using 5.2 on x64, the samples in this bug do not produce errors. Perhaps in the 7-12 years since they were added, something got fixed? Or maybe this problem is platform-specific.
[Bug inline-asm/10396] Constraint alternatives cause error `asm' operand requires impossible reload
--- Comment #18 from someone42 at gmail dot com 2008-12-31 16:05 --- I was going to submit a new bug report but this bug sounds very similar. Here is my test case: Code (actual assembly code removed for brevity): int thing(unsigned int a,unsigned int b) { asm(:=mr,r(b):%0,0(a / 3),ri,g(b)); return b; } Result: $ gcc aorir.c -S -O1 aorir.c: In function 'thing': aorir.c:3: error: 'asm' operand requires impossible reload This was tested with GCC 4.3.2 and only occurs if -O, -O1, -O2, -O3 or -Os is used. Like the opening poster, this only occurs if multiple alternatives are specified. Removing one of the alternatives makes the issue disappear (it does not matter which one is removed). Replacing a / 3 with a + 3 also makes the issue disappear, regardless of the number of alternatives specified. Removing % from the first input constraint results in: $ gcc aorir.c -S -O1 aorir.c: In function 'thing': aorir.c:5: internal compiler error: in reg_overlap_mentioned_p, at rtlanal.c:1398 Please submit a full bug report, with preprocessed source if appropriate. See http://gcc.gnu.org/bugs.html for instructions. Changing %0,0 to %r,r also makes the issue go away, however that is not an option for the assembly code I'm using. -- someone42 at gmail dot com changed: What|Removed |Added CC||someone42 at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10396
[Bug inline-asm/10396] Constraint alternatives cause error `asm' operand requires impossible reload
--- Comment #19 from pinskia at gcc dot gnu dot org 2008-12-31 16:09 --- Note commas in inline-asm are ignored. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10396
[Bug inline-asm/10396] Constraint alternatives cause error `asm' operand requires impossible reload
--- Comment #20 from someone42 at gmail dot com 2008-12-31 16:29 --- (In reply to comment #19) Note commas in inline-asm are ignored. Perhaps this bug could then be fixed by simply removing or appropriately modifying section 5.38.2 (Multiple Alternative Constraints) of the GCC manual. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10396
[Bug inline-asm/10396] Constraint alternatives cause error `asm' operand requires impossible reload
--- Comment #21 from pinskia at gcc dot gnu dot org 2008-12-31 16:36 --- (In reply to comment #20) Perhaps this bug could then be fixed by simply removing or appropriately modifying section 5.38.2 (Multiple Alternative Constraints) of the GCC manual. Part of the problem is that section is part of the internals manual also and alternative constraints works correctly for RTL, just not inline-asm. For some reason I thought it was already patched to say the correct thing. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10396