public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/47502] New: [x32] can’t find a register in class ‘SIREG’ while reloading ‘asm’
@ 2011-01-28 0:23 hjl.tools at gmail dot com
2011-01-28 3:23 ` [Bug rtl-optimization/47502] " hjl.tools at gmail dot com
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2011-01-28 0:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47502
Summary: [x32] can’t find a register in class ‘SIREG’ while
reloading ‘asm’
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: hjl.tools@gmail.com
On x32 branch, I got
[hjl@gnu-6 ilp32-19]$ cat x.i
int
foo (const void *set, void *oset)
{
unsigned int resultvar;
asm volatile ("int $0x80\n\t"
: "=a" (resultvar)
: "0" (14), "c" ((set)), "d" ((oset)), "S" (8)
: "memory", "cc");
return resultvar;
}
[hjl@gnu-6 ilp32-19]$ make
/export/build/gnu/gcc-x32/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc-x32/build-x86_64-linux/gcc/ -S -o x.s -mx32 -O -dp
x.i
x.i: In function ‘foo’:
x.i:5:3: error: can’t find a register in class ‘SIREG’ while reloading ‘asm’
x.i:5:3: error: ‘asm’ operand has impossible constraints
make: *** [x.s] Error 1
[hjl@gnu-6 ilp32-19]$
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/47502] [x32] can’t find a register in class ‘SIREG’ while reloading ‘asm’
2011-01-28 0:23 [Bug target/47502] New: [x32] can’t find a register in class ‘SIREG’ while reloading ‘asm’ hjl.tools at gmail dot com
@ 2011-01-28 3:23 ` hjl.tools at gmail dot com
2011-01-28 3:27 ` hjl.tools at gmail dot com
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2011-01-28 3:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47502
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ebotcazou at gcc dot
| |gnu.org
Component|target |rtl-optimization
--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2011-01-28 00:12:14 UTC ---
Combine ignores asm constraints and turns
(set (reg:SI 64 [ resultvar ])
(asm_operands/v:SI ("int $0x80
") ("=a") 0 [
(reg:SI 65)
(subreg/s/u:SI (reg/v/f:DI 62 [ xxxxx ]) 0)
(subreg/s/u:SI (reg/v/f:DI 63 [ yyyyy ]) 0)
(reg:SI 66)
]
[
(asm_input:SI ("0") (null):0)
(asm_input:SI ("c") (null):0)
(asm_input:SI ("d") (null):0)
(asm_input:SI ("S") (null):0)
]
[] x.i:10))
(clobber (reg:QI 18 fpsr))
(clobber (reg:QI 17 flags))
(clobber (mem:BLK (scratch) [0 A8]))
]) x.i:5 -1
into
(set (reg:SI 64 [ resultvar ])
(asm_operands/v:SI ("int $0x80
") ("=a") 0 [
(reg:SI 65)
(reg:SI 5 di [ xxxxx ])
(subreg/s/u:SI (reg/v/f:DI 63 [ yyyyy ]) 0)
(reg:SI 66)
]
[
(asm_input:SI ("0") (null):0)
(asm_input:SI ("c") (null):0)
(asm_input:SI ("d") (null):0)
(asm_input:SI ("S") (null):0)
]
[] x.i:10))
(clobber (reg:QI 18 fpsr))
(clobber (reg:QI 17 flags))
(clobber (mem:BLK (scratch) [0 A8]))
])
Things go downhill from here.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/47502] [x32] can’t find a register in class ‘SIREG’ while reloading ‘asm’
2011-01-28 0:23 [Bug target/47502] New: [x32] can’t find a register in class ‘SIREG’ while reloading ‘asm’ hjl.tools at gmail dot com
2011-01-28 3:23 ` [Bug rtl-optimization/47502] " hjl.tools at gmail dot com
@ 2011-01-28 3:27 ` hjl.tools at gmail dot com
2011-01-28 3:47 ` hjl.tools at gmail dot com
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2011-01-28 3:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47502
--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> 2011-01-28 00:16:53 UTC ---
It is a bad idea for combine to replace pseudo registers in
asm statements with hard registers, which is the job of RA.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/47502] [x32] can’t find a register in class ‘SIREG’ while reloading ‘asm’
2011-01-28 0:23 [Bug target/47502] New: [x32] can’t find a register in class ‘SIREG’ while reloading ‘asm’ hjl.tools at gmail dot com
2011-01-28 3:23 ` [Bug rtl-optimization/47502] " hjl.tools at gmail dot com
2011-01-28 3:27 ` hjl.tools at gmail dot com
@ 2011-01-28 3:47 ` hjl.tools at gmail dot com
2011-01-28 5:00 ` hjl at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2011-01-28 3:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47502
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ubizjak at gmail dot com
--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> 2011-01-28 00:23:39 UTC ---
It is a 4.6 regression. Combine in 4.4 doesn't do it.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/47502] [x32] can’t find a register in class ‘SIREG’ while reloading ‘asm’
2011-01-28 0:23 [Bug target/47502] New: [x32] can’t find a register in class ‘SIREG’ while reloading ‘asm’ hjl.tools at gmail dot com
` (2 preceding siblings ...)
2011-01-28 3:47 ` hjl.tools at gmail dot com
@ 2011-01-28 5:00 ` hjl at gcc dot gnu.org
2011-03-21 8:06 ` hjl at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: hjl at gcc dot gnu.org @ 2011-01-28 5:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47502
--- Comment #4 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> 2011-01-28 02:15:25 UTC ---
Author: hjl
Date: Fri Jan 28 02:15:22 2011
New Revision: 169351
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=169351
Log:
Never combine asm statement.
gcc/
2011-01-27 H.J. Lu <hongjiu.lu@intel.com>
PR rtl-optimization/47502
* combine.c (cant_combine_insn_p): Never combine asm statement.
gcc/testsuite/
2011-01-27 H.J. Lu <hongjiu.lu@intel.com>
PR rtl-optimization/47502
* gcc.target/i386/pr47502-1.c: New.
* gcc.target/i386/pr47502-2.c: Likewise.
Added:
branches/x32/gcc/testsuite/gcc.target/i386/pr47502-1.c
branches/x32/gcc/testsuite/gcc.target/i386/pr47502-2.c
Modified:
branches/x32/gcc/ChangeLog.x32
branches/x32/gcc/combine.c
branches/x32/gcc/testsuite/ChangeLog.x32
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/47502] [x32] can’t find a register in class ‘SIREG’ while reloading ‘asm’
2011-01-28 0:23 [Bug target/47502] New: [x32] can’t find a register in class ‘SIREG’ while reloading ‘asm’ hjl.tools at gmail dot com
` (3 preceding siblings ...)
2011-01-28 5:00 ` hjl at gcc dot gnu.org
@ 2011-03-21 8:06 ` hjl at gcc dot gnu.org
2011-04-02 5:47 ` hjl at gcc dot gnu.org
2011-07-28 14:01 ` hjl.tools at gmail dot com
6 siblings, 0 replies; 8+ messages in thread
From: hjl at gcc dot gnu.org @ 2011-03-21 8:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47502
--- Comment #5 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> 2011-03-21 03:28:45 UTC ---
Author: hjl
Date: Mon Mar 21 03:28:40 2011
New Revision: 171205
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=171205
Log:
Add 2 testcases for PR rtl-optimization/47502.
Added:
trunk/gcc/testsuite/gcc.target/i386/pr47502-1.c
trunk/gcc/testsuite/gcc.target/i386/pr47502-2.c
Modified:
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/47502] [x32] can’t find a register in class ‘SIREG’ while reloading ‘asm’
2011-01-28 0:23 [Bug target/47502] New: [x32] can’t find a register in class ‘SIREG’ while reloading ‘asm’ hjl.tools at gmail dot com
` (4 preceding siblings ...)
2011-03-21 8:06 ` hjl at gcc dot gnu.org
@ 2011-04-02 5:47 ` hjl at gcc dot gnu.org
2011-07-28 14:01 ` hjl.tools at gmail dot com
6 siblings, 0 replies; 8+ messages in thread
From: hjl at gcc dot gnu.org @ 2011-04-02 5:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47502
--- Comment #6 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> 2011-04-02 05:47:07 UTC ---
Author: hjl
Date: Sat Apr 2 05:47:04 2011
New Revision: 171874
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=171874
Log:
Don't check asm statement in cant_combine_insn_p.
2011-03-28 H.J. Lu <hongjiu.lu@intel.com>
PR rtl-optimization/47502
* combine.c (cant_combine_insn_p): Don't check asm statement.
Modified:
branches/x32/gcc/ChangeLog.x32
branches/x32/gcc/combine.c
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/47502] [x32] can’t find a register in class ‘SIREG’ while reloading ‘asm’
2011-01-28 0:23 [Bug target/47502] New: [x32] can’t find a register in class ‘SIREG’ while reloading ‘asm’ hjl.tools at gmail dot com
` (5 preceding siblings ...)
2011-04-02 5:47 ` hjl at gcc dot gnu.org
@ 2011-07-28 14:01 ` hjl.tools at gmail dot com
6 siblings, 0 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2011-07-28 14:01 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47502
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
--- Comment #7 from H.J. Lu <hjl.tools at gmail dot com> 2011-07-28 14:00:41 UTC ---
It is fixed by function pointer argument promotion.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-07-28 14:01 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-28 0:23 [Bug target/47502] New: [x32] can’t find a register in class ‘SIREG’ while reloading ‘asm’ hjl.tools at gmail dot com
2011-01-28 3:23 ` [Bug rtl-optimization/47502] " hjl.tools at gmail dot com
2011-01-28 3:27 ` hjl.tools at gmail dot com
2011-01-28 3:47 ` hjl.tools at gmail dot com
2011-01-28 5:00 ` hjl at gcc dot gnu.org
2011-03-21 8:06 ` hjl at gcc dot gnu.org
2011-04-02 5:47 ` hjl at gcc dot gnu.org
2011-07-28 14:01 ` hjl.tools at gmail dot com
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).