< prev index next >

src/hotspot/cpu/x86/macroAssembler_x86.cpp

Print this page




4585     assert(!pushed_rdi, "rdi must be left non-NULL");
4586     // Also, the condition codes are properly set Z/NZ on succeed/failure.
4587   }
4588 
4589   if (L_failure == &L_fallthrough)
4590         jccb(Assembler::notEqual, *L_failure);
4591   else  jcc(Assembler::notEqual, *L_failure);
4592 
4593   // Success.  Cache the super we found and proceed in triumph.
4594   movptr(super_cache_addr, super_klass);
4595 
4596   if (L_success != &L_fallthrough) {
4597     jmp(*L_success);
4598   }
4599 
4600 #undef IS_A_TEMP
4601 
4602   bind(L_fallthrough);
4603 }
4604 
4605 
4606 void MacroAssembler::clinit_barrier(Register klass, Register thread, Label* L_fast_path, Label* L_slow_path) {
4607   assert(L_fast_path != NULL || L_slow_path != NULL, "at least one is required");
4608 
4609   Label L_fallthrough;
4610   if (L_fast_path == NULL) {
4611     L_fast_path = &L_fallthrough;


4612   }
4613 
4614   // Fast path check: class is fully initialized
4615   cmpb(Address(klass, InstanceKlass::init_state_offset()), InstanceKlass::fully_initialized);
4616   jcc(Assembler::equal, *L_fast_path);
4617 
4618   // Fast path check: current thread is initializer thread
4619   cmpptr(thread, Address(klass, InstanceKlass::init_thread_offset()));
4620   if (L_slow_path != NULL) {



4621     jcc(Assembler::notEqual, *L_slow_path);

4622   } else {
4623     jcc(Assembler::equal, *L_fast_path);

4624   }
4625 
4626   bind(L_fallthrough);
4627 }
4628 
4629 void MacroAssembler::cmov32(Condition cc, Register dst, Address src) {
4630   if (VM_Version::supports_cmov()) {
4631     cmovl(cc, dst, src);
4632   } else {
4633     Label L;
4634     jccb(negate_condition(cc), L);
4635     movl(dst, src);
4636     bind(L);
4637   }
4638 }
4639 
4640 void MacroAssembler::cmov32(Condition cc, Register dst, Register src) {
4641   if (VM_Version::supports_cmov()) {
4642     cmovl(cc, dst, src);
4643   } else {
4644     Label L;
4645     jccb(negate_condition(cc), L);
4646     movl(dst, src);




4585     assert(!pushed_rdi, "rdi must be left non-NULL");
4586     // Also, the condition codes are properly set Z/NZ on succeed/failure.
4587   }
4588 
4589   if (L_failure == &L_fallthrough)
4590         jccb(Assembler::notEqual, *L_failure);
4591   else  jcc(Assembler::notEqual, *L_failure);
4592 
4593   // Success.  Cache the super we found and proceed in triumph.
4594   movptr(super_cache_addr, super_klass);
4595 
4596   if (L_success != &L_fallthrough) {
4597     jmp(*L_success);
4598   }
4599 
4600 #undef IS_A_TEMP
4601 
4602   bind(L_fallthrough);
4603 }
4604 

4605 void MacroAssembler::clinit_barrier(Register klass, Register thread, Label* L_fast_path, Label* L_slow_path) {
4606   assert(L_fast_path != NULL || L_slow_path != NULL, "at least one is required");
4607 
4608   Label L_fallthrough;
4609   if (L_fast_path == NULL) {
4610     L_fast_path = &L_fallthrough;
4611   } else if (L_slow_path == NULL) {
4612     L_slow_path = &L_fallthrough;
4613   }
4614 
4615   // Fast path check: class is fully initialized
4616   cmpb(Address(klass, InstanceKlass::init_state_offset()), InstanceKlass::fully_initialized);
4617   jcc(Assembler::equal, *L_fast_path);
4618 
4619   // Fast path check: current thread is initializer thread
4620   cmpptr(thread, Address(klass, InstanceKlass::init_thread_offset()));
4621   if (L_slow_path == &L_fallthrough) {
4622     jcc(Assembler::equal, *L_fast_path);
4623     bind(*L_slow_path);
4624   } else if (L_fast_path == &L_fallthrough) {
4625     jcc(Assembler::notEqual, *L_slow_path);
4626     bind(*L_fast_path);
4627   } else {
4628     jcc(Assembler::equal, *L_fast_path);
4629     jmp(*L_slow_path);
4630   }


4631 }
4632 
4633 void MacroAssembler::cmov32(Condition cc, Register dst, Address src) {
4634   if (VM_Version::supports_cmov()) {
4635     cmovl(cc, dst, src);
4636   } else {
4637     Label L;
4638     jccb(negate_condition(cc), L);
4639     movl(dst, src);
4640     bind(L);
4641   }
4642 }
4643 
4644 void MacroAssembler::cmov32(Condition cc, Register dst, Register src) {
4645   if (VM_Version::supports_cmov()) {
4646     cmovl(cc, dst, src);
4647   } else {
4648     Label L;
4649     jccb(negate_condition(cc), L);
4650     movl(dst, src);


< prev index next >