diff mbox

[SPARC] Fix miscompilation of ada/g-calend.adb at -O2

Message ID 201207192352.53500.ebotcazou@adacore.com
State New
Headers show

Commit Message

Eric Botcazou July 19, 2012, 9:52 p.m. UTC
There is now a tail call in Time_Of with lot of 64-bit quantities around, 
including arguments, and this exposes an oversight in adddi3_insn_sp32.

Bootstrapped/regtested on SPARC/Solaris, applied on mainline and 4.7 branch.


2012-07-19  Eric Botcazou  <ebotcazou@adacore.com>

	* config/sparc/sparc.md (adddi3_insn_sp32): Add earlyclobber.

Comments

David Miller July 19, 2012, 10:01 p.m. UTC | #1
From: Eric Botcazou <ebotcazou@adacore.com>
Date: Thu, 19 Jul 2012 23:52:53 +0200

> There is now a tail call in Time_Of with lot of 64-bit quantities around, 
> including arguments, and this exposes an oversight in adddi3_insn_sp32.
> 
> Bootstrapped/regtested on SPARC/Solaris, applied on mainline and 4.7 branch.
> 
> 
> 2012-07-19  Eric Botcazou  <ebotcazou@adacore.com>
> 
> 	* config/sparc/sparc.md (adddi3_insn_sp32): Add earlyclobber.

Thanks for fixing this Eric.
diff mbox

Patch

Index: config/sparc/sparc.md
===================================================================
--- config/sparc/sparc.md	(revision 189525)
+++ config/sparc/sparc.md	(working copy)
@@ -3528,7 +3528,7 @@  (define_expand "adddi3"
 })
 
 (define_insn_and_split "*adddi3_insn_sp32"
-  [(set (match_operand:DI 0 "register_operand" "=r")
+  [(set (match_operand:DI 0 "register_operand" "=&r")
 	(plus:DI (match_operand:DI 1 "arith_double_operand" "%r")
 		 (match_operand:DI 2 "arith_double_operand" "rHI")))
    (clobber (reg:CC CC_REG))]