public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/11442] New: [3.3 regression] [arm] invalid assembler on arm
@ 2003-07-06 11:57 debian-gcc at lists dot debian dot org
  2003-07-06 11:58 ` [Bug target/11442] " debian-gcc at lists dot debian dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: debian-gcc at lists dot debian dot org @ 2003-07-06 11:57 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11442

           Summary: [3.3 regression] [arm] invalid assembler on arm
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: debian-gcc at lists dot debian dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: arm-linux
  GCC host triplet: arm-linux
GCC target triplet: arm-linux

[forwarded from http://bugs.debian.org/188513]

rechecked with CVS 3.3.1 and HEAD CVS 20030531, binutils-2.14.0.90.4
regression compared to gcc-2.95

$ gcc -c -O2 engine.i 
/tmp/ccVcqHkK.s: Assembler messages:
/tmp/ccVcqHkK.s:4532: Warning: source register same as write-back base
/tmp/ccVcqHkK.s:3038: Error: bad immediate value for offset (4104)
/tmp/ccVcqHkK.s:3056: Error: bad immediate value for offset (4176)
/tmp/ccVcqHkK.s:3084: Error: bad immediate value for offset (4288)
/tmp/ccVcqHkK.s:3092: Error: bad immediate value for offset (4140)
/tmp/ccVcqHkK.s:3103: Error: bad immediate value for offset (4104)
/tmp/ccVcqHkK.s:5237: Error: bad immediate value for offset (4132)
/tmp/ccVcqHkK.s:5250: Error: bad immediate value for offset (4184)
/tmp/ccVcqHkK.s:5264: Error: bad immediate value for offset (4240)
/tmp/ccVcqHkK.s:5276: Error: bad immediate value for offset (4108)


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/11442] [3.3 regression] [arm] invalid assembler on arm
  2003-07-06 11:57 [Bug target/11442] New: [3.3 regression] [arm] invalid assembler on arm debian-gcc at lists dot debian dot org
@ 2003-07-06 11:58 ` debian-gcc at lists dot debian dot org
  2003-07-09 22:19 ` dhazeghi at yahoo dot com
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: debian-gcc at lists dot debian dot org @ 2003-07-06 11:58 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11442



------- Additional Comments From debian-gcc at lists dot debian dot org  2003-07-06 11:58 -------
Created an attachment (id=4352)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4352&action=view)
preprocessed source


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/11442] [3.3 regression] [arm] invalid assembler on arm
  2003-07-06 11:57 [Bug target/11442] New: [3.3 regression] [arm] invalid assembler on arm debian-gcc at lists dot debian dot org
  2003-07-06 11:58 ` [Bug target/11442] " debian-gcc at lists dot debian dot org
@ 2003-07-09 22:19 ` dhazeghi at yahoo dot com
  2003-08-23  0:44 ` dhazeghi at yahoo dot com
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: dhazeghi at yahoo dot com @ 2003-07-09 22:19 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11442


dhazeghi at yahoo dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |wrong-code
   Last reconfirmed|0000-00-00 00:00:00         |2003-07-09 22:19:22
               date|                            |


------- Additional Comments From dhazeghi at yahoo dot com  2003-07-09 22:19 -------
Confirmed with gcc 3.1, 3.3 branch and mainline (20030708).


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/11442] [3.3 regression] [arm] invalid assembler on arm
  2003-07-06 11:57 [Bug target/11442] New: [3.3 regression] [arm] invalid assembler on arm debian-gcc at lists dot debian dot org
  2003-07-06 11:58 ` [Bug target/11442] " debian-gcc at lists dot debian dot org
  2003-07-09 22:19 ` dhazeghi at yahoo dot com
@ 2003-08-23  0:44 ` dhazeghi at yahoo dot com
  2003-10-01  9:15 ` rearnsha at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: dhazeghi at yahoo dot com @ 2003-08-23  0:44 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11442


dhazeghi at yahoo dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  GCC build triplet|arm-linux                   |
   GCC host triplet|arm-linux                   |
           Priority|P2                          |P1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/11442] [3.3 regression] [arm] invalid assembler on arm
  2003-07-06 11:57 [Bug target/11442] New: [3.3 regression] [arm] invalid assembler on arm debian-gcc at lists dot debian dot org
                   ` (2 preceding siblings ...)
  2003-08-23  0:44 ` dhazeghi at yahoo dot com
@ 2003-10-01  9:15 ` rearnsha at gcc dot gnu dot org
  2003-10-01  9:18 ` rearnsha at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rearnsha at gcc dot gnu dot org @ 2003-10-01  9:15 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11442


rearnsha at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID


------- Additional Comments From rearnsha at gcc dot gnu dot org  2003-10-01 09:15 -------
Not a bug.  Your source code is invalid.

You can't put any "asm" in your source code that requires more than 4 bytes per
statement.  You have ".skip 16" operations which are violating this constraint
and consequently gcc gets confused in a way which can only be detected by the
assembler.

