< prev index next >

src/cpu/x86/vm/templateTable_x86.cpp

Print this page

        

*** 4147,4156 **** --- 4147,4164 ---- __ load_unsigned_byte(rarg1, at_bcp(1)); call_VM(rax, CAST_FROM_FN_PTR(address, InterpreterRuntime::newarray), rarg1, rax); } + void TemplateTable::new_primitive_array(int type) { + transition(itos, atos); + Register rarg1 = LP64_ONLY(c_rarg1) NOT_LP64(rdx); + __ movl(rarg1, type); + call_VM(rax, CAST_FROM_FN_PTR(address, InterpreterRuntime::newarray), + rarg1, rax); + } + void TemplateTable::anewarray() { transition(itos, atos); Register rarg1 = LP64_ONLY(c_rarg1) NOT_LP64(rcx); Register rarg2 = LP64_ONLY(c_rarg2) NOT_LP64(rdx);
*** 4558,4562 **** --- 4566,4594 ---- __ lea(rarg, Address(rsp, rax, Interpreter::stackElementScale(), -wordSize)); call_VM(rax, CAST_FROM_FN_PTR(address, InterpreterRuntime::multianewarray), rarg); __ load_unsigned_byte(rbx, at_bcp(3)); __ lea(rsp, Address(rsp, rbx, Interpreter::stackElementScale())); // get rid of counts } + + // Typed instruction + void TemplateTable::typed() { + transition(vtos, vtos); + + // Note: this call to the VM also serve as a safepoint check + call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::entry_for_typed_bytecode)); + // rbcp is incremented here because the typed bytecode can be an alias to a legacy + // bytecode which has no reason to increment the rbcp in regular usages + Label not_wide, jump_next;; + + __ cmpb(Address(rbcp, Bytecodes::length_for(Bytecodes::_typed)), + Bytecodes::_wide); + __ jccb(Assembler::notEqual, not_wide); + __ addptr(rbcp, Bytecodes::length_for(Bytecodes::_typed) + Bytecodes::length_for(Bytecodes::_wide)); + __ jmpb(jump_next); + + __ bind(not_wide); + __ addptr(rbcp, Bytecodes::length_for(Bytecodes::_typed)); + + __ bind(jump_next); + __ jmp(rax); + + }
< prev index next >