This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
gcc 2.95.2, regparm(3), and >>
- To: gcc-bugs at gcc dot gnu dot org
- Subject: gcc 2.95.2, regparm(3), and >>
- From: Fergus Henderson <fjh at cs dot mu dot OZ dot AU>
- Date: Fri, 24 Nov 2000 16:43:43 +1100
$ cat bug.c
__attribute__((__regparm__(3)))
void foo( int x, int y, int * z)
{
*z = (x >> y);
}
$ gcc -O bug.c
bug.c: In function `foo':
bug.c:5: fixed or forbidden register 2 (cx) was spilled for class
CREG.
bug.c:5: This may be due to a compiler bug or to impossible asm
bug.c:5: statements or clauses.
bug.c:5: This is the instruction:
(insn 18 16 24 (set (mem:SI (reg:SI 2 %ecx) 0)
(ashiftrt:SI (reg/v:SI 0 %eax)
(reg/v:SI 1 %edx))) 306 {ashrsi3} (insn_list 5 (insn_list
8 (nil)))
(expr_list:REG_DEAD (reg:SI 2 %ecx)
(expr_list:REG_DEAD (reg/v:SI 0 %eax)
(expr_list:REG_DEAD (reg/v:SI 1 %edx)
(nil)))))
--
Fergus Henderson <fjh@cs.mu.oz.au> | "I have always known that the pursuit
| of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.