------- Comment #19 from jakub at gcc dot gnu dot org  2007-08-29 08:07 -------
Binary search among the routines in java_raw_api.c with -fno-inline shows
the noclass testcase fails if either ffi_java_raw_call or
ffi_java_translate_args
is compiled with -O2 -fdce, if both are compiled with -O2 -fno-dce the testcase
succeeds.
The assembly diff for ffi_java_raw_call is fairly small:
--- /tmp/j4.s1  2007-08-29 10:05:43.000000000 +0200
+++ /tmp/j4.s2  2007-08-29 10:05:49.000000000 +0200
@@ -51,12 +51,6 @@ ffi_java_raw_call:
         # /tmp/j4.i:1008
        .loc 1 1008 0
        lwz 0,0(1)
-        # /tmp/j4.i:1007
-       .loc 1 1007 0
-       mr 31,1
-.LCFI9:
-        # /tmp/j4.i:1008
-       .loc 1 1008 0
        lwz 9,4(3)
        slwi 9,9,2
        addi 9,9,30
@@ -150,10 +144,6 @@ ffi_java_raw_call:
        .uleb128 0x2
        .byte   0x9d     # DW_CFA_offset, column 0x1d
        .uleb128 0x3
-       .byte   0x4      # DW_CFA_advance_loc4
-       .4byte  .LCFI9-.LCFI8
-       .byte   0xd      # DW_CFA_def_cfa_register
-       .uleb128 0x1f
        .align 2
 .LEFDE0:
 #NO_APP
@@ -207,10 +197,6 @@ ffi_java_raw_call:
        .uleb128 0x2
        .byte   0x9d     # DW_CFA_offset, column 0x1d
        .uleb128 0x3
-       .byte   0x4      # DW_CFA_advance_loc4
-       .4byte  .LCFI9-.LCFI8
-       .byte   0xd      # DW_CFA_def_cfa_register
-       .uleb128 0x1f
        .align 2
 .LEFDE1:
 #NO_APP
@@ -224,14 +210,9 @@ ffi_java_raw_call:
        .2byte  0x1      # Location expression size
        .byte   0x51     # DW_OP_reg1
        .4byte  .LCFI0-.Ltext0   # Location list begin address (*.LLST0)
-       .4byte  .LCFI9-.Ltext0   # Location list end address (*.LLST0)
-       .2byte  0x2      # Location expression size
-       .byte   0x71     # DW_OP_breg1
-       .sleb128 32
-       .4byte  .LCFI9-.Ltext0   # Location list begin address (*.LLST0)
        .4byte  .LFE28-.Ltext0   # Location list end address (*.LLST0)
        .2byte  0x2      # Location expression size
-       .byte   0x8f     # DW_OP_breg31
+       .byte   0x71     # DW_OP_breg1
        .sleb128 32
        .4byte  0x0      # Location list terminator begin (*.LLST0)
        .4byte  0x0      # Location list terminator end (*.LLST0)

Investigating (though my guess is this is caused by dataflow).


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32758

Reply via email to