The compiler does not parse the body of asm statements to divine their meaning.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/11442] [3.3 regression] [arm] invalid assembler on arm
  2003-07-06 11:57 [Bug target/11442] New: [3.3 regression] [arm] invalid assembler on arm debian-gcc at lists dot debian dot org
                   ` (3 preceding siblings ...)
  2003-10-01  9:15 ` rearnsha at gcc dot gnu dot org
@ 2003-10-01  9:18 ` rearnsha at gcc dot gnu dot org
  2003-10-01  9:29 ` falk dot hueffner at student dot uni-tuebingen dot de
  2003-10-01 10:16 ` rearnsha at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: rearnsha at gcc dot gnu dot org @ 2003-10-01  9:18 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11442



------- Additional Comments From rearnsha at gcc dot gnu dot org  2003-10-01 09:18 -------
Note for clarity.  By "four bytes per statement" I mean between each semicolon
in the input string.  So 

	asm ("insn1; insn2; insn3 insn4")

is ok and (on ARM) will be counted as 16 bytes.  But

	asm (".space 16")

is not, it will only be counted as 4 bytes by the compiler.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/11442] [3.3 regression] [arm] invalid assembler on arm
  2003-07-06 11:57 [Bug target/11442] New: [3.3 regression] [arm] invalid assembler on arm debian-gcc at lists dot debian dot org
                   ` (4 preceding siblings ...)
  2003-10-01  9:18 ` rearnsha at gcc dot gnu dot org
@ 2003-10-01  9:29 ` falk dot hueffner at student dot uni-tuebingen dot de
  2003-10-01 10:16 ` rearnsha at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: falk dot hueffner at student dot uni-tuebingen dot de @ 2003-10-01  9:29 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11442



------- Additional Comments From falk dot hueffner at student dot uni-tuebingen dot de  2003-10-01 09:29 -------
Subject: Re:  [3.3 regression] [arm] invalid assembler on arm

"rearnsha at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:

> You can't put any "asm" in your source code that requires more than
> 4 bytes per statement.  You have ".skip 16" operations which are
> violating this constraint and consequently gcc gets confused in a
> way which can only be detected by the assembler.

Is this something ARM specific? I can't find anything in the manual
about it. If it's a general statement, we can also close 12108.

> The compiler does not parse the body of asm statements to divine
> their meaning.

But it does count the ;'s?


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/11442] [3.3 regression] [arm] invalid assembler on arm
  2003-07-06 11:57 [Bug target/11442] New: [3.3 regression] [arm] invalid assembler on arm debian-gcc at lists dot debian dot org
                   ` (5 preceding siblings ...)
  2003-10-01  9:29 ` falk dot hueffner at student dot uni-tuebingen dot de
@ 2003-10-01 10:16 ` rearnsha at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: rearnsha at gcc dot gnu dot org @ 2003-10-01 10:16 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11442



------- Additional Comments From rearnsha at gcc dot gnu dot org  2003-10-01 10:16 -------
> Is this something ARM specific? I can't find anything in the manual
> about it. If it's a general statement, we can also close 12108.

Not specifically.  It applies to any port which relies on accurate tracking of
the size of instructions generated (sh spings to mind here).

In the ARM case we have to do this because of the limited range of a pc-relative
load, which means that constants have to split into sub-pools that are reachable
by a single instruction.

12108 is similar, but subtly different.  In that case (as I understand it from a
quick scan) the compiler is trying to suppress an ASM statement by the use of a
special instruction which will cause the following instruction to not be
executed (or only executed under specific conditions).  In this case the
compiler must know that the asm body will expand into exactly one target
instruction -- so it's not the length of the sequence generated, but the number
of instructions.  It could be argued that conditional suppression of an ASM
should never be attempted by the compiler, but I don't know enough about the
processor in question to be sure.

The documentation for ASM should probably be updated to make it clear that gcc
has to estimate the number of bytes that an ASM will generate and that the
estimate is based on the number of statements multiplied by the longest
instruction in the target.  Use of any ASM statement that produces more bytes
than that should be considered "unspecified behaviour" (it might work on some
platforms all the time, but on others only some of the time).


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2003-10-01 10:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-06 11:57 [Bug target/11442] New: [3.3 regression] [arm] invalid assembler on arm debian-gcc at lists dot debian dot org
2003-07-06 11:58 ` [Bug target/11442] " debian-gcc at lists dot debian dot org
2003-07-09 22:19 ` dhazeghi at yahoo dot com
2003-08-23  0:44 ` dhazeghi at yahoo dot com
2003-10-01  9:15 ` rearnsha at gcc dot gnu dot org
2003-10-01  9:18 ` rearnsha at gcc dot gnu dot org
2003-10-01  9:29 ` falk dot hueffner at student dot uni-tuebingen dot de
2003-10-01 10:16 ` rearnsha at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).