From 1466e38701d72d8f9655a467ca140fb2b8a10dab Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 1 Dec 2004 10:13:31 -0800 Subject: re PR rtl-optimization/15289 (reload error with non-lowpart subregs) PR rtl-opt/15289 * emit-rtl.c (gen_complex_constant_part): Remove. (gen_realpart, gen_imagpart): Remove. * rtl.h (gen_realpart, gen_imagpart): Remove. * expmed.c (extract_bit_field): Remove CONCAT hack catering to gen_realpart/gen_imagpart. * expr.c (write_complex_part, read_complex_part): New. (emit_move_via_alt_mode, emit_move_via_integer, emit_move_resolve_push, emit_move_complex_push, emit_move_complex, emit_move_ccmode, emit_move_multi_word): Split out from ... (emit_move_insn_1): ... here. (expand_expr_real_1) : Use write_complex_part. : Use read_complex_part. * function.c (assign_parm_setup_reg): Hard-code transformations instead of using gen_realpart/gen_imagpart. From-SVN: r91571 --- gcc/expmed.c | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'gcc/expmed.c') diff --git a/gcc/expmed.c b/gcc/expmed.c index fe0db06..c6c8058 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -1611,28 +1611,6 @@ extract_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize, return spec_target; if (GET_MODE (target) != tmode && GET_MODE (target) != mode) { - /* If the target mode is complex, then extract the two scalar elements - from the value now. Creating (subreg:SC (reg:DI) 0), as we would do - with the clause below, will cause gen_realpart or gen_imagpart to - fail, since those functions must return lvalues. */ - if (COMPLEX_MODE_P (tmode)) - { - rtx realpart, imagpart; - enum machine_mode itmode = GET_MODE_INNER (tmode); - - target = convert_to_mode (mode_for_size (GET_MODE_BITSIZE (tmode), - MODE_INT, 0), - target, unsignedp); - - realpart = extract_bit_field (target, GET_MODE_BITSIZE (itmode), 0, - unsignedp, NULL, itmode, itmode); - imagpart = extract_bit_field (target, GET_MODE_BITSIZE (itmode), - GET_MODE_BITSIZE (itmode), unsignedp, - NULL, itmode, itmode); - - return gen_rtx_CONCAT (tmode, realpart, imagpart); - } - /* If the target mode is not a scalar integral, first convert to the integer mode of that size and then access it as a floating-point value via a SUBREG. */ -- cgit v1.1