public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* mainline broken for powerpc-unknown-linux-gnu (Java -msoft-float)
@ 2003-04-18 19:36 Janis Johnson
  2003-04-18 22:28 ` Janis Johnson
  2003-04-19 20:48 ` Alexandre Oliva
  0 siblings, 2 replies; 5+ messages in thread
From: Janis Johnson @ 2003-04-18 19:36 UTC (permalink / raw)
  To: gcc, aoliva

This patch breaks Java for -msoft-float on powerpc-unknown-linux-gnu:

2003-04-16  Alexandre Oliva  <aoliva@redhat.com>

	* reload1.c (reload_cse_noop_set_p): Return false if mode of
	SET_DEST is not the same as that returned by...
	* cselib.h (cselib_reg_set_mode): ... new function.
	* cselib.c (cselib_reg_set_mode): Define it.
	(REG_VALUES): Document semantics of first element as set mode.
	(cselib_subst_to_values): Skip first element if ELT is NULL.
	(cselib_lookup): Likewise.  Insert past the first element.
	(cselib_invalidate_regno): NULLify first element.
	(cselib_record_set): Set first element.

Here's the failure when building libjava:

/work/janis/gnu/gcc_mline/gcc-obj-native32/gcc/gcj -B/work/janis/gnu/gcc_mline/gcc-obj-native32/powerpc-linux/nof/libjava/ -B/work/janis/gnu/gcc_mline/gcc-obj-native32/gcc/ --encoding=UTF-8 -Wno-deprecated -fclasspath= -fbootclasspath=/work/janis/gnu/gcc_mline/gcc-obj-native32/powerpc-linux/nof/libjava -g -O2 -msoft-float -fPIC -mstrict-align -MD -MT java/lang/NoSuchFieldError.lo -MF java/lang/NoSuchFieldError.d -c ../../../../gcc-mline/libjava/java/lang/NoSuchFieldError.java -fPIC -o java/lang/.libs/NoSuchFieldError.o
../../../../gcc-mline/libjava/java/lang/Math.java: In class `java.lang.Math':
../../../../gcc-mline/libjava/java/lang/Math.java: In method `java.lang.Math.max(float,float)':
../../../../gcc-mline/libjava/java/lang/Math.java:270: error: insn does not satisfy its constraints:
(insn 77 104 81 8 0x4015ab80 (set (reg:SF 66 ctr [orig:118 <result> ] [118])
        (reg:SF 66 ctr [orig:130 a ] [130])) 320 {*movsf_softfloat} (insn_list:REG_DEP_OUTPUT 23 (insn_list 71 (insn_list 75 (insn_list:REG_DEP_ANTI 64 (nil)))))
    (nil))
../../../../gcc-mline/libjava/java/lang/Math.java:270: internal compiler error: in reload_cse_simplify_operands, at reload1.c:8351
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

The Java code being compiled here is:

  public static float max(float a, float b)
  {
    // this check for NaN, from JLS 15.21.1, saves a method call
    if (a != a)
      return a;
    // no need to check if b is NaN; > will work correctly
    // recall that -0.0 == 0.0, but [+-]0.0 - [+-]0.0 behaves special
    if (a == 0 && b == 0)
      return a - -b;
    return (a > b) ? a : b;
  }

Let me know if you'd like more information.

Janis

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mainline broken for powerpc-unknown-linux-gnu (Java -msoft-float)
  2003-04-18 19:36 mainline broken for powerpc-unknown-linux-gnu (Java -msoft-float) Janis Johnson
@ 2003-04-18 22:28 ` Janis Johnson
  2003-04-19 20:48 ` Alexandre Oliva
  1 sibling, 0 replies; 5+ messages in thread
From: Janis Johnson @ 2003-04-18 22:28 UTC (permalink / raw)
  To: Janis Johnson; +Cc: gcc, aoliva

On Fri, Apr 18, 2003 at 10:16:51AM -0700, Janis Johnson wrote:
> This patch breaks Java for -msoft-float on powerpc-unknown-linux-gnu:
> 
> 2003-04-16  Alexandre Oliva  <aoliva@redhat.com>
> 
> 	* reload1.c (reload_cse_noop_set_p): Return false if mode of

