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

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2001-02-26 23:57:46 UTC
Embargoed:


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
/usr/lib/gcc-lib/ia64-redhat-linux/2.96-ia64-000717/specs
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)
 (IA-64)
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/lib/gcc-lib/ia64-redhat-linux/2.96-ia64-000717/include
 /usr/ia64-redhat-linux/include
 /usr/include
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.

/usr/lib/gcc-lib/ia64-redhat-linux/2.96-ia64-000717/../../../../ia64-redhat-linux/bin/as
-x -o builtin.o builtin.s
builtin.s: Assembler messages:
builtin.s:78: Warning: Use of 'mov.m' violates RAW dependency 'RSE'
(impliedf)
builtin.s:78: Warning: Only the first path encountering the conflict is
reported
builtin.s:76: Warning: This is the location of the conflicting usage
 /usr/lib/gcc-lib/ia64-redhat-linux/2.96-ia64-000717/collect2
-dynamic-linker /lib/ld-linux-ia64.so.2 -o builtin
/usr/lib/gcc-lib/ia64-redhat-linux/2.96-ia64-000717/../../../crt1.o
/usr/lib/gcc-lib/ia64-redhat-linux/2.96-ia64-000717/../../../crti.o
/usr/lib/gcc-lib/ia64-redhat-linux/2.96-ia64-000717/crtbegin.o
-L/usr/lib/gcc-lib/ia64-redhat-linux/2.96-ia64-000717
-L/usr/lib/gcc-lib/ia64-redhat-linux/2.96-ia64-000717/../../../../ia64-redhat-linux/lib
-L/usr/lib/gcc-lib/ia64-redhat-linux/2.96-ia64-000717/../../.. builtin.o
-lgcc -lc -lgcc
/usr/lib/gcc-lib/ia64-redhat-linux/2.96-ia64-000717/crtend.o
/usr/lib/gcc-lib/ia64-redhat-linux/2.96-ia64-000717/../../../crtn.o
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:
boris.devel.redhat.com
Group       : Development/Tools             Source RPM:
gnupro-1117-6.src.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>

int
gorp(int k)
{
	return ~0;
}

int
foo(int j)
{
	void *pc = __builtin_return_address(0);
	__builtin_ia64_flushrs();
	/*gorp(j+j);*/
	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);
}

main()
{
	return bar(2);
}
bash-2.04$ 


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

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
	/*gorp(j+j);*/
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>

        * 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.