summaryrefslogtreecommitdiff
path: root/gcc/cfgexpand.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2009-10-16 10:43:18 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2009-10-16 10:43:18 +0000
commit4e6677f80fed96013662adac6c9bb234d299f16d (patch)
tree6eba8425535818cb1b7315f03e20aef3130b2545 /gcc/cfgexpand.c
parent18c7fc85ff7698076d136e889348126f34c5d971 (diff)
downloadgcc-4e6677f80fed96013662adac6c9bb234d299f16d.tar.gz
PR debug/41717
* cfgexpand.c (expand_debug_expr): Handle CONJ_EXPR. * dwarf2out.c (mem_loc_descriptor): Don't handle POST_INT/POST_DEC/POST_MODIFY like SUBREG. For SUBREG punt if it is not lowpart subreg or if inner mode isn't MODE_INT. * gcc.dg/debug/pr41717.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152897 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r--gcc/cfgexpand.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index 4f317d906bc..acd70c13869 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -2869,6 +2869,46 @@ expand_debug_expr (tree exp)
op1 = gen_rtx_CONST (GET_MODE_INNER (mode), op1);
return gen_rtx_CONCAT (mode, op0, op1);
+ case CONJ_EXPR:
+ if (GET_CODE (op0) == CONCAT)
+ return gen_rtx_CONCAT (mode, XEXP (op0, 0),
+ gen_rtx_NEG (GET_MODE_INNER (mode),
+ XEXP (op0, 1)));
+ else
+ {
+ enum machine_mode imode = GET_MODE_INNER (mode);
+ rtx re, im;
+
+ if (MEM_P (op0))
+ {
+ re = adjust_address_nv (op0, imode, 0);
+ im = adjust_address_nv (op0, imode, GET_MODE_SIZE (imode));
+ }
+ else
+ {
+ enum machine_mode ifmode = int_mode_for_mode (mode);
+ enum machine_mode ihmode = int_mode_for_mode (imode);
+ rtx halfsize;
+ if (ifmode == BLKmode || ihmode == BLKmode)
+ return NULL;
+ halfsize = GEN_INT (GET_MODE_BITSIZE (ihmode));
+ re = op0;
+ if (mode != ifmode)
+ re = gen_rtx_SUBREG (ifmode, re, 0);
+ re = gen_rtx_ZERO_EXTRACT (ihmode, re, halfsize, const0_rtx);
+ if (imode != ihmode)
+ re = gen_rtx_SUBREG (imode, re, 0);
+ im = copy_rtx (op0);
+ if (mode != ifmode)
+ im = gen_rtx_SUBREG (ifmode, im, 0);
+ im = gen_rtx_ZERO_EXTRACT (ihmode, im, halfsize, halfsize);
+ if (imode != ihmode)
+ im = gen_rtx_SUBREG (imode, im, 0);
+ }
+ im = gen_rtx_NEG (imode, im);
+ return gen_rtx_CONCAT (mode, re, im);
+ }
+
case ADDR_EXPR:
op0 = expand_debug_expr (TREE_OPERAND (exp, 0));
if (!op0 || !MEM_P (op0))