mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-23 22:34:04 +02:00
sync gcc patches with the Atmel 1.1.3 release
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13480 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
aba33f9a43
commit
9693474f86
File diff suppressed because it is too large
Load Diff
@ -1,25 +0,0 @@
|
||||
Index: gcc-4.2.3/gcc/config/avr32/avr32.opt
|
||||
===================================================================
|
||||
--- gcc-4.2.3.orig/gcc/config/avr32/avr32.opt 2008-05-21 13:45:54.165287871 +0200
|
||||
+++ gcc-4.2.3/gcc/config/avr32/avr32.opt 2008-05-21 13:45:57.194288771 +0200
|
||||
@@ -71,3 +71,6 @@
|
||||
Target Report Var(avr32_imm_in_const_pool) Init(-1)
|
||||
Put large immediates in constant pool. This is enabled by default for archs with insn-cache.
|
||||
|
||||
+mno-pic
|
||||
+Target Report RejectNegative Mask(NO_PIC)
|
||||
+Do not generate position-independent code.
|
||||
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:54.145288116 +0200
|
||||
+++ gcc-4.2.3/gcc/config/avr32/avr32.c 2008-05-21 13:45:57.202289511 +0200
|
||||
@@ -230,6 +230,9 @@
|
||||
avr32_imm_in_const_pool = 0;
|
||||
}
|
||||
|
||||
+ if (TARGET_NO_PIC)
|
||||
+ flag_pic = 0;
|
||||
+
|
||||
avr32_add_gc_roots ();
|
||||
}
|
||||
|
@ -1,16 +0,0 @@
|
||||
Index: gcc-4.2.3/gcc/config/avr32/linux-elf.h
|
||||
===================================================================
|
||||
--- gcc-4.2.3.orig/gcc/config/avr32/linux-elf.h 2008-05-21 13:45:54.173288052 +0200
|
||||
+++ gcc-4.2.3/gcc/config/avr32/linux-elf.h 2008-05-21 13:45:57.862288662 +0200
|
||||
@@ -122,11 +122,6 @@
|
||||
builtin_define ("__AVR32_HAS_BRANCH_PRED__"); \
|
||||
if (TARGET_FAST_FLOAT) \
|
||||
builtin_define ("__AVR32_FAST_FLOAT__"); \
|
||||
- if (flag_pic) \
|
||||
- { \
|
||||
- builtin_define ("__PIC__"); \
|
||||
- builtin_define ("__pic__"); \
|
||||
- } \
|
||||
} \
|
||||
while (0)
|
||||
|
@ -1,14 +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:57.202289511 +0200
|
||||
+++ gcc-4.2.3/gcc/config/avr32/avr32.c 2008-05-21 13:45:58.533289214 +0200
|
||||
@@ -1388,7 +1388,8 @@
|
||||
op1 = copy_to_mode_reg (mode1, op1);
|
||||
}
|
||||
|
||||
- op0 = gen_rtx_MEM (SImode, op0);
|
||||
+ op0 = force_reg (GET_MODE (op0), op0);
|
||||
+ op0 = gen_rtx_MEM (GET_MODE (op0), op0);
|
||||
if (!(*insn_data[icode].operand[1].predicate) (op0, mode0))
|
||||
{
|
||||
error
|
@ -1,46 +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:58.533289214 +0200
|
||||
+++ gcc-4.2.3/gcc/config/avr32/avr32.c 2008-05-21 13:45:59.762288215 +0200
|
||||
@@ -6323,23 +6323,24 @@
|
||||
/* If used any other place than as a pointer or as the
|
||||
destination register we failed */
|
||||
if (!(single_set (scan)
|
||||
- && GET_CODE (PATTERN (scan)) == SET
|
||||
- && ((MEM_P (SET_DEST (PATTERN (scan)))
|
||||
- && REG_P (XEXP (SET_DEST (PATTERN (scan)), 0))
|
||||
- && REGNO (XEXP (SET_DEST (PATTERN (scan)), 0)) ==
|
||||
- REGNO (reg)) || (MEM_P (SET_SRC (PATTERN (scan)))
|
||||
- &&
|
||||
- REG_P (XEXP
|
||||
- (SET_SRC (PATTERN (scan)),
|
||||
- 0))
|
||||
- &&
|
||||
- REGNO (XEXP
|
||||
- (SET_SRC (PATTERN (scan)),
|
||||
- 0)) == REGNO (reg))))
|
||||
- && !(GET_CODE (PATTERN (scan)) == SET
|
||||
- && REG_P (SET_DEST (PATTERN (scan)))
|
||||
- && !regno_use_in (REGNO (reg),
|
||||
- SET_SRC (PATTERN (scan)))))
|
||||
+ && GET_CODE (PATTERN (scan)) == SET
|
||||
+ && ((MEM_P (SET_DEST (PATTERN (scan)))
|
||||
+ && REG_P (XEXP (SET_DEST (PATTERN (scan)), 0))
|
||||
+ && REGNO (XEXP (SET_DEST (PATTERN (scan)), 0)) == REGNO (reg))
|
||||
+ || (MEM_P (SET_SRC (PATTERN (scan)))
|
||||
+ && REG_P (XEXP (SET_SRC (PATTERN (scan)), 0))
|
||||
+ && REGNO (XEXP
|
||||
+ (SET_SRC (PATTERN (scan)), 0)) == REGNO (reg))))
|
||||
+ && !(GET_CODE (PATTERN (scan)) == SET
|
||||
+ && REG_P (SET_DEST (PATTERN (scan)))
|
||||
+ && !regno_use_in (REGNO (reg),
|
||||
+ SET_SRC (PATTERN (scan)))))
|
||||
+ break;
|
||||
+
|
||||
+ /* We cannot replace the pointer in TImode insns
|
||||
+ as these has a differene addressing mode than the other
|
||||
+ memory insns. */
|
||||
+ if ( GET_MODE (SET_DEST (PATTERN (scan))) == TImode )
|
||||
break;
|
||||
|
||||
/* Check if register is dead or set in this insn */
|
@ -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
|
@ -1,15 +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:46:00.342290304 +0200
|
||||
+++ gcc-4.2.3/gcc/config/avr32/avr32.c 2008-05-21 13:46:00.930288105 +0200
|
||||
@@ -705,8 +705,8 @@
|
||||
{
|
||||
if (avr32_const_ok_for_constraint_p (mi_delta, 'I', "Is21"))
|
||||
{
|
||||
- fprintf (file, "\tsub\t%s, -0x%x\n", reg_names[this_regno],
|
||||
- mi_delta);
|
||||
+ fprintf (file, "\tsub\t%s, %d\n", reg_names[this_regno],
|
||||
+ -mi_delta);
|
||||
}
|
||||
else
|
||||
{
|
Loading…
Reference in New Issue
Block a user