diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2007-02-01 01:09:35 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2007-02-01 01:09:35 +0000 |
commit | e53a16e75f3cbaaa46e5ce2fc1ed449a18eef7d9 (patch) | |
tree | ef18ae23759d8cebf30524fd23a40023979adb9e /gcc/dwarf2out.c | |
parent | 15c48c45f552564d65a3cc869b2a8f896492f05f (diff) | |
download | gcc-e53a16e75f3cbaaa46e5ce2fc1ed449a18eef7d9.zip gcc-e53a16e75f3cbaaa46e5ce2fc1ed449a18eef7d9.tar.gz gcc-e53a16e75f3cbaaa46e5ce2fc1ed449a18eef7d9.tar.bz2 |
lower-subreg.c: New file.
gcc/:
* lower-subreg.c: New file.
* rtl.def (CONCATN): Define.
* passes.c (init_optimization_passes): Add pass_lower_subreg and
pass_lower_subreg2.
* emit-rtl.c (update_reg_offset): New static function, broken out
of gen_rtx_REG_offset.
(gen_rtx_REG_offset): Call update_reg_offset.
(gen_reg_rtx_offset): New function.
* regclass.c: Revert patch of 2006-03-05, restoring
reg_scan_update.
(clear_reg_info_regno): New function.
* dwarf2out.c (concatn_loc_descriptor): New static function.
(loc_descriptor): Handle CONCATN.
* common.opt (fsplit_wide_types): New option.
* opts.c (decode_options): Set flag_split_wide_types when
optimizing.
* timevar.def (TV_LOWER_SUBREG): Define.
* rtl.h (gen_reg_rtx_offset): Declare.
(reg_scan_update): Declare.
* regs.h (clear_reg_info_regno): Declare.
* tree-pass.h (pass_lower_subreg): Declare.
(pass_lower_subreg2): Declare.
* doc/invoke.texi (Option Summary): List -fno-split-wide-types.
(Optimize Options): Add -fsplit-wide-types to -O1 list. Document
-fsplit-wide-types.
* doc/rtl.texi (Regs and Memory): Document concat and concatn.
* Makefile.in (OBJS-common): Add lower-subreg.o.
(lower-subreg.o): New target.
gcc/testsuite/:
* gcc.dg/lower-subreg-1.c (test): New test.
From-SVN: r121453
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 2968d3b..861ede5 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -1,6 +1,6 @@ /* Output Dwarf2 format symbol table information from GCC. Copyright (C) 1992, 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, - 2003, 2004, 2005, 2006 Free Software Foundation, Inc. + 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. Contributed by Gary Funck (gary@intrepid.com). Derived from DWARF 1 implementation of Ron Guilmette (rfg@monkeys.com). Extensively modified by Jason Merrill (jason@cygnus.com). @@ -9043,6 +9043,32 @@ concat_loc_descriptor (rtx x0, rtx x1) return cc_loc_result; } +/* Return a descriptor that describes the concatenation of N + locations. */ + +static dw_loc_descr_ref +concatn_loc_descriptor (rtx concatn) +{ + unsigned int i; + dw_loc_descr_ref cc_loc_result = NULL; + unsigned int n = XVECLEN (concatn, 0); + + for (i = 0; i < n; ++i) + { + dw_loc_descr_ref ref; + rtx x = XVECEXP (concatn, 0, i); + + ref = loc_descriptor (x); + if (ref == NULL) + return NULL; + + add_loc_descr (&cc_loc_result, ref); + add_loc_descr_op_piece (&cc_loc_result, GET_MODE_SIZE (GET_MODE (x))); + } + + return cc_loc_result; +} + /* Output a proper Dwarf location descriptor for a variable or parameter which is either allocated in a register or in a memory location. For a register, we just generate an OP_REG and the register number. For a @@ -9080,6 +9106,10 @@ loc_descriptor (rtx rtl) loc_result = concat_loc_descriptor (XEXP (rtl, 0), XEXP (rtl, 1)); break; + case CONCATN: + loc_result = concatn_loc_descriptor (rtl); + break; + case VAR_LOCATION: /* Single part. */ if (GET_CODE (XEXP (rtl, 1)) != PARALLEL) |