Bug 15189 - wrong filling of delay slot with -march=mips1 -G0 -mno-split-addresses -mno-explicit-relocs
Summary: wrong filling of delay slot with -march=mips1 -G0 -mno-split-addresses -mno-e...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 3.4.0
: P2 normal
Target Milestone: 3.4.1
Assignee: Richard Sandiford
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-28 10:49 UTC by niva
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host: i686-pc-linux-gnu
Target: target=mips64-none-elf
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description niva 2004-04-28 10:49:35 UTC
* the options given when GCC was configured/built;

Configured with: /home/niva/src/gcc-3.4-binutils/configure
--with-headers=/home/niva/src/OC2000-22-jan-04-include
--without-libs --enable-generated-files-in-srcdir
--enable-threads=posix -with-dwarf2 --disable-shared
--target=mips64-none-elf --verbose --enable-checking
--enable-languages=c --srcdir=/home/niva/src/gcc-3.4-binutils
--prefix=/home/niva/local-osina --enable-cpp

     * the complete command line that triggers the bug;

./mips64-none-elf-gcc \
/home/niva/src/gcc-3.4-binutils/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-6.c
 
-O2  -G0 -mno-split-addresses -mno-explicit-relocs  -c -o 
/osina-test/niva/fp-cmp-6.x2  -save-temps -dp -mips1 -mabi=32

     * the compiler output (error messages, warnings, etc.); and

fp-cmp-6.s: Assembler messages:
fp-cmp-6.s:42: Warning: Macro instruction expanded into multiple instructions
               in a branch delay slot

     * the  preprocessed  file (*.i*) that triggers the bug, generated by
       adding -save-temps to the complete compilation command, or, in the
       case  of  a  bug  report for the GNAT front end, a complete set of
       source files (see below).

# 1
"/home/niva/src/gcc-3.4-binutils/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-6.c"
# 1 "<built-in>"
# 1 "<command line>"
# 1
"/home/niva/src/gcc-3.4-binutils/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-6.c"

const double dnan = 1.0/0.0 - 1.0/0.0;
double x = 1.0;

extern void link_error (void);
extern void abort (void);

main ()
{


  if (dnan == dnan)
    link_error ();
  if (dnan != x)
    x = 1.0;
  else
    link_error ();

  if (dnan < x)
    link_error ();
  if (dnan > x)
    link_error ();
  if (dnan <= x)
    link_error ();
  if (dnan >= x)
    link_error ();
  if (dnan == x)
    link_error ();

  exit (0);
}
Comment 1 Richard Sandiford 2004-04-28 19:43:24 UTC
Unusual choice of options ;).  Anyway, I'm testing a fix...
Comment 2 GCC Commits 2004-04-29 19:54:34 UTC
Subject: Bug 15189

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	rsandifo@gcc.gnu.org	2004-04-29 19:54:17

Modified files:
	gcc            : ChangeLog 
	gcc/config/mips: mips.md 

Log message:
	PR target/15189
	* config/mips/mips.md (load_df_low): Use default length.
	(load_df_high, store_df_high): Likewise.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.3516&r2=2.3517
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/mips/mips.md.diff?cvsroot=gcc&r1=1.237&r2=1.238

Comment 3 GCC Commits 2004-04-29 19:55:37 UTC
Subject: Bug 15189

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	rsandifo@gcc.gnu.org	2004-04-29 19:55:29

Modified files:
	gcc            : ChangeLog 
	gcc/config/mips: mips.md 

Log message:
	PR target/15189
	* config/mips/mips.md (load_df_low): Use default length.
	(load_df_high, store_df_high): Likewise.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.424&r2=2.2326.2.425
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/mips/mips.md.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.211.4.5&r2=1.211.4.6

Comment 4 Richard Sandiford 2004-04-29 19:56:32 UTC
Patch applied to head and 3.4 branch.  Thanks for reporting the bug.