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

RegisterSaver::restore_live_registers() fails to restore xmm registers on 32 bit

XMLWordPrintable

    • b106
    • x86
    • Verified

      RegisterSaver::save_live_registers() and RegisterSaver::restore_live_registers() are used by the safepoint handling code to save and restore registers. The following code is emitted to save and restore xmm registers on 32 bit:

      Save:
         0xf34ca12e: vmovdqu %xmm0,0xb0(%esp)
         0xf34ca137: vmovdqu %xmm1,0xc0(%esp)
         0xf34ca140: vmovdqu %xmm2,0xd0(%esp)
         0xf34ca149: vmovdqu %xmm3,0xe0(%esp)
         0xf34ca152: vmovdqu %xmm4,0xf0(%esp)
         0xf34ca15b: vmovdqu %xmm5,0x100(%esp)
         0xf34ca164: vmovdqu %xmm6,0x110(%esp)
         0xf34ca16d: vmovdqu %xmm7,0x120(%esp)

      Restore:
         0xf34ca247: vmovdqu 0x130(%esp),%xmm0
         0xf34ca250: vmovdqu 0x140(%esp),%xmm1
         0xf34ca259: vmovdqu 0x150(%esp),%xmm2
         0xf34ca262: vmovdqu 0x160(%esp),%xmm3
         0xf34ca26b: vmovdqu 0x170(%esp),%xmm4
         0xf34ca274: vmovdqu 0x180(%esp),%xmm5
         0xf34ca27d: vmovdqu 0x190(%esp),%xmm6
         0xf34ca286: vmovdqu 0x1a0(%esp),%xmm7

      The stack offsets for the restore operations are wrong, causing the xmm registers to contain wrong values.


            thartmann Tobias Hartmann
            thartmann Tobias Hartmann
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: