This commit is contained in:
Jakub Jelinek 2010-05-25 22:47:11 +00:00
parent b3ac221024
commit 5add3166c1
6 changed files with 63 additions and 112 deletions

View File

@ -1,2 +1,2 @@
fastjar-0.97.tar.gz
gcc-4.4.4-20100518.tar.bz2
gcc-4.4.4-20100525.tar.bz2

View File

@ -44,7 +44,7 @@
Summary: Various compilers (C, C++, Objective-C, Java, ...)
Name: gcc
Version: %{gcc_version}
Release: %{gcc_release}%{?dist}.1
Release: %{gcc_release}%{?dist}
# libgcc, libgfortran, libmudflap, libgomp, libstdc++ and crtstuff have
# GCC Runtime Exception.
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions

View File

@ -1,92 +0,0 @@
2010-05-18 Jakub Jelinek <jakub@redhat.com>
* dwarf2out.c (new_loc_descr_op_bit_piece): Add offset
argument. Don't use DW_OP_piece if offset is non-zero,
put offset into second DW_OP_bit_piece argument.
(dw_sra_loc_expr): Adjust callers. For memory expressions
compute offset.
--- gcc/dwarf2out.c.jj 2010-05-15 08:09:16.000000000 +0200
+++ gcc/dwarf2out.c 2010-05-18 15:49:26.000000000 +0200
@@ -14364,12 +14364,12 @@ dw_loc_list_1 (tree loc, rtx varloc, int
if it is not possible. */
static dw_loc_descr_ref
-new_loc_descr_op_bit_piece (HOST_WIDE_INT bitsize)
+new_loc_descr_op_bit_piece (HOST_WIDE_INT bitsize, HOST_WIDE_INT offset)
{
- if ((bitsize % BITS_PER_UNIT) == 0)
+ if ((bitsize % BITS_PER_UNIT) == 0 && offset == 0)
return new_loc_descr (DW_OP_piece, bitsize / BITS_PER_UNIT, 0);
else if (dwarf_version >= 3 || !dwarf_strict)
- return new_loc_descr (DW_OP_bit_piece, bitsize, 0);
+ return new_loc_descr (DW_OP_bit_piece, bitsize, offset);
else
return NULL;
}
@@ -14448,7 +14448,7 @@ dw_sra_loc_expr (tree decl, rtx loc)
if (padsize > decl_size)
return NULL;
decl_size -= padsize;
- *descr_tail = new_loc_descr_op_bit_piece (padsize);
+ *descr_tail = new_loc_descr_op_bit_piece (padsize, 0);
if (*descr_tail == NULL)
return NULL;
descr_tail = &(*descr_tail)->dw_loc_next;
@@ -14461,7 +14461,46 @@ dw_sra_loc_expr (tree decl, rtx loc)
decl_size -= bitsize;
if (last == NULL)
{
- *descr_tail = new_loc_descr_op_bit_piece (bitsize);
+ HOST_WIDE_INT offset = 0;
+ if (GET_CODE (varloc) == VAR_LOCATION
+ && GET_CODE (PAT_VAR_LOCATION_LOC (varloc)) != PARALLEL)
+ {
+ varloc = PAT_VAR_LOCATION_LOC (varloc);
+ if (GET_CODE (varloc) == EXPR_LIST)
+ varloc = XEXP (varloc, 0);
+ }
+ do
+ {
+ if (GET_CODE (varloc) == CONST
+ || GET_CODE (varloc) == SIGN_EXTEND
+ || GET_CODE (varloc) == ZERO_EXTEND)
+ varloc = XEXP (varloc, 0);
+ else if (GET_CODE (varloc) == SUBREG)
+ varloc = SUBREG_REG (varloc);
+ else
+ break;
+ }
+ while (1);
+ /* DW_OP_bit_size offset should be zero for register
+ or implicit location descriptions and empty location
+ descriptions, but for memory addresses needs big endian
+ adjustment. */
+ if (MEM_P (varloc)
+ && ((unsigned HOST_WIDE_INT) INTVAL (MEM_SIZE (varloc))
+ * BITS_PER_UNIT) != bitsize)
+ {
+ unsigned HOST_WIDE_INT memsize
+ = INTVAL (MEM_SIZE (varloc)) * BITS_PER_UNIT;
+ if (BYTES_BIG_ENDIAN != WORDS_BIG_ENDIAN
+ && (memsize > BITS_PER_WORD || bitsize > BITS_PER_WORD))
+ return NULL;
+ if (memsize < bitsize)
+ return NULL;
+ if (BITS_BIG_ENDIAN)
+ offset = memsize - bitsize;
+ }
+
+ *descr_tail = new_loc_descr_op_bit_piece (bitsize, offset);
if (*descr_tail == NULL)
return NULL;
descr_tail = &(*descr_tail)->dw_loc_next;
@@ -14472,7 +14511,7 @@ dw_sra_loc_expr (tree decl, rtx loc)
the decl. */
if (descr != NULL && decl_size != 0)
{
- *descr_tail = new_loc_descr_op_bit_piece (decl_size);
+ *descr_tail = new_loc_descr_op_bit_piece (decl_size, 0);
if (*descr_tail == NULL)
return NULL;
}

View File

@ -1,17 +0,0 @@
2008-01-25 Jakub Jelinek <jakub@redhat.com>
* lang.c (java_classify_record): Revert 2007-12-20 change.
--- gcc/java/lang.c 2007-12-27 09:09:49.000000000 +0100
+++ gcc/java/lang.c 2008-01-25 17:43:57.000000000 +0100
@@ -965,9 +965,7 @@ java_classify_record (tree type)
if (! CLASS_P (type))
return RECORD_IS_STRUCT;
- /* ??? GDB does not support DW_TAG_interface_type as of December,
- 2007. Re-enable this at a later time. */
- if (0 && CLASS_INTERFACE (TYPE_NAME (type)))
+ if (CLASS_INTERFACE (TYPE_NAME (type)))
return RECORD_IS_INTERFACE;
return RECORD_IS_CLASS;

60
gcc44-pr44199.patch Normal file
View File

@ -0,0 +1,60 @@
2010-05-20 Jakub Jelinek <jakub@redhat.com>
PR target/44199
* config/rs6000/rs6000.c (rs6000_emit_epilogue): If cfun->calls_alloca
or total_size is larger than red zone size for non-V4 ABI, emit a
stack_tie resp. frame_tie insn before stack pointer restore.
* config/rs6000/rs6000.md (frame_tie): New insn.
--- gcc/config/rs6000/rs6000.c.jj 2010-05-17 07:52:06.000000000 +0200
+++ gcc/config/rs6000/rs6000.c 2010-05-19 22:15:53.000000000 +0200
@@ -19775,6 +19775,16 @@ rs6000_emit_epilogue (int sibcall)
frame_reg_rtx = sp_reg_rtx;
if (DEFAULT_ABI == ABI_V4)
frame_reg_rtx = gen_rtx_REG (Pmode, 11);
+ /* Prevent reordering memory accesses against stack pointer restore. */
+ else if (cfun->calls_alloca
+ || offset_below_red_zone_p (-info->total_size))
+ {
+ rtx mem1 = gen_rtx_MEM (BLKmode, hard_frame_pointer_rtx);
+ rtx mem2 = gen_rtx_MEM (BLKmode, sp_reg_rtx);
+ MEM_NOTRAP_P (mem1) = 1;
+ MEM_NOTRAP_P (mem2) = 1;
+ emit_insn (gen_frame_tie (mem1, mem2));
+ }
insn = emit_insn (gen_add3_insn (frame_reg_rtx, hard_frame_pointer_rtx,
GEN_INT (info->total_size)));
@@ -19784,6 +19794,14 @@ rs6000_emit_epilogue (int sibcall)
&& DEFAULT_ABI != ABI_V4
&& !crtl->calls_eh_return)
{
+ /* Prevent reordering memory accesses against stack pointer restore. */
+ if (cfun->calls_alloca
+ || offset_below_red_zone_p (-info->total_size))
+ {
+ rtx mem = gen_rtx_MEM (BLKmode, sp_reg_rtx);
+ MEM_NOTRAP_P (mem) = 1;
+ emit_insn (gen_stack_tie (mem));
+ }
insn = emit_insn (gen_add3_insn (sp_reg_rtx, sp_reg_rtx,
GEN_INT (info->total_size)));
sp_offset = 0;
--- gcc/config/rs6000/rs6000.md.jj 2010-03-26 17:13:37.000000000 +0100
+++ gcc/config/rs6000/rs6000.md 2010-05-19 22:15:19.000000000 +0200
@@ -15286,6 +15286,15 @@ (define_insn "stack_tie"
""
[(set_attr "length" "0")])
+; Like stack_tie, but depend on both fp and sp based memory.
+(define_insn "frame_tie"
+ [(set (match_operand:BLK 0 "memory_operand" "+m")
+ (unspec:BLK [(match_dup 0)
+ (match_operand:BLK 1 "memory_operand" "m")] UNSPEC_TIE))]
+ ""
+ ""
+ [(set_attr "length" "0")])
+
(define_expand "epilogue"
[(use (const_int 0))]

View File

@ -1,2 +1,2 @@
2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz
b7e838fc8d20ea7431118b45d6a7ecca gcc-4.4.4-20100518.tar.bz2
c413ea290fdbe54dbd60816ad80857a1 gcc-4.4.4-20100525.tar.bz2