Subject: Re: strtoull bug
To: Ignatios Souvatzis <is@jocelyn.rhein.de>
From: Richard Earnshaw <rearnsha@arm.com>
List: port-arm32
Date: 05/16/2000 10:37:50
This is a multipart MIME message.

--==_Exmh_12997907350
Content-Type: text/plain; charset=us-ascii

> So...
> 
> adding the (void)&acc; from strtouq to strtoull makes it compile correctly
> on arm32.
> 
> May I add this as a stopgap fix?
> 
> 	-is


I finally got around to looking at this properly last night.  The bug 
turns out to be very obvious and is just a missing clobber in the ARM 
machine description for the compiler.  Here's the fix.  Once this is 
applied and you've rebuilt your compiler the above hack can be backed out 
again.

PR 9613 can probably closed after this.

The bug is generic to all releases of netbsd based on either this or 
earlier versions of gcc, so this should probably be pulled onto the 
release branch (if that is still being updated).

R.

1999-05-16  Richard Earnshaw (rearnsha@arm.com)

	* arm.md (negdi2): Add clobber of the condition code register.



--==_Exmh_12997907350
Content-Type: application/x-patch ; name="negdi.patch"
Content-Description: negdi.patch
Content-Disposition: attachment; filename="negdi.patch"

*** arm.md.orig	Tue May 16 10:00:06 2000
--- arm.md	Tue May 16 10:00:39 2000
***************
*** 1807,1813 ****
  
  (define_insn "negdi2"
    [(set (match_operand:DI 0 "s_register_operand" "=&r,&r")
! 	(neg:DI (match_operand:DI 1 "s_register_operand" "?r,0")))]
    ""
    "rsbs\\t%Q0, %Q1, #0\;rsc\\t%R0, %R1, #0"
  [(set_attr "conds" "clob")
--- 1807,1814 ----
  
  (define_insn "negdi2"
    [(set (match_operand:DI 0 "s_register_operand" "=&r,&r")
! 	(neg:DI (match_operand:DI 1 "s_register_operand" "?r,0")))
!    (clobber (reg:CC 24))]
    ""
    "rsbs\\t%Q0, %Q1, #0\;rsc\\t%R0, %R1, #0"
  [(set_attr "conds" "clob")

--==_Exmh_12997907350--