aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2009-06-17 07:44:24 +0000
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2009-06-17 07:44:24 +0000
commit2d50973e39b598f96b008af8bbb27e74ae40d436 (patch)
tree6a6b0ad6a72c15dc024f0445f032c3f576ea15ce
parentbe85c85e8be8d95eb198e90be487aba50d020079 (diff)
* dwarf2out.c (mem_loc_descriptor): Handle DIV, MOD, AND, IOR,var-tracking-assignments-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-branch@148581 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog.vta12
-rw-r--r--gcc/dwarf2out.c108
2 files changed, 119 insertions, 1 deletions
diff --git a/gcc/ChangeLog.vta b/gcc/ChangeLog.vta
index f8589dd38fd..cda9265738e 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 dc2d82793fe..c387c57170c 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -10284,6 +10284,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;
@@ -10296,6 +10304,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,
@@ -10312,6 +10332,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;
@@ -10321,6 +10366,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
@@ -10332,7 +10432,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)
@@ -10677,7 +10782,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);