From ca97b221ce77e693274135e3dbba50221bf298a3 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Sat, 25 Aug 2012 21:33:15 +0000 Subject: mips.h (CASE_VECTOR_MODE): For not TARGET_MIPS16_SHORT_JUMP_TABLES use ptr_mode. 2012-08-25 Richard Sandiford Andrew Pinski * config/mips/mips.h (CASE_VECTOR_MODE): For not TARGET_MIPS16_SHORT_JUMP_TABLES use ptr_mode. (CASE_VECTOR_SHORTEN_MODE): Likewise. Co-Authored-By: Andrew Pinski From-SVN: r190670 --- gcc/ChangeLog | 7 +++++++ gcc/config/mips/mips.h | 7 ++++--- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1a822cb..bdddb2d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2012-08-25 Richard Sandiford + Andrew Pinski + + * config/mips/mips.h (CASE_VECTOR_MODE): For not + TARGET_MIPS16_SHORT_JUMP_TABLES use ptr_mode. + (CASE_VECTOR_SHORTEN_MODE): Likewise. + 2012-08-25 Uros Bizjak * config/i386/i386.h (FP_REG_P): Remove macro. diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index 9ff36b3..08c9f53 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -2336,12 +2336,13 @@ typedef struct mips_args { #define JUMP_TABLES_IN_TEXT_SECTION TARGET_MIPS16_SHORT_JUMP_TABLES -#define CASE_VECTOR_MODE SImode +#define CASE_VECTOR_MODE (TARGET_MIPS16_SHORT_JUMP_TABLES ? SImode : ptr_mode) /* Only use short offsets if their range will not overflow. */ #define CASE_VECTOR_SHORTEN_MODE(MIN, MAX, BODY) \ - (TARGET_MIPS16_SHORT_JUMP_TABLES && ((MIN) >= -32768 && (MAX) < 32768) \ - ? HImode : SImode) + (!TARGET_MIPS16_SHORT_JUMP_TABLES ? ptr_mode \ + : ((MIN) >= -32768 && (MAX) < 32768) ? HImode \ + : SImode) #define CASE_VECTOR_PC_RELATIVE TARGET_MIPS16_SHORT_JUMP_TABLES -- cgit v1.1