public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug inline-asm/30413] New: %z produces ICE for char operands
@ 2007-01-09 2:58 cnovikov at pacbell dot net
2007-01-14 6:02 ` [Bug target/30413] " pinskia at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: cnovikov at pacbell dot net @ 2007-01-09 2:58 UTC (permalink / raw)
To: gcc-bugs
Shell log:
$ cat t14.c
int main() {
char a,b;
asm volatile ("mov%z0 %1, %0" : "=r"(a) : "m"(b));
}
$ gcc -o t14 t14.c
t14.c: In function `main':
t14.c:4: internal compiler error: in print_operand, at config/i386/i386.c:7392
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
cnov@wyvern:~/tmp>
The same works if a and b are int. I also see this bug with GCC 3.3.5 on
i486-linux host/target.
--
Summary: %z produces ICE for char operands
Product: gcc
Version: 3.4.4
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: inline-asm
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: cnovikov at pacbell dot net
GCC host triplet: i686-pc-cygwin
GCC target triplet: i686-pc-cygwin
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30413
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/30413] %z produces ICE for char operands
2007-01-09 2:58 [Bug inline-asm/30413] New: %z produces ICE for char operands cnovikov at pacbell dot net
@ 2007-01-14 6:02 ` pinskia at gcc dot gnu dot org
2007-01-14 6:17 ` cnovikov at pacbell dot net
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-01-14 6:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2007-01-14 06:02 -------
Confirmed, not a regression.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Component|inline-asm |target
Ever Confirmed|0 |1
GCC host triplet|i686-pc-cygwin |
GCC target triplet|i686-pc-cygwin |i686-*-*
Keywords| |ice-on-invalid-code
Known to fail| |2.95 3.2.3 3.4.0 4.0.0 4.2.0
| |4.0.4 4.1.2 3.0.4
Last reconfirmed|0000-00-00 00:00:00 |2007-01-14 06:02:37
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30413
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/30413] %z produces ICE for char operands
2007-01-09 2:58 [Bug inline-asm/30413] New: %z produces ICE for char operands cnovikov at pacbell dot net
2007-01-14 6:02 ` [Bug target/30413] " pinskia at gcc dot gnu dot org
@ 2007-01-14 6:17 ` cnovikov at pacbell dot net
2007-01-14 6:34 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: cnovikov at pacbell dot net @ 2007-01-14 6:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from cnovikov at pacbell dot net 2007-01-14 06:17 -------
(In reply to comment #1)
> Confirmed, not a regression.
>
You set keywords to "ice-on-invalid-code". In my opinion, the code is valid. %z
is supposed to add an appropriate data width IA-32 insn suffix: l for dwords, w
for words, b for bytes. The expected behavior here is for %z0 to produce "b" in
the assembler output, since "a" is a char.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30413
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/30413] %z produces ICE for char operands
2007-01-09 2:58 [Bug inline-asm/30413] New: %z produces ICE for char operands cnovikov at pacbell dot net
2007-01-14 6:02 ` [Bug target/30413] " pinskia at gcc dot gnu dot org
2007-01-14 6:17 ` cnovikov at pacbell dot net
@ 2007-01-14 6:34 ` pinskia at gcc dot gnu dot org
2007-01-14 11:14 ` uros at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-01-14 6:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2007-01-14 06:34 -------
(In reply to comment #2)
> (In reply to comment #1)
> > Confirmed, not a regression.
> >
>
> You set keywords to "ice-on-invalid-code".
Maybe you are correct but I don't think %zN is documented anywhere.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|ice-on-invalid-code |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30413
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/30413] %z produces ICE for char operands
2007-01-09 2:58 [Bug inline-asm/30413] New: %z produces ICE for char operands cnovikov at pacbell dot net
` (2 preceding siblings ...)
2007-01-14 6:34 ` pinskia at gcc dot gnu dot org
@ 2007-01-14 11:14 ` uros at gcc dot gnu dot org
2007-01-14 11:32 ` ubizjak at gmail dot com
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: uros at gcc dot gnu dot org @ 2007-01-14 11:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from uros at gcc dot gnu dot org 2007-01-14 11:14 -------
Subject: Bug 30413
Author: uros
Date: Sun Jan 14 11:14:20 2007
New Revision: 120769
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120769
Log:
PR target/30413
* config/i386/i386.c (print_operand) ['z']: Output 'b' for
operands of size 1.
testsuite/ChangeLog:
PR target/30413
* gcc.target/i386/pr30413.c: New test.
Added:
trunk/gcc/testsuite/gcc.target/i386/pr30413.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30413
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/30413] %z produces ICE for char operands
2007-01-09 2:58 [Bug inline-asm/30413] New: %z produces ICE for char operands cnovikov at pacbell dot net
` (3 preceding siblings ...)
2007-01-14 11:14 ` uros at gcc dot gnu dot org
@ 2007-01-14 11:32 ` ubizjak at gmail dot com
2007-03-02 15:02 ` ubizjak at gmail dot com
2007-03-02 18:38 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: ubizjak at gmail dot com @ 2007-01-14 11:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from ubizjak at gmail dot com 2007-01-14 11:32 -------
Although %zN is not documented, we advertise it in config/i386/i386.md:
;; The special asm out single letter directives following a '%' are:
;; 'z' mov%z1 would be movl, movw, or movb depending on the mode of
;; operands[1].
The fix is straightforward and doesn't hurt anything. I have fixed this for
4.3.0.
BTW: The same binary code can be achieved by using plain "mov", as gas figures
out opcode from register name.
--
ubizjak at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |ubizjak at gmail dot com
|dot org |
Status|NEW |ASSIGNED
Known to work| |4.3.0
Last reconfirmed|2007-01-14 06:02:37 |2007-01-14 11:32:38
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30413
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/30413] %z produces ICE for char operands
2007-01-09 2:58 [Bug inline-asm/30413] New: %z produces ICE for char operands cnovikov at pacbell dot net
` (4 preceding siblings ...)
2007-01-14 11:32 ` ubizjak at gmail dot com
@ 2007-03-02 15:02 ` ubizjak at gmail dot com
2007-03-02 18:38 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: ubizjak at gmail dot com @ 2007-03-02 15:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from ubizjak at gmail dot com 2007-03-02 15:02 -------
Fixed in mainline. IMO this is not worth to fix on branches due to comment #5.
--
ubizjak at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30413
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/30413] %z produces ICE for char operands
2007-01-09 2:58 [Bug inline-asm/30413] New: %z produces ICE for char operands cnovikov at pacbell dot net
` (5 preceding siblings ...)
2007-03-02 15:02 ` ubizjak at gmail dot com
@ 2007-03-02 18:38 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-03-02 18:38 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30413
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-03-02 18:38 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-09 2:58 [Bug inline-asm/30413] New: %z produces ICE for char operands cnovikov at pacbell dot net
2007-01-14 6:02 ` [Bug target/30413] " pinskia at gcc dot gnu dot org
2007-01-14 6:17 ` cnovikov at pacbell dot net
2007-01-14 6:34 ` pinskia at gcc dot gnu dot org
2007-01-14 11:14 ` uros at gcc dot gnu dot org
2007-01-14 11:32 ` ubizjak at gmail dot com
2007-03-02 15:02 ` ubizjak at gmail dot com
2007-03-02 18:38 ` pinskia 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).