summaryrefslogtreecommitdiff
path: root/meta/packages/gcc/gcc-3.3.4/arm-ldm.dpatch
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2008-03-17 11:53:45 +0000
committerRichard Purdie <richard@openedhand.com>2008-03-17 11:53:45 +0000
commita619546dc4c209b75e15f4384a974a3f397c1327 (patch)
tree263f104aee409f6050adbee39ff5e65ccd6864ce /meta/packages/gcc/gcc-3.3.4/arm-ldm.dpatch
parentf2888e8164ff305ffdca06c057e764499e445128 (diff)
downloadopenembedded-core-a619546dc4c209b75e15f4384a974a3f397c1327.tar.gz
openembedded-core-a619546dc4c209b75e15f4384a974a3f397c1327.tar.bz2
openembedded-core-a619546dc4c209b75e15f4384a974a3f397c1327.tar.xz
openembedded-core-a619546dc4c209b75e15f4384a974a3f397c1327.zip
gcc: Drop 3.3.4
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4018 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/gcc/gcc-3.3.4/arm-ldm.dpatch')
-rw-r--r--meta/packages/gcc/gcc-3.3.4/arm-ldm.dpatch148
1 files changed, 0 insertions, 148 deletions
diff --git a/meta/packages/gcc/gcc-3.3.4/arm-ldm.dpatch b/meta/packages/gcc/gcc-3.3.4/arm-ldm.dpatch
deleted file mode 100644
index 561624f39..000000000
--- a/meta/packages/gcc/gcc-3.3.4/arm-ldm.dpatch
+++ /dev/null
@@ -1,148 +0,0 @@
-#! /bin/sh -e
-
-src=gcc
-if [ $# -eq 3 -a "$2" = '-d' ]; then
- pdir="-d $3"
- src=$3/gcc
-elif [ $# -ne 1 ]; then
- echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
- exit 1
-fi
-case "$1" in
- -patch)
- patch $pdir -f --no-backup-if-mismatch -p0 --fuzz 10 < $0
- ;;
- -unpatch)
- patch $pdir -f --no-backup-if-mismatch -R -p0 --fuzz 10 < $0
- ;;
- *)
- echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
- exit 1
-esac
-exit 0
-
-# DP: try harder to avoid ldm in function epilogues
-
---- gcc/config/arm/arm.c Fri Mar 5 18:49:42 2004
-+++ gcc/config/arm/arm.c Fri Mar 5 16:00:21 2004
-@@ -7598,6 +7629,26 @@
- return_used_this_function = 0;
- }
-
-+/* Return the number (counting from 0) of
-+ the least significant set bit in MASK. */
-+
-+#ifdef __GNUC__
-+inline
-+#endif
-+static int
-+number_of_first_bit_set (mask)
-+ int mask;
-+{
-+ int bit;
-+
-+ for (bit = 0;
-+ (mask & (1 << bit)) == 0;
-+ ++bit)
-+ continue;
-+
-+ return bit;
-+}
-+
- const char *
- arm_output_epilogue (really_return)
- int really_return;
-@@ -7788,27 +7839,47 @@
- saved_regs_mask |= (1 << PC_REGNUM);
- }
-
-- /* Load the registers off the stack. If we only have one register
-- to load use the LDR instruction - it is faster. */
-- if (saved_regs_mask == (1 << LR_REGNUM))
-- {
-- /* The exception handler ignores the LR, so we do
-- not really need to load it off the stack. */
-- if (eh_ofs)
-- asm_fprintf (f, "\tadd\t%r, %r, #4\n", SP_REGNUM, SP_REGNUM);
-- else
-- asm_fprintf (f, "\tldr\t%r, [%r], #4\n", LR_REGNUM, SP_REGNUM);
-- }
-- else if (saved_regs_mask)
-+ if (saved_regs_mask)
- {
-- if (saved_regs_mask & (1 << SP_REGNUM))
-- /* Note - write back to the stack register is not enabled
-- (ie "ldmfd sp!..."). We know that the stack pointer is
-- in the list of registers and if we add writeback the
-- instruction becomes UNPREDICTABLE. */
-- print_multi_reg (f, "ldmfd\t%r", SP_REGNUM, saved_regs_mask);
-+ /* Load the registers off the stack. If we only have one register
-+ to load use the LDR instruction - it is faster. */
-+ if (bit_count (saved_regs_mask) == 1)
-+ {
-+ int reg = number_of_first_bit_set (saved_regs_mask);
-+
-+ switch (reg)
-+ {
-+ case SP_REGNUM:
-+ /* Mustn't use base writeback when loading SP. */
-+ asm_fprintf (f, "\tldr\t%r, [%r]\n", SP_REGNUM, SP_REGNUM);
-+ break;
-+
-+ case LR_REGNUM:
-+ if (eh_ofs)
-+ {
-+ /* The exception handler ignores the LR, so we do
-+ not really need to load it off the stack. */
-+ asm_fprintf (f, "\tadd\t%r, %r, #4\n", SP_REGNUM, SP_REGNUM);
-+ break;
-+ }
-+ /* else fall through */
-+
-+ default:
-+ asm_fprintf (f, "\tldr\t%r, [%r], #4\n", reg, SP_REGNUM);
-+ break;
-+ }
-+ }
- else
-- print_multi_reg (f, "ldmfd\t%r!", SP_REGNUM, saved_regs_mask);
-+ {
-+ if (saved_regs_mask & (1 << SP_REGNUM))
-+ /* Note - write back to the stack register is not enabled
-+ (ie "ldmfd sp!..."). We know that the stack pointer is
-+ in the list of registers and if we add writeback the
-+ instruction becomes UNPREDICTABLE. */
-+ print_multi_reg (f, "ldmfd\t%r", SP_REGNUM, saved_regs_mask);
-+ else
-+ print_multi_reg (f, "ldmfd\t%r!", SP_REGNUM, saved_regs_mask);
-+ }
- }
-
- if (current_function_pretend_args_size)
-@@ -9610,26 +9677,6 @@
- }
- }
-
--/* Return the number (counting from 0) of
-- the least significant set bit in MASK. */
--
--#ifdef __GNUC__
--inline
--#endif
--static int
--number_of_first_bit_set (mask)
-- int mask;
--{
-- int bit;
--
-- for (bit = 0;
-- (mask & (1 << bit)) == 0;
-- ++bit)
-- continue;
--
-- return bit;
--}
--
- /* Generate code to return from a thumb function.
- If 'reg_containing_return_addr' is -1, then the return address is
- actually on the stack, at the stack pointer. */