Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8058846

c.o.j.t.Platform::isX86 and isX64 may simultaneously return true

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8u40, 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b43
    • CPU:
      x86
    • OS:
      os_x

      Backports

        Description

        Some tests in compiler/intrinsics/bmi/verifycode fail for me on my Mac laptop with Haswell. Specifically all tests that operate on long operands. The generated code seems to be perfectly fine. For example, for compiler/intrinsics/bmi/verifycode/AddnTestL.java:

        jtreg -v -ignore:quiet -vmoption:-XX:CompileCommand=print,TestAndnL\$AndnLExpr.longExpr -jdk:/Users/iggy/work/jdk9b29-experimental compiler/intrinsics/bmi/verifycode/AddnTestL.java

        runner starting test: compiler/intrinsics/bmi/verifycode/AddnTestL.java
        runner finished test: compiler/intrinsics/bmi/verifycode/AddnTestL.java
        Failed. Execution failed: `main' threw exception: java.lang.AssertionError: public long TestAndnL$AndnLExpr.longExpr(Expr$MemL,Expr$MemL)CPU instructions expected not found: 44 8B 56 08 49 C1 E2 03 49 3B C2 0F 85 8F 3A 62 F8 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 89 84 24 00 A0 FE FF 55 48 83 EC 10 4C 8B 52 10 48 85 C9 74 12 C4 E2 A8 F2 41 10 48 83 C4 10 5D 85 05 DA 48 D4 F5 C3 BE F6 FF FF FF 90 90 90 E8 2C 57 62 F8 E8 99 7E 4B F7 BE F6 FF FF FF 90 E8 1C 57 62 F8 E8 89 7E 4B F7 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4
        Test results: failed: 1

        The actual code that we generate works and seems totally fine:

        Loaded disassembler from hsdis-amd64.dylib
        Compiled method (c2) 1089 294 4 TestAndnL$AndnLExpr::longExpr (14 bytes)
         total in heap [0x000000011082b590,0x000000011082b868] = 728
         relocation [0x000000011082b6c0,0x000000011082b6d8] = 24
         main code [0x000000011082b6e0,0x000000011082b760] = 128
         stub code [0x000000011082b760,0x000000011082b778] = 24
         oops [0x000000011082b778,0x000000011082b780] = 8
         metadata [0x000000011082b780,0x000000011082b788] = 8
         scopes data [0x000000011082b788,0x000000011082b7c0] = 56
         scopes pcs [0x000000011082b7c0,0x000000011082b850] = 144
         dependencies [0x000000011082b850,0x000000011082b858] = 8
         nul chk table [0x000000011082b858,0x000000011082b868] = 16
        Decoding compiled method 0x000000011082b590:
        Code:
        [Disassembling for mach='i386:x86-64']
        [Entry Point]
        [Constants]
          # {method} {0x0000000122125a78} 'longExpr' '(LExpr$MemL;LExpr$MemL;)J' in 'TestAndnL$AndnLExpr'
          # this: rsi:rsi = 'TestAndnL$AndnLExpr'
          # parm0: rdx:rdx = 'Expr$MemL'
          # parm1: rcx:rcx = 'Expr$MemL'
          # [sp+0x20] (sp of caller)
          ;; N46: # B1 <- BLOCK HEAD IS JUNK Freq: 1

          0x000000011082b6e0: mov 0x8(%rsi),%r10d
          0x000000011082b6e4: shl $0x3,%r10
          0x000000011082b6e8: cmp %r10,%rax
          0x000000011082b6eb: jne 0x0000000108e4f180 ; {runtime_call}
          0x000000011082b6f1: nop
          0x000000011082b6f2: nop
          0x000000011082b6f3: nop
          0x000000011082b6f4: nop
          0x000000011082b6f5: nop
          0x000000011082b6f6: nop
          0x000000011082b6f7: nop
          0x000000011082b6f8: nop
          0x000000011082b6f9: nop
          0x000000011082b6fa: nop
          0x000000011082b6fb: nop
          0x000000011082b6fc: nop
          0x000000011082b6fd: nop
          0x000000011082b6fe: nop
          0x000000011082b6ff: nop
        [Verified Entry Point]
          ;; B1: # B5 B2 <- BLOCK HEAD IS JUNK Freq: 1

          0x000000011082b700: mov %eax,-0x16000(%rsp)
          0x000000011082b707: push %rbp
          0x000000011082b708: sub $0x10,%rsp ;*synchronization entry
                                                        ; - TestAndnL$AndnLExpr::longExpr@-1 (line 70)

          0x000000011082b70c: mov 0x10(%rdx),%r10 ; implicit exception: dispatches to 0x000000011082b739
          ;; B2: # B4 B3 <- B1 Freq: 0.999999

          0x000000011082b710: test %rcx,%rcx
          0x000000011082b713: je 0x000000011082b727 ;*getfield value
                                                        ; - TestAndnL$AndnLExpr::longExpr@9 (line 70)

          ;; B3: # N46 <- B2 Freq: 0.999998

          0x000000011082b715: andn 0x10(%rcx),%r10,%rax ;*land
                                                        ; - TestAndnL$AndnLExpr::longExpr@12 (line 70)

          0x000000011082b71b: add $0x10,%rsp
          0x000000011082b71f: pop %rbp
          0x000000011082b720: test %eax,-0xa2bb726(%rip) # 0x0000000106570000
                                                        ; {poll_return}
          0x000000011082b726: retq
          ;; B4: # N46 <- B2 Freq: 1.01328e-06

          0x000000011082b727: mov $0xfffffff6,%esi
          0x000000011082b72c: nop
          0x000000011082b72d: nop
          0x000000011082b72e: nop
          0x000000011082b72f: callq 0x0000000108e50e60 ; OopMap{off=84}
                                                        ;*getfield value
                                                        ; - TestAndnL$AndnLExpr::longExpr@9 (line 70)
                                                        ; {runtime_call}
          0x000000011082b734: callq 0x0000000107ce35d2 ;*getfield value
                                                        ; - TestAndnL$AndnLExpr::longExpr@9 (line 70)
                                                        ; {runtime_call}
          ;; B5: # N46 <- B1 Freq: 1.01328e-06

          0x000000011082b739: mov $0xfffffff6,%esi
          0x000000011082b73e: nop
          0x000000011082b73f: callq 0x0000000108e50e60 ; OopMap{off=100}
                                                        ;*getfield value
                                                        ; - TestAndnL$AndnLExpr::longExpr@1 (line 70)
                                                        ; {runtime_call}
          0x000000011082b744: callq 0x0000000107ce35d2 ;*getfield value
                                                        ; - TestAndnL$AndnLExpr::longExpr@1 (line 70)
                                                        ; {runtime_call}
          0x000000011082b749: hlt
          0x000000011082b74a: hlt
          0x000000011082b74b: hlt
          0x000000011082b74c: hlt
          0x000000011082b74d: hlt
          0x000000011082b74e: hlt
          0x000000011082b74f: hlt
          0x000000011082b750: hlt
          0x000000011082b751: hlt
          0x000000011082b752: hlt
          0x000000011082b753: hlt
          0x000000011082b754: hlt
          0x000000011082b755: hlt
          0x000000011082b756: hlt
          0x000000011082b757: hlt
          0x000000011082b758: hlt
          0x000000011082b759: hlt
          0x000000011082b75a: hlt
          0x000000011082b75b: hlt
          0x000000011082b75c: hlt
          0x000000011082b75d: hlt
          0x000000011082b75e: hlt
          0x000000011082b75f: hlt
        [Exception Handler]
        [Stub Code]
          0x000000011082b760: jmpq 0x0000000108f3c8e0 ; {no_reloc}
        [Deopt Handler Code]
          0x000000011082b765: callq 0x000000011082b76a
          0x000000011082b76a: subq $0x5,(%rsp)
          0x000000011082b76f: jmpq 0x0000000108e50920 ; {runtime_call}
          0x000000011082b774: hlt
          0x000000011082b775: hlt
          0x000000011082b776: hlt
          0x000000011082b777: hlt
        pc-bytecode offsets:
        PcDesc(pc=0x11082b6df offset=ffffffff bits=0):
        PcDesc(pc=0x11082b70c offset=2c bits=0):
           TestAndnL$AndnLExpr::longExpr @-1
        PcDesc(pc=0x11082b715 offset=35 bits=0):
           TestAndnL$AndnLExpr::longExpr @9
        PcDesc(pc=0x11082b71b offset=3b bits=0):
           TestAndnL$AndnLExpr::longExpr @12
        PcDesc(pc=0x11082b734 offset=54 bits=1):
           TestAndnL$AndnLExpr::longExpr @9 reexecute=true
        PcDesc(pc=0x11082b739 offset=59 bits=0):
           TestAndnL$AndnLExpr::longExpr @9
        PcDesc(pc=0x11082b744 offset=64 bits=1):
           TestAndnL$AndnLExpr::longExpr @1 reexecute=true
        PcDesc(pc=0x11082b749 offset=69 bits=0):
           TestAndnL$AndnLExpr::longExpr @1
        PcDesc(pc=0x11082b779 offset=99 bits=0):
        OopMapSet contains 2 OopMaps

        #0
        OopMap{off=84}
        #1
        OopMap{off=100}

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  fzhinkin Filipp Zhinkin
                  Reporter:
                  iveresov Igor Veresov
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Due:
                    Created:
                    Updated:
                    Resolved: