This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi, On MIPS it is better sometimes not to use the word mode (DImode) but rather SImode. The main reason is for 32bits, the value has to be sign extended to 64bits so using the 32bit instruction for insertion is allows for that to happen automatically. This patch implements this by adding a target hook which returns the modes which are valid for doing the insertion and modifying store_bit_field_1 to use them if they exists. OK? Bootstrapped and tested on both x86_64-linux-gnu and mips64-linux-gnu with no regressions. Thanks, Andrew Pinski * target.h (gcc_target): Add mode_for_extraction_insv. * expmed.c (store_bit_field_1): Use mode_for_extraction_insv and split out into ... (store_bit_field_2): Here. * target-def.h (TARGET_MODE_FOR_EXTRACTION_INSV): Define. (TARGET_INITIALIZER): Add TARGET_MODE_FOR_EXTRACTION_INSV. * config/mips/mips.c (mips_mode_for_extraction_insv): New function. (TARGET_MODE_FOR_EXTRACTION_INSV): Define.
Attachment:
extraction.diff.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |