413 414 // Atomics 415 // CmpxchgX sets condition register to cmpX(current, compare). 416 // (flag == ne) => (dest_current_value != compare_value), (!swapped) 417 // (flag == eq) => (dest_current_value == compare_value), ( swapped) 418 static inline bool cmpxchgx_hint_acquire_lock() { return true; } 419 // The stxcx will probably not be succeeded by a releasing store. 420 static inline bool cmpxchgx_hint_release_lock() { return false; } 421 static inline bool cmpxchgx_hint_atomic_update() { return false; } 422 423 // Cmpxchg semantics 424 enum { 425 MemBarNone = 0, 426 MemBarRel = 1, 427 MemBarAcq = 2, 428 MemBarFenceAfter = 4 // use powers of 2 429 }; 430 void cmpxchgw(ConditionRegister flag, 431 Register dest_current_value, Register compare_value, Register exchange_value, Register addr_base, 432 int semantics, bool cmpxchgx_hint = false, 433 Register int_flag_success = noreg, bool contention_hint = false); 434 void cmpxchgd(ConditionRegister flag, 435 Register dest_current_value, RegisterOrConstant compare_value, Register exchange_value, 436 Register addr_base, int semantics, bool cmpxchgx_hint = false, 437 Register int_flag_success = noreg, Label* failed = NULL, bool contention_hint = false); 438 439 // interface method calling 440 void lookup_interface_method(Register recv_klass, 441 Register intf_klass, 442 RegisterOrConstant itable_index, 443 Register method_result, 444 Register temp_reg, Register temp2_reg, 445 Label& no_such_interface); 446 447 // virtual method calling 448 void lookup_virtual_method(Register recv_klass, 449 RegisterOrConstant vtable_index, 450 Register method_result); 451 452 // Test sub_klass against super_klass, with fast and slow paths. 453 454 // The fast path produces a tri-state answer: yes / no / maybe-slow. 455 // One of the three labels can be NULL, meaning take the fall-through. 456 // If super_check_offset is -1, the value is loaded up from super_klass. 457 // No registers are killed, except temp_reg and temp2_reg. | 413 414 // Atomics 415 // CmpxchgX sets condition register to cmpX(current, compare). 416 // (flag == ne) => (dest_current_value != compare_value), (!swapped) 417 // (flag == eq) => (dest_current_value == compare_value), ( swapped) 418 static inline bool cmpxchgx_hint_acquire_lock() { return true; } 419 // The stxcx will probably not be succeeded by a releasing store. 420 static inline bool cmpxchgx_hint_release_lock() { return false; } 421 static inline bool cmpxchgx_hint_atomic_update() { return false; } 422 423 // Cmpxchg semantics 424 enum { 425 MemBarNone = 0, 426 MemBarRel = 1, 427 MemBarAcq = 2, 428 MemBarFenceAfter = 4 // use powers of 2 429 }; 430 void cmpxchgw(ConditionRegister flag, 431 Register dest_current_value, Register compare_value, Register exchange_value, Register addr_base, 432 int semantics, bool cmpxchgx_hint = false, 433 Register int_flag_success = noreg, bool contention_hint = false, bool weak = false); 434 void cmpxchgd(ConditionRegister flag, 435 Register dest_current_value, RegisterOrConstant compare_value, Register exchange_value, 436 Register addr_base, int semantics, bool cmpxchgx_hint = false, 437 Register int_flag_success = noreg, Label* failed = NULL, bool contention_hint = false, bool weak = false); 438 439 // interface method calling 440 void lookup_interface_method(Register recv_klass, 441 Register intf_klass, 442 RegisterOrConstant itable_index, 443 Register method_result, 444 Register temp_reg, Register temp2_reg, 445 Label& no_such_interface); 446 447 // virtual method calling 448 void lookup_virtual_method(Register recv_klass, 449 RegisterOrConstant vtable_index, 450 Register method_result); 451 452 // Test sub_klass against super_klass, with fast and slow paths. 453 454 // The fast path produces a tri-state answer: yes / no / maybe-slow. 455 // One of the three labels can be NULL, meaning take the fall-through. 456 // If super_check_offset is -1, the value is loaded up from super_klass. 457 // No registers are killed, except temp_reg and temp2_reg. |