public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* This was fun to track down
@ 1997-09-22 19:37 David S. Miller
  1997-09-23  0:25 ` Jeffrey A Law
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: David S. Miller @ 1997-09-22 19:37 UTC (permalink / raw)
  To: egcs

Mon Sep 22 22:18:48 1997  David S. Miller  <davem@tanya.rutgers.edu>

	* expmed.c (expand_divmod): If compute_mode is not the same as
	mode, handle the case where convert_modes() causes op1 to no
	longer be a CONST_INT.

--- expmed.c.~1~	Sun Sep  7 18:10:31 1997
+++ expmed.c	Mon Sep 22 22:18:27 1997
@@ -2831,6 +2831,14 @@
     {
       op0 = convert_modes (compute_mode, mode, op0, unsignedp);
       op1 = convert_modes (compute_mode, mode, op1, unsignedp);
+
+      /* convert_modes() may have tossed op1 into a register, so we
+	 absolutely must recompute the following.  */
+      op1_is_constant = GET_CODE (op1) == CONST_INT;
+      op1_is_pow2 = (op1_is_constant
+		     && ((EXACT_POWER_OF_2_OR_ZERO_P (INTVAL (op1))
+			  || (! unsignedp
+			      && EXACT_POWER_OF_2_OR_ZERO_P (-INTVAL (op1))))));
     }
 
   /* If one of the operands is a volatile MEM, copy it into a register.  */

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

end of thread, other threads:[~1997-09-29 11:53 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-09-22 19:37 This was fun to track down David S. Miller
1997-09-23  0:25 ` Jeffrey A Law
1997-09-23  1:49 ` Torbjorn Granlund
1997-09-23 14:09   ` David S. Miller
1997-09-23 13:41 ` Torbjorn Granlund
1997-09-23 13:50   ` David S. Miller
1997-09-23 13:57     ` Torbjorn Granlund
1997-09-23 14:16       ` David S. Miller
1997-09-23 19:05       ` Jeffrey A Law
1997-09-24 12:58         ` Jim Wilson
1997-09-24 23:15           ` Jeffrey A Law
1997-09-27 13:40             ` Torbjorn Granlund
1997-09-27 23:38               ` Jeffrey A Law
1997-09-29 11:53               ` Jim Wilson

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