http://cr.openjdk.java.net/~kvn/7012965/webrev

Fixed 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API

In 32 bit VM C++ generated code does not guaranty atomicity for volatile long moves.

Use LDX/STX on v9 and LDD/STD on v8 sparc for volatile long moves.

Search Discussions

  • Tom Rodriguez at Jan 18, 2011 at 3:38 pm
    Thanks Dan and Vladimir.

    tom
    On Jan 18, 2011, at 3:19 PM, Vladimir Kozlov wrote:

    http://cr.openjdk.java.net/~kvn/7012965/webrev

    Fixed 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API

    In 32 bit VM C++ generated code does not guaranty atomicity for volatile long moves.

    Use LDX/STX on v9 and LDD/STD on v8 sparc for volatile long moves.
  • Tom Rodriguez at Jan 18, 2011 at 3:40 pm

    On Jan 18, 2011, at 3:38 PM, Tom Rodriguez wrote:

    Thanks Dan and Vladimir.
    Oops, wrong thread.
    tom
    On Jan 18, 2011, at 3:19 PM, Vladimir Kozlov wrote:

    http://cr.openjdk.java.net/~kvn/7012965/webrev

    Fixed 7012965: Fix failed on sparc for 7009756: volatile variables could be broken throw reflection API

    In 32 bit VM C++ generated code does not guaranty atomicity for volatile long moves.

    Use LDX/STX on v9 and LDD/STD on v8 sparc for volatile long moves.
    What does the .volatile directive do? Is that supported in older sparc assemblers? Otherwise it looks ok.

    tom
  • Vladimir Kozlov at Jan 18, 2011 at 3:48 pm

    Tom Rodriguez wrote:
    What does the .volatile directive do? Is that supported in older sparc assemblers? Otherwise it looks ok.

    tom
    ".volatile - Defines the beginning of a block of instruction. The instructions in the section may not be changed. The block of instruction should end at a .nonvolatile pseudo-op and should not contain any Control Transfer Instructions (CTI) or labels."
    ".nonvolatile - Defines the end of a block of instruction. The instructions in the block may not be permuted."

    All other methods in this file have these directives for long time so I copied it to be consistent.
    This code will be backported only into JDK6 where we had these directives already.
  • Tom Rodriguez at Jan 18, 2011 at 3:59 pm

    On Jan 18, 2011, at 3:48 PM, Vladimir Kozlov wrote:

    Tom Rodriguez wrote:
    What does the .volatile directive do? Is that supported in older sparc assemblers? Otherwise it looks ok.
    tom
    ".volatile - Defines the beginning of a block of instruction. The instructions in the section may not be changed. The block of instruction should end at a .nonvolatile pseudo-op and should not contain any Control Transfer Instructions (CTI) or labels."
    ".nonvolatile - Defines the end of a block of instruction. The instructions in the block may not be permuted."

    All other methods in this file have these directives for long time so I copied it to be consistent.
    This code will be backported only into JDK6 where we had these directives already.
    I hadn't noticed that before. Looks fine then.

    tom
  • Vladimir Kozlov at Jan 18, 2011 at 4:01 pm
    Thank you, Tom

    Vladimir

    Tom Rodriguez wrote:
    On Jan 18, 2011, at 3:48 PM, Vladimir Kozlov wrote:

    Tom Rodriguez wrote:
    What does the .volatile directive do? Is that supported in older sparc assemblers? Otherwise it looks ok.
    tom
    ".volatile - Defines the beginning of a block of instruction. The instructions in the section may not be changed. The block of instruction should end at a .nonvolatile pseudo-op and should not contain any Control Transfer Instructions (CTI) or labels."
    ".nonvolatile - Defines the end of a block of instruction. The instructions in the block may not be permuted."

    All other methods in this file have these directives for long time so I copied it to be consistent.
    This code will be backported only into JDK6 where we had these directives already.
    I hadn't noticed that before. Looks fine then.

    tom

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouphotspot-compiler-dev @
categoriesopenjdk
postedJan 18, '11 at 3:19p
activeJan 18, '11 at 4:01p
posts6
users2
websiteopenjdk.java.net

2 users in discussion

Vladimir Kozlov: 3 posts Tom Rodriguez: 3 posts

People

Translate

site design / logo © 2021 Grokbase