Bug 29155 - __builtin_ia64_flushrs() violates RAW dependency 'RSE'
Summary: __builtin_ia64_flushrs() violates RAW dependency 'RSE'
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc
Version: 7.3
Hardware: ia64
OS: Linux
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2001-02-23 23:53 UTC by John Reiser
Modified: 2008-05-01 15:37 UTC (History)
0 users

Clone Of:
Last Closed: 2001-02-26 23:57:46 UTC

Attachments (Terms of Use)

Description John Reiser 2001-02-23 23:53:47 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.75 [en] (X11; U; Linux 2.2.5-15 i586)

$ type gcc
gcc is hashed (/usr/bin/gcc)
bash-2.04$ gcc -v --save-temps -g -o builtin builtin.c
Reading specs from
gcc version 2.96-ia64-000717 snap 001117
 /usr/lib/gcc-lib/ia64-redhat-linux/2.96-ia64-000717/cpp -lang-c -v
-D__GNUC__=2 -D__GNUC_MINOR__=96 -D__GNUC_PATCHLEVEL__=0 -D__ia64
-D__ia64__ -D__linux -D__linux__ -D_LONGLONG -Dlinux -Dunix -D__LP64__
-D__ELF__ -D__ia64 -D__ia64__ -D__linux -D__linux__ -D_LONGLONG -D__linux__
-D__unix__ -D__LP64__ -D__ELF__ -D__linux -D__unix -Asystem(linux)
-Acpu(ia64) -Amachine(ia64) -g -D__LONG_MAX__=9223372036854775807L
builtin.c builtin.i
GNU CPP version 2.96-ia64-000717 snap 001117 (cpplib)
#include "..." search starts here:
#include <...> search starts here:
End of search list.
 /usr/lib/gcc-lib/ia64-redhat-linux/2.96-ia64-000717/cc1 builtin.i -mb-step
-quiet -dumpbase builtin.c -g -version -o builtin.s
GNU C version 2.96-ia64-000717 snap 001117 (ia64-redhat-linux) compiled by
GNU C version 2.96-ia64-000717 snap 001117.

-x -o builtin.o builtin.s
builtin.s: Assembler messages:
builtin.s:78: Warning: Use of 'mov.m' violates RAW dependency 'RSE'
builtin.s:78: Warning: Only the first path encountering the conflict is
builtin.s:76: Warning: This is the location of the conflicting usage
-dynamic-linker /lib/ld-linux-ia64.so.2 -o builtin
-L/usr/lib/gcc-lib/ia64-redhat-linux/2.96-ia64-000717/../../.. builtin.o
-lgcc -lc -lgcc
bash-2.04$ type gcc
gcc is hashed (/usr/bin/gcc)
bash-2.04$ rpm -qif /usr/bin/gcc
Name        : gnupro                       Relocations: /usr 
Version     : 1117                              Vendor: Red Hat, Inc.
Release     : 6                             Build Date: Tue 23 Jan 2001
11:55:29 AM PST
Install date: Wed 21 Feb 2001 06:10:09 AM PST      Build Host:
Group       : Development/Tools             Source RPM:
Size        : 30025635                         License: GPL
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Summary     : The Cygnus release of GCC and binutils.
Description :
The Cygnus release of GCC and binutils used until the IA-64 ports
have been migrated into the FSF releases of GCC and binutils.
bash-2.04$ cat builtin.c
#include <stdio.h>

gorp(int k)
	return ~0;

foo(int j)
	void *pc = __builtin_return_address(0);
	printf("bsp=%p\n", __builtin_ia64_bsp());
	printf("ra(0)=%p\n", __builtin_return_address(0));
	printf("ra(1)=%p\n", __builtin_return_address(1));
	printf("fp(0)=%p\n", __builtin_frame_address(0));
	printf("fp(1)=%p\n", __builtin_frame_address(1));
	return 5 - j;

int bar(int k)
	return foo(7*k);

	return bar(2);

Reproducible: Always
Steps to Reproduce:
1. Follow transcript in Description.

Actual Results:  Assembler compained of incorrect instruction usage
in the code generated by the compiler,
and [presumably] the generated program won't execute correctly.

Expected Results:  Correct code with no complaints.

If I uncomment the call
then the assembler no longer complains.

Comment 1 Jakub Jelinek 2001-02-26 11:37:39 UTC
This is fixed by:
2001-01-23  Jim Wilson  <wilson@redhat.com>

        * config/ia64/ia64.md (bsp_value): Add explicit stop bit at start.
        (flushrs): Add explicit stop bit at end.
which will be included in gcc-2.96-77 (note that gnupro is since gcc-2.96-75
obsoleted by separate gcc and binutils).
But I found that your example does not link when compiled with -O and above,
in all of gnupro, 2.96-RH and CVS head gcc (undefined symbol retaddr), I'll
debug why is not retaddr virtual register eliminated.

Comment 2 Glen Foster 2001-02-26 23:57:42 UTC
We (Red Hat) should really try to resolve this before next release.

Note You need to log in before you can comment on or make changes to this bug.