Hi, Paolo.
Here is the new version of patch. I have tested this version with gcc
testsuite only on i686 without new regressions, for now. Mips and arm
tests are in progress.

One strange thing I noticed:
>
> No need for this gen_reg_rtx, either, by passing a NULL_RTX target below.
>
>> +      carry_result = expand_shift (LSHIFT_EXPR, mode, carry, BITS_PER_WORD, 
>> carry_result, 1);
>> +
>> +      /* Adding 0x100000000 as carry here if required.  */
>
> Oops, a remnant of 32-bit specific code.
>

that I have to add convert_to_mode () to DImode after
emit_store_flag_force (), since emit_store_flag_force () returns
"carry" in SImode and without convert_to_mode () call compiler fails
with this error:

Breakpoint 2, simplify_subreg (outermode=SImode, op=0x7ffff56cdf20,
innermode=DImode, byte=0) at
../../gcc-20120418-1/gcc/simplify-rtx.c:5423
5423      gcc_assert (GET_MODE (op) == innermode
(gdb) bt
#0  simplify_subreg (outermode=SImode, op=0x7ffff56cdf20,
innermode=DImode, byte=0) at
../../gcc-20120418-1/gcc/simplify-rtx.c:5423
#1  0x0000000000aea223 in simplify_gen_subreg (outermode=SImode,
op=0x7ffff56cdf20, innermode=DImode, byte=0) at
../../gcc-20120418-1/gcc/simplify-rtx.c:5763
#2  0x0000000000733c99 in operand_subword (op=0x7ffff56cdf20,
offset=0, validate_address=1, mode=DImode) at
../../gcc-20120418-1/gcc/emit-rtl.c:1427
#3  0x0000000000733cc6 in operand_subword_force (op=0x7ffff56cdf20,
offset=0, mode=DImode) at ../../gcc-20120418-1/gcc/emit-rtl.c:1440
#4  0x0000000000a016b3 in expand_binop (mode=DImode,
binoptab=0x195f580, op0=0x7ffff56cdf20, op1=0x7ffff583d670,
target=0x7ffff56cdfa0, unsignedp=1, methods=OPTAB_DIRECT)
    at ../../gcc-20120418-1/gcc/optabs.c:1779
#5  0x00000000007525af in expand_shift_1 (code=LSHIFT_EXPR,
mode=DImode, shifted=0x7ffff56cdf20, amount=0x7ffff583d670,
target=0x0, unsignedp=1)
    at ../../gcc-20120418-1/gcc/expmed.c:2273
#6  0x00000000007526b6 in expand_shift (code=LSHIFT_EXPR, mode=DImode,
shifted=0x7ffff56cdf20, amount=32, target=0x0, unsignedp=1) at
../../gcc-20120418-1/gcc/expmed.c:2318
#7  0x00000000007563e6 in expand_mult_highpart_optab (mode=DImode,
op0=0x7ffff56cdcc0, op1=0x7ffff56b1e00, target=0x0, unsignedp=1,
max_cost=188)
    at ../../gcc-20120418-1/gcc/expmed.c:3581
#8  0x0000000000756747 in expand_mult_highpart (mode=DImode,
op0=0x7ffff56cdcc0, op1=0x7ffff56b1e00, target=0x0, unsignedp=1,
max_cost=188)
    at ../../gcc-20120418-1/gcc/expmed.c:3654

                                  thanks, Dinar.

Attachment: 30.patch
Description: Binary data

Reply via email to