Bug 29155 - __builtin_ia64_flushrs() violates RAW dependency 'RSE'
__builtin_ia64_flushrs() violates RAW dependency 'RSE'
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
7.3
ia64 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-02-23 18:53 EST by John Reiser
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-02-26 18:57:46 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John Reiser 2001-02-23 18:53:47 EST
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 06:37:39 EST
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 18:57:42 EST
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.