public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: target/10595: [ia64] use of register variables creates stop bits
@ 2003-05-08 5:21 wilson
0 siblings, 0 replies; 2+ messages in thread
From: wilson @ 2003-05-08 5:21 UTC (permalink / raw)
To: drepper, gcc-bugs, gcc-prs, nobody, wilson
Synopsis: [ia64] use of register variables creates stop bits
Responsible-Changed-From-To: unassigned->wilson
Responsible-Changed-By: wilson
Responsible-Changed-When: Thu May 8 05:21:05 2003
Responsible-Changed-Why:
IA-64 maintainer
State-Changed-From-To: open->analyzed
State-Changed-By: wilson
State-Changed-When: Thu May 8 05:21:05 2003
State-Changed-Why:
There is a stop bit before the call because both alloc and br.call write to CFM (current frame marker). If I modify the example so that there are more instructions before the call, then this problem does not show up. For instance
register long int r __asm ("r13");
int i;
int
foo (long a)
{
i += 1;
return bar(r);
}
Gives me
st4 [r15] = r14
mov r35 = r13
br.call.sptk.many b0 = bar#
;;
and now there is no stop bit immediately after the global register variable read.
I don't have access to IA-64 hardware currently, so I can't easily examine the Linux thread library.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10595
^ permalink raw reply [flat|nested] 2+ messages in thread
* target/10595: [ia64] use of register variables creates stop bits
@ 2003-05-02 3:16 drepper
0 siblings, 0 replies; 2+ messages in thread
From: drepper @ 2003-05-02 3:16 UTC (permalink / raw)
To: gcc-gnats
>Number: 10595
>Category: target
>Synopsis: [ia64] use of register variables creates stop bits
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri May 02 03:16:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Ulrich Drepper
>Release: gcc-3.2.3 (and probably later)
>Organization:
>Environment:
Linux/ia64
>Description:
Every use of register variables, variables declared like
register int foo __asm ("r13")
cause stop bits to be generated right after loading from the register.
The use of register variables is quite frequent in the C runtime and also in the kernel so that this is a problem.
>How-To-Repeat:
Compile this code:
register long int r __asm ("r13");
int
foo (long a)
{
return bar(r) != a;
}
The result I see looks like this:
0: 01 18 15 08 80 05 [MII] alloc r35=ar.pfs,5,4,0
6: 20 02 00 62 00 80 mov r34=b0
c: 04 68 00 84 mov r36=r13;;
10: 17 00 00 00 00 08 [BBB] nop.b 0x0
12: PCREL21B bar
16: 00 00 00 00 10 00 nop.b 0x0
1c: 08 00 00 50 br.call.sptk.many b0=10
<foo+0x10>;;
[...]
Note the stop bits after mov r36=r13. Many more examples can be seen by looking at the thread Linux library.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-05-08 5:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-08 5:21 target/10595: [ia64] use of register variables creates stop bits wilson
-- strict thread matches above, loose matches on Subject: below --
2003-05-02 3:16 drepper
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).