public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 1/5] rs6000: Fix PROMOTE_MODE for -m32 -mpowerpc64
@ 2015-01-15  1:19 Segher Boessenkool
  2015-01-15  1:47 ` [PATCH 3/5] rs6000: Fix va_start handling for -m32 -mpowerpc64 ABI_V4 Segher Boessenkool
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Segher Boessenkool @ 2015-01-15  1:19 UTC (permalink / raw)
  To: gcc-patches; +Cc: dje.gcc, Segher Boessenkool

UNITS_PER_WORD is 8 with -m32 -mpowerpc64.  Promoting items smaller
than 8 bytes to 4 bytes doesn't make sense.

I tried to fix it the other way around first, promoting everything
smaller than UNITS_PER_WORD to word_mode; this fails all over the
place, because word_mode is bigger than Pmode.  So let's not do that ;-)

Okay for mainline?


Segher


2015-01-14  Segher Boessenkool  <segher@kernel.crashing.org>

gcc/
	* config/rs6000/rs6000.h (PROMOTE_MODE): Correct test for when -m32
	-mpowerpc64 is active.

---
 gcc/config/rs6000/rs6000.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
index c55d7ed..ef6bb2f 100644
--- a/gcc/config/rs6000/rs6000.h
+++ b/gcc/config/rs6000/rs6000.h
@@ -733,7 +733,7 @@ extern unsigned char rs6000_recip_bits[];
 
 #define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE)	\
   if (GET_MODE_CLASS (MODE) == MODE_INT		\
-      && GET_MODE_SIZE (MODE) < UNITS_PER_WORD) \
+      && GET_MODE_SIZE (MODE) < (TARGET_32BIT ? 4 : 8)) \
     (MODE) = TARGET_32BIT ? SImode : DImode;
 
 /* Define this if most significant bit is lowest numbered
-- 
1.8.1.4

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

end of thread, other threads:[~2015-01-16 16:56 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-15  1:19 [PATCH 1/5] rs6000: Fix PROMOTE_MODE for -m32 -mpowerpc64 Segher Boessenkool
2015-01-15  1:47 ` [PATCH 3/5] rs6000: Fix va_start handling for -m32 -mpowerpc64 ABI_V4 Segher Boessenkool
2015-01-15  4:53   ` David Edelsohn
2015-01-15  3:51 ` [PATCH 2/5] rs6000: Fix TARGET_PROMOTE_FUNCTION_MODE Segher Boessenkool
2015-01-15  4:43   ` David Edelsohn
2015-01-15  4:36 ` [PATCH 4/5] rs6000: Introducing rs6000_abi_word_mode Segher Boessenkool
2015-01-15  5:00   ` David Edelsohn
2015-01-15  4:37 ` [PATCH 5/5] rs6000: Do not allow TImode with -m32 -mpowerpc64 Segher Boessenkool
2015-01-15 16:18   ` David Edelsohn
2015-01-16 16:58     ` Segher Boessenkool
2015-01-15  4:39 ` [PATCH 1/5] rs6000: Fix PROMOTE_MODE for " David Edelsohn

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