By the way, I verified that this patch was responsible for this
particular problem.  There have been two other problems with
bootstraps on powerpc and powerpc64 the last couple of days, but
they are not related to this failure.

Janis

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mainline broken for powerpc-unknown-linux-gnu (Java -msoft-float)
  2003-04-18 19:36 mainline broken for powerpc-unknown-linux-gnu (Java -msoft-float) Janis Johnson
  2003-04-18 22:28 ` Janis Johnson
@ 2003-04-19 20:48 ` Alexandre Oliva
  2003-04-19 23:01   ` David Edelsohn
  1 sibling, 1 reply; 5+ messages in thread
From: Alexandre Oliva @ 2003-04-19 20:48 UTC (permalink / raw)
  To: Janis Johnson; +Cc: gcc

On Apr 18, 2003, Janis Johnson <janis187@us.ibm.com> wrote:

> This patch breaks Java for -msoft-float on powerpc-unknown-linux-gnu:

Hmm...  I can see how my patch could turn a pre-existing but silent
error into a hard error in a case like this:

> ../../../../gcc-mline/libjava/java/lang/Math.java:270: error: insn does not satisfy its constraints:
> (insn 77 104 81 8 0x4015ab80 (set (reg:SF 66 ctr [orig:118 <result> ] [118])
>         (reg:SF 66 ctr [orig:130 a ] [130])) 320 {*movsf_softfloat} (insn_list:REG_DEP_OUTPUT 23 (insn_list 71 (insn_list 75 (insn_list:REG_DEP_ANTI 64 (nil)))))
>     (nil))

I'm afraid I'm away from my main computer starting today, until Sunday
next week, and, thanks to a failed hard disk on my laptop, I'm *very*
short on disk space, so I may be unable to look into this until I
return.

However, as I wrote before, this error doesn't indicate an error in my
patch, but rather some other error that it has happened to expose, so,
if someone more familiar with powerpc could have a look on why reload
is generating this incorrect instruction, that was previously removed
but that no longer is, I'd appreciate it.

Thanks,

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mainline broken for powerpc-unknown-linux-gnu (Java -msoft-float)
  2003-04-19 20:48 ` Alexandre Oliva
@ 2003-04-19 23:01   ` David Edelsohn
  2003-04-20 18:44     ` Alan Modra
  0 siblings, 1 reply; 5+ messages in thread
From: David Edelsohn @ 2003-04-19 23:01 UTC (permalink / raw)
  To: Alexandre Oliva, Janis Johnson; +Cc: gcc

	I guess the movsf_softfloat pattern needs a "h" <- "0" case.
Janis, you can try adding that to the end of the pattern following
movsi_internal1 as an example (the instruction is a nop).  For some reason
GCC needs a pattern moving a register to itself.

David

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mainline broken for powerpc-unknown-linux-gnu (Java -msoft-float)
  2003-04-19 23:01   ` David Edelsohn
@ 2003-04-20 18:44     ` Alan Modra
  0 siblings, 0 replies; 5+ messages in thread
From: Alan Modra @ 2003-04-20 18:44 UTC (permalink / raw)
  To: David Edelsohn; +Cc: Alexandre Oliva, Janis Johnson, gcc

On Sat, Apr 19, 2003 at 10:10:38AM -0400, David Edelsohn wrote:
> For some reason GCC needs a pattern moving a register to itself.

A number of places in optabs.c do

	      /* Make a place for a REG_NOTE and add it.  */
	      insn = emit_move_insn (to, to);
	      set_unique_reg_note (insn,
	                           REG_EQUAL, ...

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-04-19 23:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-18 19:36 mainline broken for powerpc-unknown-linux-gnu (Java -msoft-float) Janis Johnson
2003-04-18 22:28 ` Janis Johnson
2003-04-19 20:48 ` Alexandre Oliva
2003-04-19 23:01   ` David Edelsohn
2003-04-20 18:44     ` Alan Modra

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