Path: blob/master/src/hotspot/share/c1/c1_LIRAssembler.cpp
64440 views
/*1* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*22*/2324#include "precompiled.hpp"25#include "asm/assembler.inline.hpp"26#include "c1/c1_Compilation.hpp"27#include "c1/c1_Instruction.hpp"28#include "c1/c1_InstructionPrinter.hpp"29#include "c1/c1_LIRAssembler.hpp"30#include "c1/c1_MacroAssembler.hpp"31#include "c1/c1_ValueStack.hpp"32#include "ci/ciInstance.hpp"33#include "compiler/oopMap.hpp"34#include "gc/shared/barrierSet.hpp"35#include "runtime/os.hpp"36#include "runtime/vm_version.hpp"3738void LIR_Assembler::patching_epilog(PatchingStub* patch, LIR_PatchCode patch_code, Register obj, CodeEmitInfo* info) {39// We must have enough patching space so that call can be inserted.40// We cannot use fat nops here, since the concurrent code rewrite may transiently41// create the illegal instruction sequence.42while ((intx) _masm->pc() - (intx) patch->pc_start() < NativeGeneralJump::instruction_size) {43_masm->nop();44}45info->set_force_reexecute();46patch->install(_masm, patch_code, obj, info);47append_code_stub(patch);4849#ifdef ASSERT50Bytecodes::Code code = info->scope()->method()->java_code_at_bci(info->stack()->bci());51if (patch->id() == PatchingStub::access_field_id) {52switch (code) {53case Bytecodes::_putstatic:54case Bytecodes::_getstatic:55case Bytecodes::_putfield:56case Bytecodes::_getfield:57break;58default:59ShouldNotReachHere();60}61} else if (patch->id() == PatchingStub::load_klass_id) {62switch (code) {63case Bytecodes::_new:64case Bytecodes::_anewarray:65case Bytecodes::_multianewarray:66case Bytecodes::_instanceof:67case Bytecodes::_checkcast:68break;69default:70ShouldNotReachHere();71}72} else if (patch->id() == PatchingStub::load_mirror_id) {73switch (code) {74case Bytecodes::_putstatic:75case Bytecodes::_getstatic:76case Bytecodes::_ldc:77case Bytecodes::_ldc_w:78break;79default:80ShouldNotReachHere();81}82} else if (patch->id() == PatchingStub::load_appendix_id) {83Bytecodes::Code bc_raw = info->scope()->method()->raw_code_at_bci(info->stack()->bci());84assert(Bytecodes::has_optional_appendix(bc_raw), "unexpected appendix resolution");85} else {86ShouldNotReachHere();87}88#endif89}9091PatchingStub::PatchID LIR_Assembler::patching_id(CodeEmitInfo* info) {92IRScope* scope = info->scope();93Bytecodes::Code bc_raw = scope->method()->raw_code_at_bci(info->stack()->bci());94if (Bytecodes::has_optional_appendix(bc_raw)) {95return PatchingStub::load_appendix_id;96}97return PatchingStub::load_mirror_id;98}99100//---------------------------------------------------------------101102103LIR_Assembler::LIR_Assembler(Compilation* c):104_masm(c->masm())105, _bs(BarrierSet::barrier_set())106, _compilation(c)107, _frame_map(c->frame_map())108, _current_block(NULL)109, _pending_non_safepoint(NULL)110, _pending_non_safepoint_offset(0)111{112_slow_case_stubs = new CodeStubList();113}114115116LIR_Assembler::~LIR_Assembler() {117// The unwind handler label may be unnbound if this destructor is invoked because of a bail-out.118// Reset it here to avoid an assertion.119_unwind_handler_entry.reset();120}121122123void LIR_Assembler::check_codespace() {124CodeSection* cs = _masm->code_section();125if (cs->remaining() < (int)(NOT_LP64(1*K)LP64_ONLY(2*K))) {126BAILOUT("CodeBuffer overflow");127}128}129130131void LIR_Assembler::append_code_stub(CodeStub* stub) {132_slow_case_stubs->append(stub);133}134135void LIR_Assembler::emit_stubs(CodeStubList* stub_list) {136for (int m = 0; m < stub_list->length(); m++) {137CodeStub* s = stub_list->at(m);138139check_codespace();140CHECK_BAILOUT();141142#ifndef PRODUCT143if (CommentedAssembly) {144stringStream st;145s->print_name(&st);146st.print(" slow case");147_masm->block_comment(st.as_string());148}149#endif150s->emit_code(this);151#ifdef ASSERT152s->assert_no_unbound_labels();153#endif154}155}156157158void LIR_Assembler::emit_slow_case_stubs() {159emit_stubs(_slow_case_stubs);160}161162163bool LIR_Assembler::needs_icache(ciMethod* method) const {164return !method->is_static();165}166167bool LIR_Assembler::needs_clinit_barrier_on_entry(ciMethod* method) const {168return VM_Version::supports_fast_class_init_checks() && method->needs_clinit_barrier();169}170171int LIR_Assembler::code_offset() const {172return _masm->offset();173}174175176address LIR_Assembler::pc() const {177return _masm->pc();178}179180// To bang the stack of this compiled method we use the stack size181// that the interpreter would need in case of a deoptimization. This182// removes the need to bang the stack in the deoptimization blob which183// in turn simplifies stack overflow handling.184int LIR_Assembler::bang_size_in_bytes() const {185return MAX2(initial_frame_size_in_bytes() + os::extra_bang_size_in_bytes(), _compilation->interpreter_frame_size());186}187188void LIR_Assembler::emit_exception_entries(ExceptionInfoList* info_list) {189for (int i = 0; i < info_list->length(); i++) {190XHandlers* handlers = info_list->at(i)->exception_handlers();191192for (int j = 0; j < handlers->length(); j++) {193XHandler* handler = handlers->handler_at(j);194assert(handler->lir_op_id() != -1, "handler not processed by LinearScan");195assert(handler->entry_code() == NULL ||196handler->entry_code()->instructions_list()->last()->code() == lir_branch ||197handler->entry_code()->instructions_list()->last()->code() == lir_delay_slot, "last operation must be branch");198199if (handler->entry_pco() == -1) {200// entry code not emitted yet201if (handler->entry_code() != NULL && handler->entry_code()->instructions_list()->length() > 1) {202handler->set_entry_pco(code_offset());203if (CommentedAssembly) {204_masm->block_comment("Exception adapter block");205}206emit_lir_list(handler->entry_code());207} else {208handler->set_entry_pco(handler->entry_block()->exception_handler_pco());209}210211assert(handler->entry_pco() != -1, "must be set now");212}213}214}215}216217218void LIR_Assembler::emit_code(BlockList* hir) {219if (PrintLIR) {220print_LIR(hir);221}222223int n = hir->length();224for (int i = 0; i < n; i++) {225emit_block(hir->at(i));226CHECK_BAILOUT();227}228229flush_debug_info(code_offset());230231DEBUG_ONLY(check_no_unbound_labels());232}233234235void LIR_Assembler::emit_block(BlockBegin* block) {236if (block->is_set(BlockBegin::backward_branch_target_flag)) {237align_backward_branch_target();238}239240// if this block is the start of an exception handler, record the241// PC offset of the first instruction for later construction of242// the ExceptionHandlerTable243if (block->is_set(BlockBegin::exception_entry_flag)) {244block->set_exception_handler_pco(code_offset());245}246247#ifndef PRODUCT248if (PrintLIRWithAssembly) {249// don't print Phi's250InstructionPrinter ip(false);251block->print(ip);252}253#endif /* PRODUCT */254255assert(block->lir() != NULL, "must have LIR");256X86_ONLY(assert(_masm->rsp_offset() == 0, "frame size should be fixed"));257258#ifndef PRODUCT259if (CommentedAssembly) {260stringStream st;261st.print_cr(" block B%d [%d, %d]", block->block_id(), block->bci(), block->end()->printable_bci());262_masm->block_comment(st.as_string());263}264#endif265266emit_lir_list(block->lir());267268X86_ONLY(assert(_masm->rsp_offset() == 0, "frame size should be fixed"));269}270271272void LIR_Assembler::emit_lir_list(LIR_List* list) {273peephole(list);274275int n = list->length();276for (int i = 0; i < n; i++) {277LIR_Op* op = list->at(i);278279check_codespace();280CHECK_BAILOUT();281282#ifndef PRODUCT283if (CommentedAssembly) {284// Don't record out every op since that's too verbose. Print285// branches since they include block and stub names. Also print286// patching moves since they generate funny looking code.287if (op->code() == lir_branch ||288(op->code() == lir_move && op->as_Op1()->patch_code() != lir_patch_none) ||289(op->code() == lir_leal && op->as_Op1()->patch_code() != lir_patch_none)) {290stringStream st;291op->print_on(&st);292_masm->block_comment(st.as_string());293}294}295if (PrintLIRWithAssembly) {296// print out the LIR operation followed by the resulting assembly297list->at(i)->print(); tty->cr();298}299#endif /* PRODUCT */300301op->emit_code(this);302303if (compilation()->debug_info_recorder()->recording_non_safepoints()) {304process_debug_info(op);305}306307#ifndef PRODUCT308if (PrintLIRWithAssembly) {309_masm->code()->decode();310}311#endif /* PRODUCT */312}313}314315#ifdef ASSERT316void LIR_Assembler::check_no_unbound_labels() {317CHECK_BAILOUT();318319for (int i = 0; i < _branch_target_blocks.length() - 1; i++) {320if (!_branch_target_blocks.at(i)->label()->is_bound()) {321tty->print_cr("label of block B%d is not bound", _branch_target_blocks.at(i)->block_id());322assert(false, "unbound label");323}324}325}326#endif327328//----------------------------------debug info--------------------------------329330331void LIR_Assembler::add_debug_info_for_branch(CodeEmitInfo* info) {332int pc_offset = code_offset();333flush_debug_info(pc_offset);334info->record_debug_info(compilation()->debug_info_recorder(), pc_offset);335if (info->exception_handlers() != NULL) {336compilation()->add_exception_handlers_for_pco(pc_offset, info->exception_handlers());337}338}339340341void LIR_Assembler::add_call_info(int pc_offset, CodeEmitInfo* cinfo) {342flush_debug_info(pc_offset);343cinfo->record_debug_info(compilation()->debug_info_recorder(), pc_offset);344if (cinfo->exception_handlers() != NULL) {345compilation()->add_exception_handlers_for_pco(pc_offset, cinfo->exception_handlers());346}347}348349static ValueStack* debug_info(Instruction* ins) {350StateSplit* ss = ins->as_StateSplit();351if (ss != NULL) return ss->state();352return ins->state_before();353}354355void LIR_Assembler::process_debug_info(LIR_Op* op) {356Instruction* src = op->source();357if (src == NULL) return;358int pc_offset = code_offset();359if (_pending_non_safepoint == src) {360_pending_non_safepoint_offset = pc_offset;361return;362}363ValueStack* vstack = debug_info(src);364if (vstack == NULL) return;365if (_pending_non_safepoint != NULL) {366// Got some old debug info. Get rid of it.367if (debug_info(_pending_non_safepoint) == vstack) {368_pending_non_safepoint_offset = pc_offset;369return;370}371if (_pending_non_safepoint_offset < pc_offset) {372record_non_safepoint_debug_info();373}374_pending_non_safepoint = NULL;375}376// Remember the debug info.377if (pc_offset > compilation()->debug_info_recorder()->last_pc_offset()) {378_pending_non_safepoint = src;379_pending_non_safepoint_offset = pc_offset;380}381}382383// Index caller states in s, where 0 is the oldest, 1 its callee, etc.384// Return NULL if n is too large.385// Returns the caller_bci for the next-younger state, also.386static ValueStack* nth_oldest(ValueStack* s, int n, int& bci_result) {387ValueStack* t = s;388for (int i = 0; i < n; i++) {389if (t == NULL) break;390t = t->caller_state();391}392if (t == NULL) return NULL;393for (;;) {394ValueStack* tc = t->caller_state();395if (tc == NULL) return s;396t = tc;397bci_result = tc->bci();398s = s->caller_state();399}400}401402void LIR_Assembler::record_non_safepoint_debug_info() {403int pc_offset = _pending_non_safepoint_offset;404ValueStack* vstack = debug_info(_pending_non_safepoint);405int bci = vstack->bci();406407DebugInformationRecorder* debug_info = compilation()->debug_info_recorder();408assert(debug_info->recording_non_safepoints(), "sanity");409410debug_info->add_non_safepoint(pc_offset);411412// Visit scopes from oldest to youngest.413for (int n = 0; ; n++) {414int s_bci = bci;415ValueStack* s = nth_oldest(vstack, n, s_bci);416if (s == NULL) break;417IRScope* scope = s->scope();418//Always pass false for reexecute since these ScopeDescs are never used for deopt419methodHandle null_mh;420debug_info->describe_scope(pc_offset, null_mh, scope->method(), s->bci(), false/*reexecute*/);421}422423debug_info->end_non_safepoint(pc_offset);424}425426427ImplicitNullCheckStub* LIR_Assembler::add_debug_info_for_null_check_here(CodeEmitInfo* cinfo) {428return add_debug_info_for_null_check(code_offset(), cinfo);429}430431ImplicitNullCheckStub* LIR_Assembler::add_debug_info_for_null_check(int pc_offset, CodeEmitInfo* cinfo) {432ImplicitNullCheckStub* stub = new ImplicitNullCheckStub(pc_offset, cinfo);433append_code_stub(stub);434return stub;435}436437void LIR_Assembler::add_debug_info_for_div0_here(CodeEmitInfo* info) {438add_debug_info_for_div0(code_offset(), info);439}440441void LIR_Assembler::add_debug_info_for_div0(int pc_offset, CodeEmitInfo* cinfo) {442DivByZeroStub* stub = new DivByZeroStub(pc_offset, cinfo);443append_code_stub(stub);444}445446void LIR_Assembler::emit_rtcall(LIR_OpRTCall* op) {447rt_call(op->result_opr(), op->addr(), op->arguments(), op->tmp(), op->info());448}449450451void LIR_Assembler::emit_call(LIR_OpJavaCall* op) {452verify_oop_map(op->info());453454// must align calls sites, otherwise they can't be updated atomically455align_call(op->code());456457// emit the static call stub stuff out of line458emit_static_call_stub();459CHECK_BAILOUT();460461switch (op->code()) {462case lir_static_call:463case lir_dynamic_call:464call(op, relocInfo::static_call_type);465break;466case lir_optvirtual_call:467call(op, relocInfo::opt_virtual_call_type);468break;469case lir_icvirtual_call:470ic_call(op);471break;472default:473fatal("unexpected op code: %s", op->name());474break;475}476477// JSR 292478// Record if this method has MethodHandle invokes.479if (op->is_method_handle_invoke()) {480compilation()->set_has_method_handle_invokes(true);481}482483#if defined(IA32) && defined(COMPILER2)484// C2 leave fpu stack dirty clean it485if (UseSSE < 2 && !CompilerConfig::is_c1_only_no_jvmci()) {486int i;487for ( i = 1; i <= 7 ; i++ ) {488ffree(i);489}490if (!op->result_opr()->is_float_kind()) {491ffree(0);492}493}494#endif // IA32 && COMPILER2495}496497498void LIR_Assembler::emit_opLabel(LIR_OpLabel* op) {499_masm->bind (*(op->label()));500}501502503void LIR_Assembler::emit_op1(LIR_Op1* op) {504switch (op->code()) {505case lir_move:506if (op->move_kind() == lir_move_volatile) {507assert(op->patch_code() == lir_patch_none, "can't patch volatiles");508volatile_move_op(op->in_opr(), op->result_opr(), op->type(), op->info());509} else {510move_op(op->in_opr(), op->result_opr(), op->type(),511op->patch_code(), op->info(), op->pop_fpu_stack(),512op->move_kind() == lir_move_unaligned,513op->move_kind() == lir_move_wide);514}515break;516517case lir_roundfp: {518LIR_OpRoundFP* round_op = op->as_OpRoundFP();519roundfp_op(round_op->in_opr(), round_op->tmp(), round_op->result_opr(), round_op->pop_fpu_stack());520break;521}522523case lir_return: {524assert(op->as_OpReturn() != NULL, "sanity");525LIR_OpReturn *ret_op = (LIR_OpReturn*)op;526return_op(ret_op->in_opr(), ret_op->stub());527if (ret_op->stub() != NULL) {528append_code_stub(ret_op->stub());529}530break;531}532533case lir_safepoint:534if (compilation()->debug_info_recorder()->last_pc_offset() == code_offset()) {535_masm->nop();536}537safepoint_poll(op->in_opr(), op->info());538break;539540#ifdef IA32541case lir_fxch:542fxch(op->in_opr()->as_jint());543break;544545case lir_fld:546fld(op->in_opr()->as_jint());547break;548#endif // IA32549550case lir_branch:551break;552553case lir_push:554push(op->in_opr());555break;556557case lir_pop:558pop(op->in_opr());559break;560561case lir_leal:562leal(op->in_opr(), op->result_opr(), op->patch_code(), op->info());563break;564565case lir_null_check: {566ImplicitNullCheckStub* stub = add_debug_info_for_null_check_here(op->info());567568if (op->in_opr()->is_single_cpu()) {569_masm->null_check(op->in_opr()->as_register(), stub->entry());570} else {571Unimplemented();572}573break;574}575576case lir_monaddr:577monitor_address(op->in_opr()->as_constant_ptr()->as_jint(), op->result_opr());578break;579580case lir_unwind:581unwind_op(op->in_opr());582break;583584default:585Unimplemented();586break;587}588}589590591void LIR_Assembler::emit_op0(LIR_Op0* op) {592switch (op->code()) {593case lir_nop:594assert(op->info() == NULL, "not supported");595_masm->nop();596break;597598case lir_label:599Unimplemented();600break;601602case lir_std_entry:603// init offsets604offsets()->set_value(CodeOffsets::OSR_Entry, _masm->offset());605_masm->align(CodeEntryAlignment);606if (needs_icache(compilation()->method())) {607check_icache();608}609offsets()->set_value(CodeOffsets::Verified_Entry, _masm->offset());610_masm->verified_entry(compilation()->directive()->BreakAtExecuteOption);611if (needs_clinit_barrier_on_entry(compilation()->method())) {612clinit_barrier(compilation()->method());613}614build_frame();615offsets()->set_value(CodeOffsets::Frame_Complete, _masm->offset());616break;617618case lir_osr_entry:619offsets()->set_value(CodeOffsets::OSR_Entry, _masm->offset());620osr_entry();621break;622623#ifdef IA32624case lir_fpop_raw:625fpop();626break;627#endif // IA32628629case lir_breakpoint:630breakpoint();631break;632633case lir_membar:634membar();635break;636637case lir_membar_acquire:638membar_acquire();639break;640641case lir_membar_release:642membar_release();643break;644645case lir_membar_loadload:646membar_loadload();647break;648649case lir_membar_storestore:650membar_storestore();651break;652653case lir_membar_loadstore:654membar_loadstore();655break;656657case lir_membar_storeload:658membar_storeload();659break;660661case lir_get_thread:662get_thread(op->result_opr());663break;664665case lir_on_spin_wait:666on_spin_wait();667break;668669default:670ShouldNotReachHere();671break;672}673}674675676void LIR_Assembler::emit_op2(LIR_Op2* op) {677switch (op->code()) {678case lir_cmp:679if (op->info() != NULL) {680assert(op->in_opr1()->is_address() || op->in_opr2()->is_address(),681"shouldn't be codeemitinfo for non-address operands");682add_debug_info_for_null_check_here(op->info()); // exception possible683}684comp_op(op->condition(), op->in_opr1(), op->in_opr2(), op);685break;686687case lir_cmp_l2i:688case lir_cmp_fd2i:689case lir_ucmp_fd2i:690comp_fl2i(op->code(), op->in_opr1(), op->in_opr2(), op->result_opr(), op);691break;692693case lir_cmove:694cmove(op->condition(), op->in_opr1(), op->in_opr2(), op->result_opr(), op->type());695break;696697case lir_shl:698case lir_shr:699case lir_ushr:700if (op->in_opr2()->is_constant()) {701shift_op(op->code(), op->in_opr1(), op->in_opr2()->as_constant_ptr()->as_jint(), op->result_opr());702} else {703shift_op(op->code(), op->in_opr1(), op->in_opr2(), op->result_opr(), op->tmp1_opr());704}705break;706707case lir_add:708case lir_sub:709case lir_mul:710case lir_div:711case lir_rem:712assert(op->fpu_pop_count() < 2, "");713arith_op(714op->code(),715op->in_opr1(),716op->in_opr2(),717op->result_opr(),718op->info(),719op->fpu_pop_count() == 1);720break;721722case lir_abs:723case lir_sqrt:724case lir_tan:725case lir_log10:726intrinsic_op(op->code(), op->in_opr1(), op->in_opr2(), op->result_opr(), op);727break;728729case lir_neg:730negate(op->in_opr1(), op->result_opr(), op->in_opr2());731break;732733case lir_logic_and:734case lir_logic_or:735case lir_logic_xor:736logic_op(737op->code(),738op->in_opr1(),739op->in_opr2(),740op->result_opr());741break;742743case lir_throw:744throw_op(op->in_opr1(), op->in_opr2(), op->info());745break;746747case lir_xadd:748case lir_xchg:749atomic_op(op->code(), op->in_opr1(), op->in_opr2(), op->result_opr(), op->tmp1_opr());750break;751752default:753Unimplemented();754break;755}756}757758759void LIR_Assembler::build_frame() {760_masm->build_frame(initial_frame_size_in_bytes(), bang_size_in_bytes());761}762763764void LIR_Assembler::roundfp_op(LIR_Opr src, LIR_Opr tmp, LIR_Opr dest, bool pop_fpu_stack) {765assert(strict_fp_requires_explicit_rounding, "not required");766assert((src->is_single_fpu() && dest->is_single_stack()) ||767(src->is_double_fpu() && dest->is_double_stack()),768"round_fp: rounds register -> stack location");769770reg2stack (src, dest, src->type(), pop_fpu_stack);771}772773774void LIR_Assembler::move_op(LIR_Opr src, LIR_Opr dest, BasicType type, LIR_PatchCode patch_code, CodeEmitInfo* info, bool pop_fpu_stack, bool unaligned, bool wide) {775if (src->is_register()) {776if (dest->is_register()) {777assert(patch_code == lir_patch_none && info == NULL, "no patching and info allowed here");778reg2reg(src, dest);779} else if (dest->is_stack()) {780assert(patch_code == lir_patch_none && info == NULL, "no patching and info allowed here");781reg2stack(src, dest, type, pop_fpu_stack);782} else if (dest->is_address()) {783reg2mem(src, dest, type, patch_code, info, pop_fpu_stack, wide, unaligned);784} else {785ShouldNotReachHere();786}787788} else if (src->is_stack()) {789assert(patch_code == lir_patch_none && info == NULL, "no patching and info allowed here");790if (dest->is_register()) {791stack2reg(src, dest, type);792} else if (dest->is_stack()) {793stack2stack(src, dest, type);794} else {795ShouldNotReachHere();796}797798} else if (src->is_constant()) {799if (dest->is_register()) {800const2reg(src, dest, patch_code, info); // patching is possible801} else if (dest->is_stack()) {802assert(patch_code == lir_patch_none && info == NULL, "no patching and info allowed here");803const2stack(src, dest);804} else if (dest->is_address()) {805assert(patch_code == lir_patch_none, "no patching allowed here");806const2mem(src, dest, type, info, wide);807} else {808ShouldNotReachHere();809}810811} else if (src->is_address()) {812mem2reg(src, dest, type, patch_code, info, wide, unaligned);813814} else {815ShouldNotReachHere();816}817}818819820void LIR_Assembler::verify_oop_map(CodeEmitInfo* info) {821#ifndef PRODUCT822if (VerifyOops) {823OopMapStream s(info->oop_map());824while (!s.is_done()) {825OopMapValue v = s.current();826if (v.is_oop()) {827VMReg r = v.reg();828if (!r->is_stack()) {829stringStream st;830st.print("bad oop %s at %d", r->as_Register()->name(), _masm->offset());831_masm->verify_oop(r->as_Register());832} else {833_masm->verify_stack_oop(r->reg2stack() * VMRegImpl::stack_slot_size);834}835}836check_codespace();837CHECK_BAILOUT();838839s.next();840}841}842#endif843}844845846