From 5da1e2c4897295fb32739724224a86c866dff1d5 Mon Sep 17 00:00:00 2001 From: Alan Lehotsky Date: Thu, 28 Dec 2000 00:55:03 -0500 Subject: [PATCH] expmed.c (store_bit_field): Correctly compute smallest mode that is sufficient to contain all bits we are... * expmed.c (store_bit_field): Correctly compute smallest mode that is sufficient to contain all bits we are storing. From-SVN: r38507 --- MAINTAINERS | 2 ++ gcc/ChangeLog | 5 +++++ gcc/expmed.c | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 8aeb6a1b1e1..6c3084d0961 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -127,6 +127,7 @@ Brendan Kehoe brendan@redhat.com Mumit Khan khan@xraylith.wisc.edu Benjamin Kosnik bkoz@redhat.com Marc Lehmann pcg@goof.com +Alan Lehotsky apl@alum.mit.edu Warren Levy warrenl@redhat.com Kriang Lerdsuwanakij lerdsuwa@users.sourceforge.net Don Lindsay dlindsay@redhat.com @@ -164,3 +165,4 @@ John Wehle john@feith.com Mark Wielaard mark@gcc.gnu.org * Indicates folks we need to get Kerberos/ssh accounts ready so they can write in the source tree + diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 378031629fe..6cb60d93f03 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2000-12-28 + + * expmed.c (store_bit_field): Correctly compute smallest mode that + is sufficient to contain all bits we are storing. + 2000-12-27 Kaveh R. Ghazi * builtins.c (build_function_call_expr): New function. Use it diff --git a/gcc/expmed.c b/gcc/expmed.c index 351dfe4e7ff..89aa3e763d7 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -399,7 +399,7 @@ store_bit_field (str_rtx, bitsize, bitnum, fieldmode, value, align, total_size) VOIDmode, because that is what store_field uses to indicate that this is a bit field, but passing VOIDmode to operand_subword_force will result in an abort. */ - fieldmode = mode_for_size (nwords * BITS_PER_WORD, MODE_INT, 0); + fieldmode = smallest_mode_for_size (nwords * BITS_PER_WORD, MODE_INT, 0); for (i = 0; i < nwords; i++) {