This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/80115] New: [7 Regression] OpenJDK 1.8 fails to build


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80115

            Bug ID: 80115
           Summary: [7 Regression] OpenJDK 1.8 fails to build
           Product: gcc
           Version: 7.0.1
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---
            Target: i?86-*-*

g++-7 /tmp/defNewGeneration.ii -S -m32 -O2 -w
/home/abuild/rpmbuild/BUILD/icedtea-3.3.0/openjdk-boot/hotspot/src/share/vm/memory/defNewGeneration.cpp:
In member function ‘virtual void DefNewGeneration::collect(bool, bool, size_t,
bool)’:
/home/abuild/rpmbuild/BUILD/icedtea-3.3.0/openjdk-boot/hotspot/src/share/vm/memory/defNewGeneration.cpp:731:1:
error: unsupported size for integer register

#1  0x00000000015a3fa9 in print_reg (x=0x7fffee20f180, code=0, file=0x2b9fbf0)
    at /space/rguenther/src/svn/gcc-7-branch/gcc/config/i386/i386.c:17667
17667           error ("unsupported size for integer register");
(gdb) l
17662         break;
17663       case 1:
17664         if (regno >= ARRAY_SIZE (qi_reg_name))
17665           goto normal;
17666         if (!ANY_QI_REGNO_P (regno))
17667           error ("unsupported size for integer register");
(gdb) p regno
$1 = 4
(gdb) p qi_reg_name[4]
$3 = 0x1f26494 "sil"

the asm in question is

(insn:TI 14 734 15 2 (parallel [
            (asm_operands/v ("990: nop
.pushsection .note.stapsdt,"?","note"
.balign 4
.4byte 992f-991f,994f-993f,3
991: .asciz "stapsdt"
992: .balign 4
993: .4byte 990b
.4byte _.stapsdt.base
.4byte 0
.asciz "hotspot"
.asciz "gc__collection__defnew__begin"
.asciz "%n0@%1 %n2@%3 %n4@%5 %n6@%7"
994: .balign 4
.popsection
") ("") 0 [
                    (const_int -1 [0xffffffffffffffff])
                    (reg:QI 0 ax [orig:200 full ] [200])
                    (const_int -1 [0xffffffffffffffff])
                    (reg:QI 2 cx [orig:202 clear_all_soft_refs ] [202])
                    (const_int -4 [0xfffffffffffffffc])
                    (mem/c:SI (plus:SI (reg/f:SI 6 bp)
                            (const_int 20 [0x14])) [3 size+0 S4 A32])
                    (const_int -1 [0xffffffffffffffff])
                    (reg:QI 4 si [orig:205 is_tlab ] [205])
                ]
                 [
                    (asm_input:SI ("n")
/home/abuild/rpmbuild/BUILD/icedtea-3.3.0/openjdk-boot/hotspot/src/share/vm/memory/defNewGeneration.cpp:571)
                    (asm_input:QI ("nor")
/home/abuild/rpmbuild/BUILD/icedtea-3.3.0/openjdk-boot/hotspot/src/share/vm/memory/defNewGeneration.cpp:571)
                    (asm_input:SI ("n")
/home/abuild/rpmbuild/BUILD/icedtea-3.3.0/openjdk-boot/hotspot/src/share/vm/memory/defNewGeneration.cpp:571)
                    (asm_input:QI ("nor")
/home/abuild/rpmbuild/BUILD/icedtea-3.3.0/openjdk-boot/hotspot/src/share/vm/memory/defNewGeneration.cpp:571)
                    (asm_input:SI ("n")
/home/abuild/rpmbuild/BUILD/icedtea-3.3.0/openjdk-boot/hotspot/src/share/vm/memory/defNewGeneration.cpp:571)
                    (asm_input:SI ("nor")
/home/abuild/rpmbuild/BUILD/icedtea-3.3.0/openjdk-boot/hotspot/src/share/vm/memory/defNewGeneration.cpp:571)
                    (asm_input:SI ("n")
/home/abuild/rpmbuild/BUILD/icedtea-3.3.0/openjdk-boot/hotspot/src/share/vm/memory/defNewGeneration.cpp:571)
                    (asm_input:QI ("nor")
/home/abuild/rpmbuild/BUILD/icedtea-3.3.0/openjdk-boot/hotspot/src/share/vm/memory/defNewGeneration.cpp:571)
                ]
                 []
/home/abuild/rpmbuild/BUILD/icedtea-3.3.0/openjdk-boot/hotspot/src/share/vm/memory/defNewGeneration.cpp:571)
            (clobber (reg:CCFP 18 fpsr))
            (clobber (reg:CC 17 flags))
        ])
"/home/abuild/rpmbuild/BUILD/icedtea-3.3.0/openjdk-boot/hotspot/src/share/vm/memory/defNewGeneration.cpp":571
-1
     (expr_list:REG_DEAD (reg:QI 4 si [orig:205 is_tlab ] [205])
        (expr_list:REG_DEAD (reg:QI 2 cx [orig:202 clear_all_soft_refs ] [202])
            (expr_list:REG_DEAD (reg:QI 0 ax [orig:200 full ] [200])
                (expr_list:REG_UNUSED (reg:CCFP 18 fpsr)
                    (expr_list:REG_UNUSED (reg:CC 17 flags)
                        (nil)))))))

note that it builds successfully with -O1 or -O0.  The same issue happens
in multiple places in OpenJDK 1.8 and stems from their HS_DTRACE_PROBE4
macro expansion which eventually expands to STAP_PROBE4 / _SDT_PROBE which
is defined as

# 33 "/usr/include/sys/sdt.h" 3 4
#define _SDT_PROBE(provider,name,n,arglist) do { __asm__ __volatile__
(_SDT_ASM_BODY(provider, name, _SDT_ASM_ARGS, (n)) :: _SDT_ASM_OPERANDS_ ##n
arglist); __asm__ __volatile__ (_SDT_ASM_BASE); } while (0)

and

#define _SDT_ASM_OPERANDS_4(arg1,arg2,arg3,arg4) _SDT_ASM_OPERANDS_3(arg1,
arg2, arg3), _SDT_ARG(4, arg4)

(ick, all heavily macroized stuff)

#define _SDT_ARG(n,x) [_SDT_S ##n] "n" ((_SDT_ARGSIGNED (x) ? 1 : -1) * (int)
_SDT_ARGSIZE (x)), [_SDT_A ##n] _SDT_ARG_CONSTRAINT_STRING
(STAP_SDT_ARG_CONSTRAINT) (_SDT_ARGVAL (x))

#define STAP_SDT_ARG_CONSTRAINT nor


I'll note that we accept (reg:QI 4 si ...) just fine.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]