You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
freifunkist-firmware/toolchain/gcc/patches/arc-2016.03/001-revert_register_mode_se...

66 lines
2.4 KiB

toolchain: add support of ARC architecture This includes binutils, gcc, gdb and uClibc-ng. Latest release of ARC gcc (as of today it is "arc-2015.06") is based on upstream gcc 4.8.4. Sources are available on GitHub, see: https://github.com/foss-for-synopsys-dwc-arc-processors/gcc Latest release of ARC binutils (as of today it is "arc-2015.06") is based on upstream binutils 2.23. Sources are available on GitHub, see: https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/releases/tag/arc-2015.06 Latest release of ARC GDB (as of today this is "arc-2015.06-gdb") is based on upstream gdb 7.9.1. Sources are available on GitHub, see: https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/releases/tag/arc-2015.06-gdb Note that for binutils and gdb that come from unified git repository (which is the case for upstream binutils/gdb today) we need to disable building of gdb in binutils and binutils in gdb hence in binutils: ------>8------ --disable-sim --disable-gdb ------>8------ and in gdb: ------>8------ --disable-binutils --disable-ld --disable-gas ------>8------ Also in gdb we disable sim because if the following breakage while building with it: ------------>8------------ /usr/bin/env bash ./../common/genmloop.sh -shell /usr/bin/env bash \ -mono -fast -pbb -switch sem5-switch.c \ -cpu a5f -infile ./mloop5.in \ -outfile-suffix 5 unknown option: bash Makefile:699: recipe for target 'stamp-5mloop' failed make[7]: *** [stamp-5mloop] Error 1 ------------>8------------ Cc: Felix Fietkau <nbd@openwrt.org> Cc: John Crispin <blogic@openwrt.org> Cc: Jonas Gorski <jogo@openwrt.org> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> SVN-Revision: 47438
9 years ago
Revert of:
commit 275035b56823b26d5fb7e90fad945b998648edf2
Author: bergner <bergner@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Thu Sep 5 14:09:07 2013 +0000
PR target/58139
* reginfo.c (choose_hard_reg_mode): Scan through all mode classes
looking for widest mode.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202286 138bc75d-0d04-0410-961f-82ee72b054a4
--- a/gcc/reginfo.c
+++ b/gcc/reginfo.c
@@ -620,35 +620,40 @@ choose_hard_reg_mode (unsigned int regno
mode = GET_MODE_WIDER_MODE (mode))
if ((unsigned) hard_regno_nregs[regno][mode] == nregs
&& HARD_REGNO_MODE_OK (regno, mode)
- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))
- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode))
+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)))
found_mode = mode;
+ if (found_mode != VOIDmode)
+ return found_mode;
+
for (mode = GET_CLASS_NARROWEST_MODE (MODE_FLOAT);
mode != VOIDmode;
mode = GET_MODE_WIDER_MODE (mode))
if ((unsigned) hard_regno_nregs[regno][mode] == nregs
&& HARD_REGNO_MODE_OK (regno, mode)
- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))
- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode))
+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)))
found_mode = mode;
+ if (found_mode != VOIDmode)
+ return found_mode;
+
for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_FLOAT);
mode != VOIDmode;
mode = GET_MODE_WIDER_MODE (mode))
if ((unsigned) hard_regno_nregs[regno][mode] == nregs
&& HARD_REGNO_MODE_OK (regno, mode)
- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))
- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode))
+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)))
found_mode = mode;
+ if (found_mode != VOIDmode)
+ return found_mode;
+
for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_INT);
mode != VOIDmode;
mode = GET_MODE_WIDER_MODE (mode))
if ((unsigned) hard_regno_nregs[regno][mode] == nregs
&& HARD_REGNO_MODE_OK (regno, mode)
- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))
- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode))
+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)))
found_mode = mode;
if (found_mode != VOIDmode)