diff options
author | Imre Kaloz <kaloz@openwrt.org> | 2008-12-02 18:32:02 +0000 |
---|---|---|
committer | Imre Kaloz <kaloz@openwrt.org> | 2008-12-02 18:32:02 +0000 |
commit | 3e2defe46a70ddfd05e7efadec63f0ee83bf0acb (patch) | |
tree | 4b3ae317cefaaa1b16c453aed519d6e457cbcfcf /toolchain/gcc/patches/4.2.3/906-avr32_use_rjmp_instead_of_got_when_jumping.patch | |
parent | 5977aa09bce60fc956ec5b727ca7f21649681369 (diff) | |
download | master-187ad058-3e2defe46a70ddfd05e7efadec63f0ee83bf0acb.tar.gz master-187ad058-3e2defe46a70ddfd05e7efadec63f0ee83bf0acb.tar.bz2 master-187ad058-3e2defe46a70ddfd05e7efadec63f0ee83bf0acb.zip |
nuke old gcc 4.2 versions
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13483 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'toolchain/gcc/patches/4.2.3/906-avr32_use_rjmp_instead_of_got_when_jumping.patch')
-rw-r--r-- | toolchain/gcc/patches/4.2.3/906-avr32_use_rjmp_instead_of_got_when_jumping.patch | 85 |
1 files changed, 0 insertions, 85 deletions
diff --git a/toolchain/gcc/patches/4.2.3/906-avr32_use_rjmp_instead_of_got_when_jumping.patch b/toolchain/gcc/patches/4.2.3/906-avr32_use_rjmp_instead_of_got_when_jumping.patch deleted file mode 100644 index 401beccea8..0000000000 --- a/toolchain/gcc/patches/4.2.3/906-avr32_use_rjmp_instead_of_got_when_jumping.patch +++ /dev/null @@ -1,85 +0,0 @@ -Index: gcc-4.2.3/gcc/config/avr32/avr32.c -=================================================================== ---- gcc-4.2.3.orig/gcc/config/avr32/avr32.c 2008-05-21 13:45:59.762288215 +0200 -+++ gcc-4.2.3/gcc/config/avr32/avr32.c 2008-05-21 13:46:00.342290304 +0200 -@@ -695,8 +695,7 @@ - - - if (!avr32_const_ok_for_constraint_p (mi_delta, 'I', "Is21") -- || vcall_offset -- || flag_pic) -+ || vcall_offset) - { - fputs ("\tpushm\tlr\n", file); - } -@@ -728,47 +727,23 @@ - } - - -- if ( (!avr32_const_ok_for_constraint_p (mi_delta, 'I', "Is21") -- || vcall_offset) -- && !flag_pic ) -+ if (!avr32_const_ok_for_constraint_p (mi_delta, 'I', "Is21") -+ || vcall_offset) - { - fputs ("\tpopm\tlr\n", file); - } -- -- if (flag_pic) -- { -- /* Load the got into lr and then load the pointer -- to the function from the got and put it on the stack. -- We can then call the function and restore lr by issuing -- a doubleword load from the stack. We do not use a popm/ldm -- since it will be treated as a return and might need a flushing -- of the return-stack if available. */ -- rtx label = gen_label_rtx (); -- /* Load the got. */ -- fputs ("\tlddpc\tlr, 0f\n", file); -- (*targetm.asm_out.internal_label) (file, "L", -- CODE_LABEL_NUMBER (label)); -- fputs ("\trsub\tlr, pc\n", file); -- /* Load the function pointer. */ -- fputs ("\tld.w\tlr, lr[", file); -- assemble_name (file, XSTR (XEXP (DECL_RTL (function), 0), 0)); -- fputs ("@got]\n", file); -- /* Push the function pointer on the stack.*/ -- fputs ("\tpushm\tlr\n", file); -- /* Restore the old lr value and load the function pointer into -- pc. */ -- fputs ("\tld.d\tlr,sp++\n", file); -- fprintf (file, "\t.align 2\n"); -- fprintf (file, "0:\t.long\t.L%d - _GLOBAL_OFFSET_TABLE_\n", CODE_LABEL_NUMBER (label)); -- } -- else -- { -- fprintf (file, "\tlddpc\tpc, 0f\n"); -- fprintf (file, "\t.align 2\n"); -- fputs ("0:\t.long\t", file); -- assemble_name (file, XSTR (XEXP (DECL_RTL (function), 0), 0)); -- fputc ('\n', file); -- } -+ -+ /* Jump to the function. We assume that we can use an rjmp since the -+ function to jump to is local and probably not too far away from -+ the thunk. If this assumption proves to be wrong we could implement -+ this jump by calculating the offset between the jump source and destination -+ and put this in the constant pool and then perform an add to pc. -+ This would also be legitimate PIC code. But for now we hope that an rjmp -+ will be sufficient... -+ */ -+ fputs ("\trjmp\t", file); -+ assemble_name (file, XSTR (XEXP (DECL_RTL (function), 0), 0)); -+ fputc ('\n', file); - } - - /* Implements target hook vector_mode_supported. */ -@@ -1742,7 +1717,7 @@ - if (TREE_CODE (*node) != FUNCTION_DECL) - { - warning ("`%s' attribute only applies to functions", -- IDENTIFIER_POINTER (name)); -+ IDENTIFIER_POINTER (name)); - *no_add_attrs = true; - } - /* FIXME: the argument if any is checked for type attributes; should it |