551 case vmIntrinsics::_compressStringC: |
554 case vmIntrinsics::_compressStringC: |
552 case vmIntrinsics::_compressStringB: return inline_string_copy( is_compress); |
555 case vmIntrinsics::_compressStringB: return inline_string_copy( is_compress); |
553 case vmIntrinsics::_inflateStringC: |
556 case vmIntrinsics::_inflateStringC: |
554 case vmIntrinsics::_inflateStringB: return inline_string_copy(!is_compress); |
557 case vmIntrinsics::_inflateStringB: return inline_string_copy(!is_compress); |
555 |
558 |
556 case vmIntrinsics::_getObject: return inline_unsafe_access(!is_native_ptr, !is_store, T_OBJECT, !is_volatile, false); |
559 case vmIntrinsics::_getObject: return inline_unsafe_access(!is_native_ptr, !is_store, T_OBJECT, Relaxed, false); |
557 case vmIntrinsics::_getBoolean: return inline_unsafe_access(!is_native_ptr, !is_store, T_BOOLEAN, !is_volatile, false); |
560 case vmIntrinsics::_getBoolean: return inline_unsafe_access(!is_native_ptr, !is_store, T_BOOLEAN, Relaxed, false); |
558 case vmIntrinsics::_getByte: return inline_unsafe_access(!is_native_ptr, !is_store, T_BYTE, !is_volatile, false); |
561 case vmIntrinsics::_getByte: return inline_unsafe_access(!is_native_ptr, !is_store, T_BYTE, Relaxed, false); |
559 case vmIntrinsics::_getShort: return inline_unsafe_access(!is_native_ptr, !is_store, T_SHORT, !is_volatile, false); |
562 case vmIntrinsics::_getShort: return inline_unsafe_access(!is_native_ptr, !is_store, T_SHORT, Relaxed, false); |
560 case vmIntrinsics::_getChar: return inline_unsafe_access(!is_native_ptr, !is_store, T_CHAR, !is_volatile, false); |
563 case vmIntrinsics::_getChar: return inline_unsafe_access(!is_native_ptr, !is_store, T_CHAR, Relaxed, false); |
561 case vmIntrinsics::_getInt: return inline_unsafe_access(!is_native_ptr, !is_store, T_INT, !is_volatile, false); |
564 case vmIntrinsics::_getInt: return inline_unsafe_access(!is_native_ptr, !is_store, T_INT, Relaxed, false); |
562 case vmIntrinsics::_getLong: return inline_unsafe_access(!is_native_ptr, !is_store, T_LONG, !is_volatile, false); |
565 case vmIntrinsics::_getLong: return inline_unsafe_access(!is_native_ptr, !is_store, T_LONG, Relaxed, false); |
563 case vmIntrinsics::_getFloat: return inline_unsafe_access(!is_native_ptr, !is_store, T_FLOAT, !is_volatile, false); |
566 case vmIntrinsics::_getFloat: return inline_unsafe_access(!is_native_ptr, !is_store, T_FLOAT, Relaxed, false); |
564 case vmIntrinsics::_getDouble: return inline_unsafe_access(!is_native_ptr, !is_store, T_DOUBLE, !is_volatile, false); |
567 case vmIntrinsics::_getDouble: return inline_unsafe_access(!is_native_ptr, !is_store, T_DOUBLE, Relaxed, false); |
565 case vmIntrinsics::_putObject: return inline_unsafe_access(!is_native_ptr, is_store, T_OBJECT, !is_volatile, false); |
568 |
566 case vmIntrinsics::_putBoolean: return inline_unsafe_access(!is_native_ptr, is_store, T_BOOLEAN, !is_volatile, false); |
569 case vmIntrinsics::_putObject: return inline_unsafe_access(!is_native_ptr, is_store, T_OBJECT, Relaxed, false); |
567 case vmIntrinsics::_putByte: return inline_unsafe_access(!is_native_ptr, is_store, T_BYTE, !is_volatile, false); |
570 case vmIntrinsics::_putBoolean: return inline_unsafe_access(!is_native_ptr, is_store, T_BOOLEAN, Relaxed, false); |
568 case vmIntrinsics::_putShort: return inline_unsafe_access(!is_native_ptr, is_store, T_SHORT, !is_volatile, false); |
571 case vmIntrinsics::_putByte: return inline_unsafe_access(!is_native_ptr, is_store, T_BYTE, Relaxed, false); |
569 case vmIntrinsics::_putChar: return inline_unsafe_access(!is_native_ptr, is_store, T_CHAR, !is_volatile, false); |
572 case vmIntrinsics::_putShort: return inline_unsafe_access(!is_native_ptr, is_store, T_SHORT, Relaxed, false); |
570 case vmIntrinsics::_putInt: return inline_unsafe_access(!is_native_ptr, is_store, T_INT, !is_volatile, false); |
573 case vmIntrinsics::_putChar: return inline_unsafe_access(!is_native_ptr, is_store, T_CHAR, Relaxed, false); |
571 case vmIntrinsics::_putLong: return inline_unsafe_access(!is_native_ptr, is_store, T_LONG, !is_volatile, false); |
574 case vmIntrinsics::_putInt: return inline_unsafe_access(!is_native_ptr, is_store, T_INT, Relaxed, false); |
572 case vmIntrinsics::_putFloat: return inline_unsafe_access(!is_native_ptr, is_store, T_FLOAT, !is_volatile, false); |
575 case vmIntrinsics::_putLong: return inline_unsafe_access(!is_native_ptr, is_store, T_LONG, Relaxed, false); |
573 case vmIntrinsics::_putDouble: return inline_unsafe_access(!is_native_ptr, is_store, T_DOUBLE, !is_volatile, false); |
576 case vmIntrinsics::_putFloat: return inline_unsafe_access(!is_native_ptr, is_store, T_FLOAT, Relaxed, false); |
574 |
577 case vmIntrinsics::_putDouble: return inline_unsafe_access(!is_native_ptr, is_store, T_DOUBLE, Relaxed, false); |
575 case vmIntrinsics::_getByte_raw: return inline_unsafe_access( is_native_ptr, !is_store, T_BYTE, !is_volatile, false); |
578 |
576 case vmIntrinsics::_getShort_raw: return inline_unsafe_access( is_native_ptr, !is_store, T_SHORT, !is_volatile, false); |
579 case vmIntrinsics::_getByte_raw: return inline_unsafe_access( is_native_ptr, !is_store, T_BYTE, Relaxed, false); |
577 case vmIntrinsics::_getChar_raw: return inline_unsafe_access( is_native_ptr, !is_store, T_CHAR, !is_volatile, false); |
580 case vmIntrinsics::_getShort_raw: return inline_unsafe_access( is_native_ptr, !is_store, T_SHORT, Relaxed, false); |
578 case vmIntrinsics::_getInt_raw: return inline_unsafe_access( is_native_ptr, !is_store, T_INT, !is_volatile, false); |
581 case vmIntrinsics::_getChar_raw: return inline_unsafe_access( is_native_ptr, !is_store, T_CHAR, Relaxed, false); |
579 case vmIntrinsics::_getLong_raw: return inline_unsafe_access( is_native_ptr, !is_store, T_LONG, !is_volatile, false); |
582 case vmIntrinsics::_getInt_raw: return inline_unsafe_access( is_native_ptr, !is_store, T_INT, Relaxed, false); |
580 case vmIntrinsics::_getFloat_raw: return inline_unsafe_access( is_native_ptr, !is_store, T_FLOAT, !is_volatile, false); |
583 case vmIntrinsics::_getLong_raw: return inline_unsafe_access( is_native_ptr, !is_store, T_LONG, Relaxed, false); |
581 case vmIntrinsics::_getDouble_raw: return inline_unsafe_access( is_native_ptr, !is_store, T_DOUBLE, !is_volatile, false); |
584 case vmIntrinsics::_getFloat_raw: return inline_unsafe_access( is_native_ptr, !is_store, T_FLOAT, Relaxed, false); |
582 case vmIntrinsics::_getAddress_raw: return inline_unsafe_access( is_native_ptr, !is_store, T_ADDRESS, !is_volatile, false); |
585 case vmIntrinsics::_getDouble_raw: return inline_unsafe_access( is_native_ptr, !is_store, T_DOUBLE, Relaxed, false); |
583 |
586 case vmIntrinsics::_getAddress_raw: return inline_unsafe_access( is_native_ptr, !is_store, T_ADDRESS, Relaxed, false); |
584 case vmIntrinsics::_putByte_raw: return inline_unsafe_access( is_native_ptr, is_store, T_BYTE, !is_volatile, false); |
587 |
585 case vmIntrinsics::_putShort_raw: return inline_unsafe_access( is_native_ptr, is_store, T_SHORT, !is_volatile, false); |
588 case vmIntrinsics::_putByte_raw: return inline_unsafe_access( is_native_ptr, is_store, T_BYTE, Relaxed, false); |
586 case vmIntrinsics::_putChar_raw: return inline_unsafe_access( is_native_ptr, is_store, T_CHAR, !is_volatile, false); |
589 case vmIntrinsics::_putShort_raw: return inline_unsafe_access( is_native_ptr, is_store, T_SHORT, Relaxed, false); |
587 case vmIntrinsics::_putInt_raw: return inline_unsafe_access( is_native_ptr, is_store, T_INT, !is_volatile, false); |
590 case vmIntrinsics::_putChar_raw: return inline_unsafe_access( is_native_ptr, is_store, T_CHAR, Relaxed, false); |
588 case vmIntrinsics::_putLong_raw: return inline_unsafe_access( is_native_ptr, is_store, T_LONG, !is_volatile, false); |
591 case vmIntrinsics::_putInt_raw: return inline_unsafe_access( is_native_ptr, is_store, T_INT, Relaxed, false); |
589 case vmIntrinsics::_putFloat_raw: return inline_unsafe_access( is_native_ptr, is_store, T_FLOAT, !is_volatile, false); |
592 case vmIntrinsics::_putLong_raw: return inline_unsafe_access( is_native_ptr, is_store, T_LONG, Relaxed, false); |
590 case vmIntrinsics::_putDouble_raw: return inline_unsafe_access( is_native_ptr, is_store, T_DOUBLE, !is_volatile, false); |
593 case vmIntrinsics::_putFloat_raw: return inline_unsafe_access( is_native_ptr, is_store, T_FLOAT, Relaxed, false); |
591 case vmIntrinsics::_putAddress_raw: return inline_unsafe_access( is_native_ptr, is_store, T_ADDRESS, !is_volatile, false); |
594 case vmIntrinsics::_putDouble_raw: return inline_unsafe_access( is_native_ptr, is_store, T_DOUBLE, Relaxed, false); |
592 |
595 case vmIntrinsics::_putAddress_raw: return inline_unsafe_access( is_native_ptr, is_store, T_ADDRESS, Relaxed, false); |
593 case vmIntrinsics::_getObjectVolatile: return inline_unsafe_access(!is_native_ptr, !is_store, T_OBJECT, is_volatile, false); |
596 |
594 case vmIntrinsics::_getBooleanVolatile: return inline_unsafe_access(!is_native_ptr, !is_store, T_BOOLEAN, is_volatile, false); |
597 case vmIntrinsics::_getObjectVolatile: return inline_unsafe_access(!is_native_ptr, !is_store, T_OBJECT, Volatile, false); |
595 case vmIntrinsics::_getByteVolatile: return inline_unsafe_access(!is_native_ptr, !is_store, T_BYTE, is_volatile, false); |
598 case vmIntrinsics::_getBooleanVolatile: return inline_unsafe_access(!is_native_ptr, !is_store, T_BOOLEAN, Volatile, false); |
596 case vmIntrinsics::_getShortVolatile: return inline_unsafe_access(!is_native_ptr, !is_store, T_SHORT, is_volatile, false); |
599 case vmIntrinsics::_getByteVolatile: return inline_unsafe_access(!is_native_ptr, !is_store, T_BYTE, Volatile, false); |
597 case vmIntrinsics::_getCharVolatile: return inline_unsafe_access(!is_native_ptr, !is_store, T_CHAR, is_volatile, false); |
600 case vmIntrinsics::_getShortVolatile: return inline_unsafe_access(!is_native_ptr, !is_store, T_SHORT, Volatile, false); |
598 case vmIntrinsics::_getIntVolatile: return inline_unsafe_access(!is_native_ptr, !is_store, T_INT, is_volatile, false); |
601 case vmIntrinsics::_getCharVolatile: return inline_unsafe_access(!is_native_ptr, !is_store, T_CHAR, Volatile, false); |
599 case vmIntrinsics::_getLongVolatile: return inline_unsafe_access(!is_native_ptr, !is_store, T_LONG, is_volatile, false); |
602 case vmIntrinsics::_getIntVolatile: return inline_unsafe_access(!is_native_ptr, !is_store, T_INT, Volatile, false); |
600 case vmIntrinsics::_getFloatVolatile: return inline_unsafe_access(!is_native_ptr, !is_store, T_FLOAT, is_volatile, false); |
603 case vmIntrinsics::_getLongVolatile: return inline_unsafe_access(!is_native_ptr, !is_store, T_LONG, Volatile, false); |
601 case vmIntrinsics::_getDoubleVolatile: return inline_unsafe_access(!is_native_ptr, !is_store, T_DOUBLE, is_volatile, false); |
604 case vmIntrinsics::_getFloatVolatile: return inline_unsafe_access(!is_native_ptr, !is_store, T_FLOAT, Volatile, false); |
602 |
605 case vmIntrinsics::_getDoubleVolatile: return inline_unsafe_access(!is_native_ptr, !is_store, T_DOUBLE, Volatile, false); |
603 case vmIntrinsics::_putObjectVolatile: return inline_unsafe_access(!is_native_ptr, is_store, T_OBJECT, is_volatile, false); |
606 |
604 case vmIntrinsics::_putBooleanVolatile: return inline_unsafe_access(!is_native_ptr, is_store, T_BOOLEAN, is_volatile, false); |
607 case vmIntrinsics::_putObjectVolatile: return inline_unsafe_access(!is_native_ptr, is_store, T_OBJECT, Volatile, false); |
605 case vmIntrinsics::_putByteVolatile: return inline_unsafe_access(!is_native_ptr, is_store, T_BYTE, is_volatile, false); |
608 case vmIntrinsics::_putBooleanVolatile: return inline_unsafe_access(!is_native_ptr, is_store, T_BOOLEAN, Volatile, false); |
606 case vmIntrinsics::_putShortVolatile: return inline_unsafe_access(!is_native_ptr, is_store, T_SHORT, is_volatile, false); |
609 case vmIntrinsics::_putByteVolatile: return inline_unsafe_access(!is_native_ptr, is_store, T_BYTE, Volatile, false); |
607 case vmIntrinsics::_putCharVolatile: return inline_unsafe_access(!is_native_ptr, is_store, T_CHAR, is_volatile, false); |
610 case vmIntrinsics::_putShortVolatile: return inline_unsafe_access(!is_native_ptr, is_store, T_SHORT, Volatile, false); |
608 case vmIntrinsics::_putIntVolatile: return inline_unsafe_access(!is_native_ptr, is_store, T_INT, is_volatile, false); |
611 case vmIntrinsics::_putCharVolatile: return inline_unsafe_access(!is_native_ptr, is_store, T_CHAR, Volatile, false); |
609 case vmIntrinsics::_putLongVolatile: return inline_unsafe_access(!is_native_ptr, is_store, T_LONG, is_volatile, false); |
612 case vmIntrinsics::_putIntVolatile: return inline_unsafe_access(!is_native_ptr, is_store, T_INT, Volatile, false); |
610 case vmIntrinsics::_putFloatVolatile: return inline_unsafe_access(!is_native_ptr, is_store, T_FLOAT, is_volatile, false); |
613 case vmIntrinsics::_putLongVolatile: return inline_unsafe_access(!is_native_ptr, is_store, T_LONG, Volatile, false); |
611 case vmIntrinsics::_putDoubleVolatile: return inline_unsafe_access(!is_native_ptr, is_store, T_DOUBLE, is_volatile, false); |
614 case vmIntrinsics::_putFloatVolatile: return inline_unsafe_access(!is_native_ptr, is_store, T_FLOAT, Volatile, false); |
612 |
615 case vmIntrinsics::_putDoubleVolatile: return inline_unsafe_access(!is_native_ptr, is_store, T_DOUBLE, Volatile, false); |
613 case vmIntrinsics::_getShortUnaligned: return inline_unsafe_access(!is_native_ptr, !is_store, T_SHORT, !is_volatile, true); |
616 |
614 case vmIntrinsics::_getCharUnaligned: return inline_unsafe_access(!is_native_ptr, !is_store, T_CHAR, !is_volatile, true); |
617 case vmIntrinsics::_getShortUnaligned: return inline_unsafe_access(!is_native_ptr, !is_store, T_SHORT, Relaxed, true); |
615 case vmIntrinsics::_getIntUnaligned: return inline_unsafe_access(!is_native_ptr, !is_store, T_INT, !is_volatile, true); |
618 case vmIntrinsics::_getCharUnaligned: return inline_unsafe_access(!is_native_ptr, !is_store, T_CHAR, Relaxed, true); |
616 case vmIntrinsics::_getLongUnaligned: return inline_unsafe_access(!is_native_ptr, !is_store, T_LONG, !is_volatile, true); |
619 case vmIntrinsics::_getIntUnaligned: return inline_unsafe_access(!is_native_ptr, !is_store, T_INT, Relaxed, true); |
617 |
620 case vmIntrinsics::_getLongUnaligned: return inline_unsafe_access(!is_native_ptr, !is_store, T_LONG, Relaxed, true); |
618 case vmIntrinsics::_putShortUnaligned: return inline_unsafe_access(!is_native_ptr, is_store, T_SHORT, !is_volatile, true); |
621 |
619 case vmIntrinsics::_putCharUnaligned: return inline_unsafe_access(!is_native_ptr, is_store, T_CHAR, !is_volatile, true); |
622 case vmIntrinsics::_putShortUnaligned: return inline_unsafe_access(!is_native_ptr, is_store, T_SHORT, Relaxed, true); |
620 case vmIntrinsics::_putIntUnaligned: return inline_unsafe_access(!is_native_ptr, is_store, T_INT, !is_volatile, true); |
623 case vmIntrinsics::_putCharUnaligned: return inline_unsafe_access(!is_native_ptr, is_store, T_CHAR, Relaxed, true); |
621 case vmIntrinsics::_putLongUnaligned: return inline_unsafe_access(!is_native_ptr, is_store, T_LONG, !is_volatile, true); |
624 case vmIntrinsics::_putIntUnaligned: return inline_unsafe_access(!is_native_ptr, is_store, T_INT, Relaxed, true); |
622 |
625 case vmIntrinsics::_putLongUnaligned: return inline_unsafe_access(!is_native_ptr, is_store, T_LONG, Relaxed, true); |
623 case vmIntrinsics::_compareAndSwapObject: return inline_unsafe_load_store(T_OBJECT, LS_cmpxchg); |
626 |
624 case vmIntrinsics::_compareAndSwapInt: return inline_unsafe_load_store(T_INT, LS_cmpxchg); |
627 case vmIntrinsics::_putOrderedObject: return inline_unsafe_access(!is_native_ptr, is_store, T_OBJECT, Release, false); |
625 case vmIntrinsics::_compareAndSwapLong: return inline_unsafe_load_store(T_LONG, LS_cmpxchg); |
628 case vmIntrinsics::_putOrderedInt: return inline_unsafe_access(!is_native_ptr, is_store, T_INT, Release, false); |
626 |
629 case vmIntrinsics::_putOrderedLong: return inline_unsafe_access(!is_native_ptr, is_store, T_LONG, Release, false); |
627 case vmIntrinsics::_putOrderedObject: return inline_unsafe_ordered_store(T_OBJECT); |
630 |
628 case vmIntrinsics::_putOrderedInt: return inline_unsafe_ordered_store(T_INT); |
631 case vmIntrinsics::_getObjectAcquire: return inline_unsafe_access(!is_native_ptr, !is_store, T_OBJECT, Acquire, false); |
629 case vmIntrinsics::_putOrderedLong: return inline_unsafe_ordered_store(T_LONG); |
632 case vmIntrinsics::_getBooleanAcquire: return inline_unsafe_access(!is_native_ptr, !is_store, T_BOOLEAN, Acquire, false); |
630 |
633 case vmIntrinsics::_getByteAcquire: return inline_unsafe_access(!is_native_ptr, !is_store, T_BYTE, Acquire, false); |
631 case vmIntrinsics::_getAndAddInt: return inline_unsafe_load_store(T_INT, LS_xadd); |
634 case vmIntrinsics::_getShortAcquire: return inline_unsafe_access(!is_native_ptr, !is_store, T_SHORT, Acquire, false); |
632 case vmIntrinsics::_getAndAddLong: return inline_unsafe_load_store(T_LONG, LS_xadd); |
635 case vmIntrinsics::_getCharAcquire: return inline_unsafe_access(!is_native_ptr, !is_store, T_CHAR, Acquire, false); |
633 case vmIntrinsics::_getAndSetInt: return inline_unsafe_load_store(T_INT, LS_xchg); |
636 case vmIntrinsics::_getIntAcquire: return inline_unsafe_access(!is_native_ptr, !is_store, T_INT, Acquire, false); |
634 case vmIntrinsics::_getAndSetLong: return inline_unsafe_load_store(T_LONG, LS_xchg); |
637 case vmIntrinsics::_getLongAcquire: return inline_unsafe_access(!is_native_ptr, !is_store, T_LONG, Acquire, false); |
635 case vmIntrinsics::_getAndSetObject: return inline_unsafe_load_store(T_OBJECT, LS_xchg); |
638 case vmIntrinsics::_getFloatAcquire: return inline_unsafe_access(!is_native_ptr, !is_store, T_FLOAT, Acquire, false); |
|
639 case vmIntrinsics::_getDoubleAcquire: return inline_unsafe_access(!is_native_ptr, !is_store, T_DOUBLE, Acquire, false); |
|
640 |
|
641 case vmIntrinsics::_putObjectRelease: return inline_unsafe_access(!is_native_ptr, is_store, T_OBJECT, Release, false); |
|
642 case vmIntrinsics::_putBooleanRelease: return inline_unsafe_access(!is_native_ptr, is_store, T_BOOLEAN, Release, false); |
|
643 case vmIntrinsics::_putByteRelease: return inline_unsafe_access(!is_native_ptr, is_store, T_BYTE, Release, false); |
|
644 case vmIntrinsics::_putShortRelease: return inline_unsafe_access(!is_native_ptr, is_store, T_SHORT, Release, false); |
|
645 case vmIntrinsics::_putCharRelease: return inline_unsafe_access(!is_native_ptr, is_store, T_CHAR, Release, false); |
|
646 case vmIntrinsics::_putIntRelease: return inline_unsafe_access(!is_native_ptr, is_store, T_INT, Release, false); |
|
647 case vmIntrinsics::_putLongRelease: return inline_unsafe_access(!is_native_ptr, is_store, T_LONG, Release, false); |
|
648 case vmIntrinsics::_putFloatRelease: return inline_unsafe_access(!is_native_ptr, is_store, T_FLOAT, Release, false); |
|
649 case vmIntrinsics::_putDoubleRelease: return inline_unsafe_access(!is_native_ptr, is_store, T_DOUBLE, Release, false); |
|
650 |
|
651 case vmIntrinsics::_getObjectOpaque: return inline_unsafe_access(!is_native_ptr, !is_store, T_OBJECT, Opaque, false); |
|
652 case vmIntrinsics::_getBooleanOpaque: return inline_unsafe_access(!is_native_ptr, !is_store, T_BOOLEAN, Opaque, false); |
|
653 case vmIntrinsics::_getByteOpaque: return inline_unsafe_access(!is_native_ptr, !is_store, T_BYTE, Opaque, false); |
|
654 case vmIntrinsics::_getShortOpaque: return inline_unsafe_access(!is_native_ptr, !is_store, T_SHORT, Opaque, false); |
|
655 case vmIntrinsics::_getCharOpaque: return inline_unsafe_access(!is_native_ptr, !is_store, T_CHAR, Opaque, false); |
|
656 case vmIntrinsics::_getIntOpaque: return inline_unsafe_access(!is_native_ptr, !is_store, T_INT, Opaque, false); |
|
657 case vmIntrinsics::_getLongOpaque: return inline_unsafe_access(!is_native_ptr, !is_store, T_LONG, Opaque, false); |
|
658 case vmIntrinsics::_getFloatOpaque: return inline_unsafe_access(!is_native_ptr, !is_store, T_FLOAT, Opaque, false); |
|
659 case vmIntrinsics::_getDoubleOpaque: return inline_unsafe_access(!is_native_ptr, !is_store, T_DOUBLE, Opaque, false); |
|
660 |
|
661 case vmIntrinsics::_putObjectOpaque: return inline_unsafe_access(!is_native_ptr, is_store, T_OBJECT, Opaque, false); |
|
662 case vmIntrinsics::_putBooleanOpaque: return inline_unsafe_access(!is_native_ptr, is_store, T_BOOLEAN, Opaque, false); |
|
663 case vmIntrinsics::_putByteOpaque: return inline_unsafe_access(!is_native_ptr, is_store, T_BYTE, Opaque, false); |
|
664 case vmIntrinsics::_putShortOpaque: return inline_unsafe_access(!is_native_ptr, is_store, T_SHORT, Opaque, false); |
|
665 case vmIntrinsics::_putCharOpaque: return inline_unsafe_access(!is_native_ptr, is_store, T_CHAR, Opaque, false); |
|
666 case vmIntrinsics::_putIntOpaque: return inline_unsafe_access(!is_native_ptr, is_store, T_INT, Opaque, false); |
|
667 case vmIntrinsics::_putLongOpaque: return inline_unsafe_access(!is_native_ptr, is_store, T_LONG, Opaque, false); |
|
668 case vmIntrinsics::_putFloatOpaque: return inline_unsafe_access(!is_native_ptr, is_store, T_FLOAT, Opaque, false); |
|
669 case vmIntrinsics::_putDoubleOpaque: return inline_unsafe_access(!is_native_ptr, is_store, T_DOUBLE, Opaque, false); |
|
670 |
|
671 case vmIntrinsics::_compareAndSwapObject: return inline_unsafe_load_store(T_OBJECT, LS_cmp_swap, Volatile); |
|
672 case vmIntrinsics::_compareAndSwapInt: return inline_unsafe_load_store(T_INT, LS_cmp_swap, Volatile); |
|
673 case vmIntrinsics::_compareAndSwapLong: return inline_unsafe_load_store(T_LONG, LS_cmp_swap, Volatile); |
|
674 |
|
675 case vmIntrinsics::_weakCompareAndSwapObject: return inline_unsafe_load_store(T_OBJECT, LS_cmp_swap_weak, Relaxed); |
|
676 case vmIntrinsics::_weakCompareAndSwapObjectAcquire: return inline_unsafe_load_store(T_OBJECT, LS_cmp_swap_weak, Acquire); |
|
677 case vmIntrinsics::_weakCompareAndSwapObjectRelease: return inline_unsafe_load_store(T_OBJECT, LS_cmp_swap_weak, Release); |
|
678 case vmIntrinsics::_weakCompareAndSwapInt: return inline_unsafe_load_store(T_INT, LS_cmp_swap_weak, Relaxed); |
|
679 case vmIntrinsics::_weakCompareAndSwapIntAcquire: return inline_unsafe_load_store(T_INT, LS_cmp_swap_weak, Acquire); |
|
680 case vmIntrinsics::_weakCompareAndSwapIntRelease: return inline_unsafe_load_store(T_INT, LS_cmp_swap_weak, Release); |
|
681 case vmIntrinsics::_weakCompareAndSwapLong: return inline_unsafe_load_store(T_LONG, LS_cmp_swap_weak, Relaxed); |
|
682 case vmIntrinsics::_weakCompareAndSwapLongAcquire: return inline_unsafe_load_store(T_LONG, LS_cmp_swap_weak, Acquire); |
|
683 case vmIntrinsics::_weakCompareAndSwapLongRelease: return inline_unsafe_load_store(T_LONG, LS_cmp_swap_weak, Release); |
|
684 |
|
685 case vmIntrinsics::_compareAndExchangeObjectVolatile: return inline_unsafe_load_store(T_OBJECT, LS_cmp_exchange, Volatile); |
|
686 case vmIntrinsics::_compareAndExchangeObjectAcquire: return inline_unsafe_load_store(T_OBJECT, LS_cmp_exchange, Acquire); |
|
687 case vmIntrinsics::_compareAndExchangeObjectRelease: return inline_unsafe_load_store(T_OBJECT, LS_cmp_exchange, Release); |
|
688 case vmIntrinsics::_compareAndExchangeIntVolatile: return inline_unsafe_load_store(T_INT, LS_cmp_exchange, Volatile); |
|
689 case vmIntrinsics::_compareAndExchangeIntAcquire: return inline_unsafe_load_store(T_INT, LS_cmp_exchange, Acquire); |
|
690 case vmIntrinsics::_compareAndExchangeIntRelease: return inline_unsafe_load_store(T_INT, LS_cmp_exchange, Release); |
|
691 case vmIntrinsics::_compareAndExchangeLongVolatile: return inline_unsafe_load_store(T_LONG, LS_cmp_exchange, Volatile); |
|
692 case vmIntrinsics::_compareAndExchangeLongAcquire: return inline_unsafe_load_store(T_LONG, LS_cmp_exchange, Acquire); |
|
693 case vmIntrinsics::_compareAndExchangeLongRelease: return inline_unsafe_load_store(T_LONG, LS_cmp_exchange, Release); |
|
694 |
|
695 case vmIntrinsics::_getAndAddInt: return inline_unsafe_load_store(T_INT, LS_get_add, Volatile); |
|
696 case vmIntrinsics::_getAndAddLong: return inline_unsafe_load_store(T_LONG, LS_get_add, Volatile); |
|
697 case vmIntrinsics::_getAndSetInt: return inline_unsafe_load_store(T_INT, LS_get_set, Volatile); |
|
698 case vmIntrinsics::_getAndSetLong: return inline_unsafe_load_store(T_LONG, LS_get_set, Volatile); |
|
699 case vmIntrinsics::_getAndSetObject: return inline_unsafe_load_store(T_OBJECT, LS_get_set, Volatile); |
636 |
700 |
637 case vmIntrinsics::_loadFence: |
701 case vmIntrinsics::_loadFence: |
638 case vmIntrinsics::_storeFence: |
702 case vmIntrinsics::_storeFence: |
639 case vmIntrinsics::_fullFence: return inline_unsafe_fence(intrinsic_id()); |
703 case vmIntrinsics::_fullFence: return inline_unsafe_fence(intrinsic_id()); |
640 |
704 |
2529 sync_kit(ideal); |
2638 sync_kit(ideal); |
2530 Node* st = store_oop_to_unknown(control(), heap_base_oop, adr, adr_type, val, type, mo, mismatched); |
2639 Node* st = store_oop_to_unknown(control(), heap_base_oop, adr, adr_type, val, type, mo, mismatched); |
2531 // Update IdealKit memory. |
2640 // Update IdealKit memory. |
2532 __ sync_kit(this); |
2641 __ sync_kit(this); |
2533 } __ else_(); { |
2642 } __ else_(); { |
2534 __ store(__ ctrl(), adr, val, type, alias_type->index(), mo, is_volatile, mismatched); |
2643 __ store(__ ctrl(), adr, val, type, alias_type->index(), mo, requires_atomic_access, mismatched); |
2535 } __ end_if(); |
2644 } __ end_if(); |
2536 // Final sync IdealKit and GraphKit. |
2645 // Final sync IdealKit and GraphKit. |
2537 final_sync(ideal); |
2646 final_sync(ideal); |
2538 #undef __ |
2647 #undef __ |
2539 } |
2648 } |
2540 } |
2649 } |
2541 } |
2650 } |
2542 |
2651 |
2543 if (is_volatile) { |
2652 switch(kind) { |
2544 if (!is_store) { |
2653 case Relaxed: |
2545 insert_mem_bar(Op_MemBarAcquire); |
2654 case Opaque: |
2546 } else { |
2655 case Release: |
2547 if (!support_IRIW_for_not_multiple_copy_atomic_cpu) { |
2656 break; |
2548 insert_mem_bar(Op_MemBarVolatile); |
2657 case Acquire: |
|
2658 case Volatile: |
|
2659 if (!is_store) { |
|
2660 insert_mem_bar(Op_MemBarAcquire); |
|
2661 } else { |
|
2662 if (!support_IRIW_for_not_multiple_copy_atomic_cpu) { |
|
2663 insert_mem_bar(Op_MemBarVolatile); |
|
2664 } |
2549 } |
2665 } |
2550 } |
2666 break; |
|
2667 default: |
|
2668 ShouldNotReachHere(); |
2551 } |
2669 } |
2552 |
2670 |
2553 if (need_mem_bar) insert_mem_bar(Op_MemBarCPUOrder); |
2671 if (need_mem_bar) insert_mem_bar(Op_MemBarCPUOrder); |
2554 |
2672 |
2555 return true; |
2673 return true; |
2556 } |
2674 } |
2557 |
2675 |
2558 //----------------------------inline_unsafe_load_store---------------------------- |
2676 //----------------------------inline_unsafe_load_store---------------------------- |
2559 // This method serves a couple of different customers (depending on LoadStoreKind): |
2677 // This method serves a couple of different customers (depending on LoadStoreKind): |
2560 // |
2678 // |
2561 // LS_cmpxchg: |
2679 // LS_cmp_swap: |
2562 // public final native boolean compareAndSwapObject(Object o, long offset, Object expected, Object x); |
|
2563 // public final native boolean compareAndSwapInt( Object o, long offset, int expected, int x); |
|
2564 // public final native boolean compareAndSwapLong( Object o, long offset, long expected, long x); |
|
2565 // |
2680 // |
2566 // LS_xadd: |
2681 // boolean compareAndSwapObject(Object o, long offset, Object expected, Object x); |
2567 // public int getAndAddInt( Object o, long offset, int delta) |
2682 // boolean compareAndSwapInt( Object o, long offset, int expected, int x); |
2568 // public long getAndAddLong(Object o, long offset, long delta) |
2683 // boolean compareAndSwapLong( Object o, long offset, long expected, long x); |
2569 // |
2684 // |
2570 // LS_xchg: |
2685 // LS_cmp_swap_weak: |
|
2686 // |
|
2687 // boolean weakCompareAndSwapObject( Object o, long offset, Object expected, Object x); |
|
2688 // boolean weakCompareAndSwapObjectAcquire(Object o, long offset, Object expected, Object x); |
|
2689 // boolean weakCompareAndSwapObjectRelease(Object o, long offset, Object expected, Object x); |
|
2690 // |
|
2691 // boolean weakCompareAndSwapInt( Object o, long offset, int expected, int x); |
|
2692 // boolean weakCompareAndSwapIntAcquire( Object o, long offset, int expected, int x); |
|
2693 // boolean weakCompareAndSwapIntRelease( Object o, long offset, int expected, int x); |
|
2694 // |
|
2695 // boolean weakCompareAndSwapLong( Object o, long offset, long expected, long x); |
|
2696 // boolean weakCompareAndSwapLongAcquire( Object o, long offset, long expected, long x); |
|
2697 // boolean weakCompareAndSwapLongRelease( Object o, long offset, long expected, long x); |
|
2698 // |
|
2699 // LS_cmp_exchange: |
|
2700 // |
|
2701 // Object compareAndExchangeObjectVolatile(Object o, long offset, Object expected, Object x); |
|
2702 // Object compareAndExchangeObjectAcquire( Object o, long offset, Object expected, Object x); |
|
2703 // Object compareAndExchangeObjectRelease( Object o, long offset, Object expected, Object x); |
|
2704 // |
|
2705 // Object compareAndExchangeIntVolatile( Object o, long offset, Object expected, Object x); |
|
2706 // Object compareAndExchangeIntAcquire( Object o, long offset, Object expected, Object x); |
|
2707 // Object compareAndExchangeIntRelease( Object o, long offset, Object expected, Object x); |
|
2708 // |
|
2709 // Object compareAndExchangeLongVolatile( Object o, long offset, Object expected, Object x); |
|
2710 // Object compareAndExchangeLongAcquire( Object o, long offset, Object expected, Object x); |
|
2711 // Object compareAndExchangeLongRelease( Object o, long offset, Object expected, Object x); |
|
2712 // |
|
2713 // LS_get_add: |
|
2714 // |
|
2715 // int getAndAddInt( Object o, long offset, int delta) |
|
2716 // long getAndAddLong(Object o, long offset, long delta) |
|
2717 // |
|
2718 // LS_get_set: |
|
2719 // |
2571 // int getAndSet(Object o, long offset, int newValue) |
2720 // int getAndSet(Object o, long offset, int newValue) |
2572 // long getAndSet(Object o, long offset, long newValue) |
2721 // long getAndSet(Object o, long offset, long newValue) |
2573 // Object getAndSet(Object o, long offset, Object newValue) |
2722 // Object getAndSet(Object o, long offset, Object newValue) |
2574 // |
2723 // |
2575 bool LibraryCallKit::inline_unsafe_load_store(BasicType type, LoadStoreKind kind) { |
2724 bool LibraryCallKit::inline_unsafe_load_store(const BasicType type, const LoadStoreKind kind, const AccessKind access_kind) { |
2576 // This basic scheme here is the same as inline_unsafe_access, but |
2725 // This basic scheme here is the same as inline_unsafe_access, but |
2577 // differs in enough details that combining them would make the code |
2726 // differs in enough details that combining them would make the code |
2578 // overly confusing. (This is a true fact! I originally combined |
2727 // overly confusing. (This is a true fact! I originally combined |
2579 // them, but even I was confused by it!) As much code/comments as |
2728 // them, but even I was confused by it!) As much code/comments as |
2580 // possible are retained from inline_unsafe_access though to make |
2729 // possible are retained from inline_unsafe_access though to make |
2682 // For now, we handle only those cases that actually exist: ints, |
2883 // For now, we handle only those cases that actually exist: ints, |
2683 // longs, and Object. Adding others should be straightforward. |
2884 // longs, and Object. Adding others should be straightforward. |
2684 Node* load_store = NULL; |
2885 Node* load_store = NULL; |
2685 switch(type) { |
2886 switch(type) { |
2686 case T_INT: |
2887 case T_INT: |
2687 if (kind == LS_xadd) { |
2888 switch(kind) { |
2688 load_store = _gvn.transform(new GetAndAddINode(control(), mem, adr, newval, adr_type)); |
2889 case LS_get_add: |
2689 } else if (kind == LS_xchg) { |
2890 load_store = _gvn.transform(new GetAndAddINode(control(), mem, adr, newval, adr_type)); |
2690 load_store = _gvn.transform(new GetAndSetINode(control(), mem, adr, newval, adr_type)); |
2891 break; |
2691 } else if (kind == LS_cmpxchg) { |
2892 case LS_get_set: |
2692 load_store = _gvn.transform(new CompareAndSwapINode(control(), mem, adr, newval, oldval)); |
2893 load_store = _gvn.transform(new GetAndSetINode(control(), mem, adr, newval, adr_type)); |
2693 } else { |
2894 break; |
2694 ShouldNotReachHere(); |
2895 case LS_cmp_swap_weak: |
|
2896 load_store = _gvn.transform(new WeakCompareAndSwapINode(control(), mem, adr, newval, oldval, mo)); |
|
2897 break; |
|
2898 case LS_cmp_swap: |
|
2899 load_store = _gvn.transform(new CompareAndSwapINode(control(), mem, adr, newval, oldval, mo)); |
|
2900 break; |
|
2901 case LS_cmp_exchange: |
|
2902 load_store = _gvn.transform(new CompareAndExchangeINode(control(), mem, adr, newval, oldval, adr_type, mo)); |
|
2903 break; |
|
2904 default: |
|
2905 ShouldNotReachHere(); |
2695 } |
2906 } |
2696 break; |
2907 break; |
2697 case T_LONG: |
2908 case T_LONG: |
2698 if (kind == LS_xadd) { |
2909 switch(kind) { |
2699 load_store = _gvn.transform(new GetAndAddLNode(control(), mem, adr, newval, adr_type)); |
2910 case LS_get_add: |
2700 } else if (kind == LS_xchg) { |
2911 load_store = _gvn.transform(new GetAndAddLNode(control(), mem, adr, newval, adr_type)); |
2701 load_store = _gvn.transform(new GetAndSetLNode(control(), mem, adr, newval, adr_type)); |
2912 break; |
2702 } else if (kind == LS_cmpxchg) { |
2913 case LS_get_set: |
2703 load_store = _gvn.transform(new CompareAndSwapLNode(control(), mem, adr, newval, oldval)); |
2914 load_store = _gvn.transform(new GetAndSetLNode(control(), mem, adr, newval, adr_type)); |
2704 } else { |
2915 break; |
2705 ShouldNotReachHere(); |
2916 case LS_cmp_swap_weak: |
|
2917 load_store = _gvn.transform(new WeakCompareAndSwapLNode(control(), mem, adr, newval, oldval, mo)); |
|
2918 break; |
|
2919 case LS_cmp_swap: |
|
2920 load_store = _gvn.transform(new CompareAndSwapLNode(control(), mem, adr, newval, oldval, mo)); |
|
2921 break; |
|
2922 case LS_cmp_exchange: |
|
2923 load_store = _gvn.transform(new CompareAndExchangeLNode(control(), mem, adr, newval, oldval, adr_type, mo)); |
|
2924 break; |
|
2925 default: |
|
2926 ShouldNotReachHere(); |
2706 } |
2927 } |
2707 break; |
2928 break; |
2708 case T_OBJECT: |
2929 case T_OBJECT: |
2709 // Transformation of a value which could be NULL pointer (CastPP #NULL) |
2930 // Transformation of a value which could be NULL pointer (CastPP #NULL) |
2710 // could be delayed during Parse (for example, in adjust_map_after_if()). |
2931 // could be delayed during Parse (for example, in adjust_map_after_if()). |
2711 // Execute transformation here to avoid barrier generation in such case. |
2932 // Execute transformation here to avoid barrier generation in such case. |
2712 if (_gvn.type(newval) == TypePtr::NULL_PTR) |
2933 if (_gvn.type(newval) == TypePtr::NULL_PTR) |
2713 newval = _gvn.makecon(TypePtr::NULL_PTR); |
2934 newval = _gvn.makecon(TypePtr::NULL_PTR); |
2714 |
2935 |
2715 // Reference stores need a store barrier. |
2936 // Reference stores need a store barrier. |
2716 if (kind == LS_xchg) { |
2937 switch(kind) { |
2717 // If pre-barrier must execute before the oop store, old value will require do_load here. |
2938 case LS_get_set: { |
2718 if (!can_move_pre_barrier()) { |
2939 // If pre-barrier must execute before the oop store, old value will require do_load here. |
2719 pre_barrier(true /* do_load*/, |
2940 if (!can_move_pre_barrier()) { |
2720 control(), base, adr, alias_idx, newval, value_type->make_oopptr(), |
2941 pre_barrier(true /* do_load*/, |
2721 NULL /* pre_val*/, |
2942 control(), base, adr, alias_idx, newval, value_type->make_oopptr(), |
|
2943 NULL /* pre_val*/, |
|
2944 T_OBJECT); |
|
2945 } // Else move pre_barrier to use load_store value, see below. |
|
2946 break; |
|
2947 } |
|
2948 case LS_cmp_swap_weak: |
|
2949 case LS_cmp_swap: |
|
2950 case LS_cmp_exchange: { |
|
2951 // Same as for newval above: |
|
2952 if (_gvn.type(oldval) == TypePtr::NULL_PTR) { |
|
2953 oldval = _gvn.makecon(TypePtr::NULL_PTR); |
|
2954 } |
|
2955 // The only known value which might get overwritten is oldval. |
|
2956 pre_barrier(false /* do_load */, |
|
2957 control(), NULL, NULL, max_juint, NULL, NULL, |
|
2958 oldval /* pre_val */, |
2722 T_OBJECT); |
2959 T_OBJECT); |
2723 } // Else move pre_barrier to use load_store value, see below. |
2960 break; |
2724 } else if (kind == LS_cmpxchg) { |
|
2725 // Same as for newval above: |
|
2726 if (_gvn.type(oldval) == TypePtr::NULL_PTR) { |
|
2727 oldval = _gvn.makecon(TypePtr::NULL_PTR); |
|
2728 } |
2961 } |
2729 // The only known value which might get overwritten is oldval. |
2962 default: |
2730 pre_barrier(false /* do_load */, |
2963 ShouldNotReachHere(); |
2731 control(), NULL, NULL, max_juint, NULL, NULL, |
|
2732 oldval /* pre_val */, |
|
2733 T_OBJECT); |
|
2734 } else { |
|
2735 ShouldNotReachHere(); |
|
2736 } |
2964 } |
2737 |
2965 |
2738 #ifdef _LP64 |
2966 #ifdef _LP64 |
2739 if (adr->bottom_type()->is_ptr_to_narrowoop()) { |
2967 if (adr->bottom_type()->is_ptr_to_narrowoop()) { |
2740 Node *newval_enc = _gvn.transform(new EncodePNode(newval, newval->bottom_type()->make_narrowoop())); |
2968 Node *newval_enc = _gvn.transform(new EncodePNode(newval, newval->bottom_type()->make_narrowoop())); |
2741 if (kind == LS_xchg) { |
2969 |
2742 load_store = _gvn.transform(new GetAndSetNNode(control(), mem, adr, |
2970 switch(kind) { |
2743 newval_enc, adr_type, value_type->make_narrowoop())); |
2971 case LS_get_set: |
2744 } else { |
2972 load_store = _gvn.transform(new GetAndSetNNode(control(), mem, adr, newval_enc, adr_type, value_type->make_narrowoop())); |
2745 assert(kind == LS_cmpxchg, "wrong LoadStore operation"); |
2973 break; |
2746 Node *oldval_enc = _gvn.transform(new EncodePNode(oldval, oldval->bottom_type()->make_narrowoop())); |
2974 case LS_cmp_swap_weak: { |
2747 load_store = _gvn.transform(new CompareAndSwapNNode(control(), mem, adr, |
2975 Node *oldval_enc = _gvn.transform(new EncodePNode(oldval, oldval->bottom_type()->make_narrowoop())); |
2748 newval_enc, oldval_enc)); |
2976 load_store = _gvn.transform(new WeakCompareAndSwapNNode(control(), mem, adr, newval_enc, oldval_enc, mo)); |
|
2977 break; |
|
2978 } |
|
2979 case LS_cmp_swap: { |
|
2980 Node *oldval_enc = _gvn.transform(new EncodePNode(oldval, oldval->bottom_type()->make_narrowoop())); |
|
2981 load_store = _gvn.transform(new CompareAndSwapNNode(control(), mem, adr, newval_enc, oldval_enc, mo)); |
|
2982 break; |
|
2983 } |
|
2984 case LS_cmp_exchange: { |
|
2985 Node *oldval_enc = _gvn.transform(new EncodePNode(oldval, oldval->bottom_type()->make_narrowoop())); |
|
2986 load_store = _gvn.transform(new CompareAndExchangeNNode(control(), mem, adr, newval_enc, oldval_enc, adr_type, value_type->make_narrowoop(), mo)); |
|
2987 break; |
|
2988 } |
|
2989 default: |
|
2990 ShouldNotReachHere(); |
2749 } |
2991 } |
2750 } else |
2992 } else |
2751 #endif |
2993 #endif |
2752 { |
2994 switch (kind) { |
2753 if (kind == LS_xchg) { |
2995 case LS_get_set: |
2754 load_store = _gvn.transform(new GetAndSetPNode(control(), mem, adr, newval, adr_type, value_type->is_oopptr())); |
2996 load_store = _gvn.transform(new GetAndSetPNode(control(), mem, adr, newval, adr_type, value_type->is_oopptr())); |
2755 } else { |
2997 break; |
2756 assert(kind == LS_cmpxchg, "wrong LoadStore operation"); |
2998 case LS_cmp_swap_weak: |
2757 load_store = _gvn.transform(new CompareAndSwapPNode(control(), mem, adr, newval, oldval)); |
2999 load_store = _gvn.transform(new WeakCompareAndSwapPNode(control(), mem, adr, newval, oldval, mo)); |
|
3000 break; |
|
3001 case LS_cmp_swap: |
|
3002 load_store = _gvn.transform(new CompareAndSwapPNode(control(), mem, adr, newval, oldval, mo)); |
|
3003 break; |
|
3004 case LS_cmp_exchange: |
|
3005 load_store = _gvn.transform(new CompareAndExchangePNode(control(), mem, adr, newval, oldval, adr_type, value_type->is_oopptr(), mo)); |
|
3006 break; |
|
3007 default: |
|
3008 ShouldNotReachHere(); |
|
3009 } |
|
3010 |
|
3011 // Emit the post barrier only when the actual store happened. This makes sense |
|
3012 // to check only for LS_cmp_* that can fail to set the value. |
|
3013 // LS_cmp_exchange does not produce any branches by default, so there is no |
|
3014 // boolean result to piggyback on. TODO: When we merge CompareAndSwap with |
|
3015 // CompareAndExchange and move branches here, it would make sense to conditionalize |
|
3016 // post_barriers for LS_cmp_exchange as well. |
|
3017 // |
|
3018 // CAS success path is marked more likely since we anticipate this is a performance |
|
3019 // critical path, while CAS failure path can use the penalty for going through unlikely |
|
3020 // path as backoff. Which is still better than doing a store barrier there. |
|
3021 switch (kind) { |
|
3022 case LS_get_set: |
|
3023 case LS_cmp_exchange: { |
|
3024 post_barrier(control(), load_store, base, adr, alias_idx, newval, T_OBJECT, true); |
|
3025 break; |
2758 } |
3026 } |
2759 } |
3027 case LS_cmp_swap_weak: |
2760 if (kind == LS_cmpxchg) { |
3028 case LS_cmp_swap: { |
2761 // Emit the post barrier only when the actual store happened. |
3029 IdealKit ideal(this); |
2762 // This makes sense to check only for compareAndSet that can fail to set the value. |
3030 ideal.if_then(load_store, BoolTest::ne, ideal.ConI(0), PROB_STATIC_FREQUENT); { |
2763 // CAS success path is marked more likely since we anticipate this is a performance |
3031 sync_kit(ideal); |
2764 // critical path, while CAS failure path can use the penalty for going through unlikely |
3032 post_barrier(ideal.ctrl(), load_store, base, adr, alias_idx, newval, T_OBJECT, true); |
2765 // path as backoff. Which is still better than doing a store barrier there. |
3033 ideal.sync_kit(this); |
2766 IdealKit ideal(this); |
3034 } ideal.end_if(); |
2767 ideal.if_then(load_store, BoolTest::ne, ideal.ConI(0), PROB_STATIC_FREQUENT); { |
3035 final_sync(ideal); |
2768 sync_kit(ideal); |
3036 break; |
2769 post_barrier(ideal.ctrl(), load_store, base, adr, alias_idx, newval, T_OBJECT, true); |
3037 } |
2770 ideal.sync_kit(this); |
3038 default: |
2771 } ideal.end_if(); |
3039 ShouldNotReachHere(); |
2772 final_sync(ideal); |
|
2773 } else { |
|
2774 post_barrier(control(), load_store, base, adr, alias_idx, newval, T_OBJECT, true); |
|
2775 } |
3040 } |
2776 break; |
3041 break; |
2777 default: |
3042 default: |
2778 fatal("unexpected type %d: %s", type, type2name(type)); |
3043 fatal("unexpected type %d: %s", type, type2name(type)); |
2779 break; |
3044 break; |