This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c/2676: Illegal loop instruction when using -O2 -march=k6
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c/2676: Illegal loop instruction when using -O2 -march=k6
- From: tyrant at galeb dot etf dot bg dot ac dot yu
- Date: 28 Apr 2001 15:57:27 -0000
- Reply-To: tyrant at galeb dot etf dot bg dot ac dot yu
>Number: 2676
>Category: c
>Synopsis: Illegal loop instruction when using -O2 -march=k6
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: wrong-code
>Submitter-Id: net
>Arrival-Date: Sat Apr 28 09:06:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Dragan Milenkovic
>Release: gcc-3.0-20010428
>Organization:
>Environment:
CodeSourcery's Online Test Compilation. (ix86-issue)
>Description:
Compiler generates loop instruction with destination address
that can't fit 1 byte operand. Assembler on CodeSourcery's Online Test Compilation gives error message, but that is the only one I saw that does. I could only reproduce it with
-O2 -march=k6.
>How-To-Repeat:
gcc -O2 -march=k6 -g -c loop-bug.c
objdump -d -S loop-bug.o | less
... then search for 'loop' and see where it jumps.
>Fix:
I guess it should be easy to fix :)
Could you send me the patch that fixes it?
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name=""loop-bug.c""; name="loop-bug.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="loop-bug.c"
Cgp2b2lkIGZ1bmMoaW50IG4sIGludCAqeDEsIGludCAqeDIsIGludCAqeDMsIGludCAqeDQsIGlu
dCAqeDUpIHsKICAgIGludCBpOwogICAgZm9yIChpPTA7IGk8bjsgKytpKSB7CiAgICAgICAgaWYg
KHgxW24raV0gPiB4NVtpXSkgeDFbaV0gPSB4MltpXSA9IHgzW2ldID0geDRbaV0gPSB4NVtpXTsK
ICAgICAgICBpZiAoeDJbbitpXSA+IHg1W2ldKSB4MVtpXSA9IHgyW2ldID0geDNbaV0gPSB4NFtp
XSA9IHg1W2ldOwogICAgICAgIGlmICh4M1tuK2ldID4geDVbaV0pIHgxW2ldID0geDJbaV0gPSB4
M1tpXSA9IHg0W2ldID0geDVbaV07CiAgICAgICAgaWYgKHg0W24raV0gPiB4NVtpXSkgeDFbaV0g
PSB4MltpXSA9IHgzW2ldID0geDRbaV0gPSB4NVtpXTsKICAgIH0KfQoK