diff options
author | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-06-17 07:44:34 +0000 |
---|---|---|
committer | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-06-17 07:44:34 +0000 |
commit | e2747d8e52fb729f8c3f0587ba78d6a9f9b557de (patch) | |
tree | 47bf64b7525380c0fcb2e8b135932f35b4787703 | |
parent | 4d7496d1ce1fed56edf383c08a11d44d336a06f0 (diff) |
* dwarf2out.c (mem_loc_descriptor): Handle DIV, MOD, AND, IOR,var-tracking-assignments-4_4-merge-148582-before
XOR, NOT, ABS and NEG. Accept but discard EQ, GE, GT, LE, LT,
NE, COMPARE, IF_THEN_ELSE, SMIN, SMAX, ROTATE, ROTATERT,
TRUNCATE, and several operations that cannot be represented
with DWARF opcodes.
(mem_loc_descriptor): Fail more verbosely on unrecognized RTL,
but only with checking enabled.
(loc_descriptor): Limit expansion to types narrower than
pointers.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/var-tracking-assignments-4_4-branch@148582 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog.vta | 12 | ||||
-rw-r--r-- | gcc/dwarf2out.c | 108 |
2 files changed, 119 insertions, 1 deletions
diff --git a/gcc/ChangeLog.vta b/gcc/ChangeLog.vta index a0287e1b9b0..5e592074b62 100644 --- a/gcc/ChangeLog.vta +++ b/gcc/ChangeLog.vta @@ -1,5 +1,17 @@ 2009-06-17 Alexandre Oliva <aoliva@redhat.com> + * dwarf2out.c (mem_loc_descriptor): Handle DIV, MOD, AND, IOR, + XOR, NOT, ABS and NEG. Accept but discard EQ, GE, GT, LE, LT, + NE, COMPARE, IF_THEN_ELSE, SMIN, SMAX, ROTATE, ROTATERT, + TRUNCATE, and several operations that cannot be represented + with DWARF opcodes. + (mem_loc_descriptor): Fail more verbosely on unrecognized RTL, + but only with checking enabled. + (loc_descriptor): Limit expansion to types narrower than + pointers. + +2009-06-17 Alexandre Oliva <aoliva@redhat.com> + * doc/invoke.texi (-fmin-insn-uid): Changed to... (param min-nondebug-insn-uid): ... this. * params.def (PARAM_MIN_NONDEBUG_INSN_UID): New. diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 563e4b9532b..75a09a10831 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -10278,6 +10278,14 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode, op = DW_OP_mul; goto do_binop; + case DIV: + op = DW_OP_div; + goto do_binop; + + case MOD: + op = DW_OP_mod; + goto do_binop; + case ASHIFT: op = DW_OP_shl; goto do_binop; @@ -10290,6 +10298,18 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode, op = DW_OP_shr; goto do_binop; + case AND: + op = DW_OP_and; + goto do_binop; + + case IOR: + op = DW_OP_or; + goto do_binop; + + case XOR: + op = DW_OP_xor; + goto do_binop; + do_binop: { dw_loc_descr_ref op0 = mem_loc_descriptor (XEXP (rtl, 0), mode, @@ -10306,6 +10326,31 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode, break; } + case NOT: + op = DW_OP_not; + goto do_unop; + + case ABS: + op = DW_OP_abs; + goto do_unop; + + case NEG: + op = DW_OP_neg; + goto do_unop; + + do_unop: + { + dw_loc_descr_ref op0 = mem_loc_descriptor (XEXP (rtl, 0), mode, + VAR_INIT_STATUS_INITIALIZED); + + if (op0 == 0) + break; + + mem_loc_result = op0; + add_loc_descr (&mem_loc_result, new_loc_descr (op, 0, 0)); + break; + } + case CONST_INT: mem_loc_result = int_loc_descriptor (INTVAL (rtl)); break; @@ -10315,6 +10360,61 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode, VAR_INIT_STATUS_INITIALIZED); break; + /* Conditionals in GCC are supposed to eval to STORE_FLAG_VALUE + or zero, rather than 1 or 0, so leave these alone for now. */ + case EQ: + case GE: + case GT: + case LE: + case LT: + case NE: + case COMPARE: + case IF_THEN_ELSE: + case SMIN: + case SMAX: + case ROTATE: + case ROTATERT: + case TRUNCATE: + /* In theory, we could implement the above. */ + /* DWARF cannot represent the unsigned compare operations + natively. */ + case GEU: + case GTU: + case LEU: + case LTU: + case SS_MULT: + case US_MULT: + case SS_DIV: + case US_DIV: + case UDIV: + case UMOD: + case UMIN: + case UMAX: + case UNORDERED: + case ORDERED: + case UNEQ: + case UNGE: + case UNLE: + case UNLT: + case LTGT: + case FLOAT_EXTEND: + case FLOAT_TRUNCATE: + case FLOAT: + case UNSIGNED_FLOAT: + case FIX: + case UNSIGNED_FIX: + case FRACT_CONVERT: + case UNSIGNED_FRACT_CONVERT: + case SAT_FRACT: + case UNSIGNED_SAT_FRACT: + case SQRT: + case BSWAP: + case FFS: + case CLZ: + case CTZ: + case POPCOUNT: + case PARITY: + case ASM_OPERANDS: case UNSPEC: /* If delegitimize_address couldn't do anything with the UNSPEC, we can't express it in the debug info. This can happen e.g. with some @@ -10326,7 +10426,12 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode, goto symref; default: +#ifdef ENABLE_CHECKING + print_rtl (stderr, rtl); gcc_unreachable (); +#else + break; +#endif } if (mem_loc_result && initialized == VAR_INIT_STATUS_UNINITIALIZED) @@ -10671,7 +10776,8 @@ loc_descriptor (rtx rtl, enum machine_mode mode, break; default: - if (GET_MODE_CLASS (mode) == MODE_INT && GET_MODE (rtl) == mode) + if (GET_MODE_CLASS (mode) == MODE_INT && GET_MODE (rtl) == mode + && GET_MODE_BITSIZE (GET_MODE (rtl)) <= GET_MODE_BITSIZE (Pmode)) { /* Value expression. */ loc_result = mem_loc_descriptor (rtl, VOIDmode, initialized); |