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, This patch intends to minimize the use of literal pool for some armv7-m targets that have slower speed to load data from flash than to fetch instruction from flash. The normal literal load instruction is now replaced by MOVW/MOVT instructions. A new option -mslow-flash-data is created for this purpose. So far this feature doesn't support PIC code and target that isn't based on armv7-m. Tested with GCC regression test on QEMU for cortex-m3. No new regressions. Is it OK to trunk? BR, Terry 2013-11-06 Terry Guo <terry.guo@arm.com> * doc/invoke.texi (-mslow-flash-data): Document new option. * config/arm/arm.opt (mslow-flash-data): New option. * config/arm/arm-protos.h (arm_max_const_double_inline_cost): Declare it. * config/arm/arm.h (TARGET_USE_MOVT): Always true when disable literal pools. (arm_disable_literal_pool): Declare it. * config/arm/arm.c (arm_disable_literal_pool): New variable. (arm_option_override): Handle new option. (thumb2_legitimate_address_p): Invalid certain address format. (arm_max_const_double_inline_cost): New function. * config/arm/arm.md (types.md): Include it a little earlier. (use_literal_pool): New attribute. (enabled): Use new attribute. (split pattern): Replace symbol+offset with MOVW/MOVT.
Attachment:
cortex-m-slow-flash-data.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |