Path: blob/aarch64-shenandoah-jdk8u272-b10/hotspot/src/share/vm/c1/c1_LIRGenerator.hpp
32285 views
/*1* Copyright (c) 2005, 2016, 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#ifndef SHARE_VM_C1_C1_LIRGENERATOR_HPP25#define SHARE_VM_C1_C1_LIRGENERATOR_HPP2627#include "c1/c1_Instruction.hpp"28#include "c1/c1_LIR.hpp"29#include "ci/ciMethodData.hpp"30#include "jfr/support/jfrIntrinsics.hpp"31#include "utilities/sizes.hpp"3233// The classes responsible for code emission and register allocation343536class LIRGenerator;37class LIREmitter;38class Invoke;39class SwitchRange;40class LIRItem;4142define_array(LIRItemArray, LIRItem*)43define_stack(LIRItemList, LIRItemArray)4445class SwitchRange: public CompilationResourceObj {46private:47int _low_key;48int _high_key;49BlockBegin* _sux;50public:51SwitchRange(int start_key, BlockBegin* sux): _low_key(start_key), _high_key(start_key), _sux(sux) {}52void set_high_key(int key) { _high_key = key; }5354int high_key() const { return _high_key; }55int low_key() const { return _low_key; }56BlockBegin* sux() const { return _sux; }57};5859define_array(SwitchRangeArray, SwitchRange*)60define_stack(SwitchRangeList, SwitchRangeArray)616263class ResolveNode;6465define_array(NodeArray, ResolveNode*);66define_stack(NodeList, NodeArray);676869// Node objects form a directed graph of LIR_Opr70// Edges between Nodes represent moves from one Node to its destinations71class ResolveNode: public CompilationResourceObj {72private:73LIR_Opr _operand; // the source or destinaton74NodeList _destinations; // for the operand75bool _assigned; // Value assigned to this Node?76bool _visited; // Node already visited?77bool _start_node; // Start node already visited?7879public:80ResolveNode(LIR_Opr operand)81: _operand(operand)82, _assigned(false)83, _visited(false)84, _start_node(false) {};8586// accessors87LIR_Opr operand() const { return _operand; }88int no_of_destinations() const { return _destinations.length(); }89ResolveNode* destination_at(int i) { return _destinations[i]; }90bool assigned() const { return _assigned; }91bool visited() const { return _visited; }92bool start_node() const { return _start_node; }9394// modifiers95void append(ResolveNode* dest) { _destinations.append(dest); }96void set_assigned() { _assigned = true; }97void set_visited() { _visited = true; }98void set_start_node() { _start_node = true; }99};100101102// This is shared state to be used by the PhiResolver so the operand103// arrays don't have to be reallocated for reach resolution.104class PhiResolverState: public CompilationResourceObj {105friend class PhiResolver;106107private:108NodeList _virtual_operands; // Nodes where the operand is a virtual register109NodeList _other_operands; // Nodes where the operand is not a virtual register110NodeList _vreg_table; // Mapping from virtual register to Node111112public:113PhiResolverState() {}114115void reset(int max_vregs);116};117118119// class used to move value of phi operand to phi function120class PhiResolver: public CompilationResourceObj {121private:122LIRGenerator* _gen;123PhiResolverState& _state; // temporary state cached by LIRGenerator124125ResolveNode* _loop;126LIR_Opr _temp;127128// access to shared state arrays129NodeList& virtual_operands() { return _state._virtual_operands; }130NodeList& other_operands() { return _state._other_operands; }131NodeList& vreg_table() { return _state._vreg_table; }132133ResolveNode* create_node(LIR_Opr opr, bool source);134ResolveNode* source_node(LIR_Opr opr) { return create_node(opr, true); }135ResolveNode* destination_node(LIR_Opr opr) { return create_node(opr, false); }136137void emit_move(LIR_Opr src, LIR_Opr dest);138void move_to_temp(LIR_Opr src);139void move_temp_to(LIR_Opr dest);140void move(ResolveNode* src, ResolveNode* dest);141142LIRGenerator* gen() {143return _gen;144}145146public:147PhiResolver(LIRGenerator* _lir_gen, int max_vregs);148~PhiResolver();149150void move(LIR_Opr src, LIR_Opr dest);151};152153154// only the classes below belong in the same file155class LIRGenerator: public InstructionVisitor, public BlockClosure {156friend class ShenandoahBarrierSetC1;157private:158Compilation* _compilation;159ciMethod* _method; // method that we are compiling160PhiResolverState _resolver_state;161BlockBegin* _block;162int _virtual_register_number;163Values _instruction_for_operand;164BitMap2D _vreg_flags; // flags which can be set on a per-vreg basis165LIR_List* _lir;166BarrierSet* _bs;167168LIRGenerator* gen() {169return this;170}171172void print_if_not_loaded(const NewInstance* new_instance) PRODUCT_RETURN;173174#ifdef ASSERT175LIR_List* lir(const char * file, int line) const {176_lir->set_file_and_line(file, line);177return _lir;178}179#endif180LIR_List* lir() const {181return _lir;182}183184// a simple cache of constants used within a block185GrowableArray<LIR_Const*> _constants;186LIR_OprList _reg_for_constants;187Values _unpinned_constants;188189friend class PhiResolver;190191// unified bailout support192void bailout(const char* msg) const { compilation()->bailout(msg); }193bool bailed_out() const { return compilation()->bailed_out(); }194195void block_do_prolog(BlockBegin* block);196void block_do_epilog(BlockBegin* block);197198// register allocation199LIR_Opr rlock(Value instr); // lock a free register200LIR_Opr rlock_result(Value instr);201LIR_Opr rlock_result(Value instr, BasicType type);202LIR_Opr rlock_byte(BasicType type);203LIR_Opr rlock_callee_saved(BasicType type);204205// get a constant into a register and get track of what register was used206LIR_Opr load_constant(Constant* x);207LIR_Opr load_constant(LIR_Const* constant);208209// Given an immediate value, return an operand usable in logical ops.210LIR_Opr load_immediate(int x, BasicType type);211212void set_result(Value x, LIR_Opr opr) {213assert(opr->is_valid(), "must set to valid value");214assert(x->operand()->is_illegal(), "operand should never change");215assert(!opr->is_register() || opr->is_virtual(), "should never set result to a physical register");216x->set_operand(opr);217assert(opr == x->operand(), "must be");218if (opr->is_virtual()) {219_instruction_for_operand.at_put_grow(opr->vreg_number(), x, NULL);220}221}222void set_no_result(Value x) { assert(!x->has_uses(), "can't have use"); x->clear_operand(); }223224friend class LIRItem;225226LIR_Opr round_item(LIR_Opr opr);227LIR_Opr force_to_spill(LIR_Opr value, BasicType t);228229PhiResolverState& resolver_state() { return _resolver_state; }230231void move_to_phi(PhiResolver* resolver, Value cur_val, Value sux_val);232void move_to_phi(ValueStack* cur_state);233234// code emission235void do_ArithmeticOp_Long (ArithmeticOp* x);236void do_ArithmeticOp_Int (ArithmeticOp* x);237void do_ArithmeticOp_FPU (ArithmeticOp* x);238239// platform dependent240LIR_Opr getThreadPointer();241242void do_RegisterFinalizer(Intrinsic* x);243void do_isInstance(Intrinsic* x);244void do_getClass(Intrinsic* x);245void do_currentThread(Intrinsic* x);246void do_MathIntrinsic(Intrinsic* x);247void do_ArrayCopy(Intrinsic* x);248void do_CompareAndSwap(Intrinsic* x, ValueType* type);249void do_NIOCheckIndex(Intrinsic* x);250void do_FPIntrinsics(Intrinsic* x);251void do_Reference_get(Intrinsic* x);252void do_update_CRC32(Intrinsic* x);253254void do_UnsafePrefetch(UnsafePrefetch* x, bool is_store);255256LIR_Opr call_runtime(BasicTypeArray* signature, LIRItemList* args, address entry, ValueType* result_type, CodeEmitInfo* info);257LIR_Opr call_runtime(BasicTypeArray* signature, LIR_OprList* args, address entry, ValueType* result_type, CodeEmitInfo* info);258259// convenience functions260LIR_Opr call_runtime(Value arg1, address entry, ValueType* result_type, CodeEmitInfo* info);261LIR_Opr call_runtime(Value arg1, Value arg2, address entry, ValueType* result_type, CodeEmitInfo* info);262263// GC Barriers264265// generic interface266267void pre_barrier(LIR_Opr addr_opr, LIR_Opr pre_val, bool do_load, bool patch, CodeEmitInfo* info);268void post_barrier(LIR_OprDesc* addr, LIR_OprDesc* new_val);269270// specific implementations271// pre barriers272273void G1SATBCardTableModRef_pre_barrier(LIR_Opr addr_opr, LIR_Opr pre_val,274bool do_load, bool patch, CodeEmitInfo* info);275276// post barriers277278void G1SATBCardTableModRef_post_barrier(LIR_OprDesc* addr, LIR_OprDesc* new_val);279void CardTableModRef_post_barrier(LIR_OprDesc* addr, LIR_OprDesc* new_val);280#ifdef CARDTABLEMODREF_POST_BARRIER_HELPER281void CardTableModRef_post_barrier_helper(LIR_OprDesc* addr, LIR_Const* card_table_base);282#endif283284285static LIR_Opr result_register_for(ValueType* type, bool callee = false);286287#ifdef AARCH32288static LIR_Opr java_result_register_for(ValueType* type, bool callee = false);289#endif290291ciObject* get_jobject_constant(Value value);292293LIRItemList* invoke_visit_arguments(Invoke* x);294void invoke_load_arguments(Invoke* x, LIRItemList* args, const LIR_OprList* arg_list);295296void trace_block_entry(BlockBegin* block);297298// volatile field operations are never patchable because a klass299// must be loaded to know it's volatile which means that the offset300// it always known as well.301void volatile_field_store(LIR_Opr value, LIR_Address* address, CodeEmitInfo* info);302void volatile_field_load(LIR_Address* address, LIR_Opr result, CodeEmitInfo* info);303304void put_Object_unsafe(LIR_Opr src, LIR_Opr offset, LIR_Opr data, BasicType type, bool is_volatile);305void get_Object_unsafe(LIR_Opr dest, LIR_Opr src, LIR_Opr offset, BasicType type, bool is_volatile);306307void arithmetic_call_op (Bytecodes::Code code, LIR_Opr result, LIR_OprList* args);308309void increment_counter(address counter, BasicType type, int step = 1);310void increment_counter(LIR_Address* addr, int step = 1);311312// is_strictfp is only needed for mul and div (and only generates different code on i486)313void arithmetic_op(Bytecodes::Code code, LIR_Opr result, LIR_Opr left, LIR_Opr right, bool is_strictfp, LIR_Opr tmp, CodeEmitInfo* info = NULL);314// machine dependent. returns true if it emitted code for the multiply315bool strength_reduce_multiply(LIR_Opr left, jint constant, LIR_Opr result, LIR_Opr tmp);316317void store_stack_parameter (LIR_Opr opr, ByteSize offset_from_sp_in_bytes);318319void klass2reg_with_patching(LIR_Opr r, ciMetadata* obj, CodeEmitInfo* info, bool need_resolve = false);320321// this loads the length and compares against the index322void array_range_check (LIR_Opr array, LIR_Opr index, CodeEmitInfo* null_check_info, CodeEmitInfo* range_check_info);323// For java.nio.Buffer.checkIndex324void nio_range_check (LIR_Opr buffer, LIR_Opr index, LIR_Opr result, CodeEmitInfo* info);325326void arithmetic_op_int (Bytecodes::Code code, LIR_Opr result, LIR_Opr left, LIR_Opr right, LIR_Opr tmp);327void arithmetic_op_long (Bytecodes::Code code, LIR_Opr result, LIR_Opr left, LIR_Opr right, CodeEmitInfo* info = NULL);328void arithmetic_op_fpu (Bytecodes::Code code, LIR_Opr result, LIR_Opr left, LIR_Opr right, bool is_strictfp, LIR_Opr tmp = LIR_OprFact::illegalOpr);329330void shift_op (Bytecodes::Code code, LIR_Opr dst_reg, LIR_Opr value, LIR_Opr count, LIR_Opr tmp);331332void logic_op (Bytecodes::Code code, LIR_Opr dst_reg, LIR_Opr left, LIR_Opr right);333334void monitor_enter (LIR_Opr object, LIR_Opr lock, LIR_Opr hdr, LIR_Opr scratch, int monitor_no, CodeEmitInfo* info_for_exception, CodeEmitInfo* info);335void monitor_exit (LIR_Opr object, LIR_Opr lock, LIR_Opr hdr, LIR_Opr scratch, int monitor_no);336337void new_instance (LIR_Opr dst, ciInstanceKlass* klass, bool is_unresolved, LIR_Opr scratch1, LIR_Opr scratch2, LIR_Opr scratch3, LIR_Opr scratch4, LIR_Opr klass_reg, CodeEmitInfo* info);338339// machine dependent340void cmp_mem_int(LIR_Condition condition, LIR_Opr base, int disp, int c, CodeEmitInfo* info);341void cmp_reg_mem(LIR_Condition condition, LIR_Opr reg, LIR_Opr base, int disp, BasicType type, CodeEmitInfo* info);342void cmp_reg_mem(LIR_Condition condition, LIR_Opr reg, LIR_Opr base, LIR_Opr disp, BasicType type, CodeEmitInfo* info);343344void arraycopy_helper(Intrinsic* x, int* flags, ciArrayKlass** expected_type);345346// returns a LIR_Address to address an array location. May also347// emit some code as part of address calculation. If348// needs_card_mark is true then compute the full address for use by349// both the store and the card mark.350LIR_Address* generate_address(LIR_Opr base,351LIR_Opr index, int shift,352int disp,353BasicType type);354LIR_Address* generate_address(LIR_Opr base, int disp, BasicType type) {355return generate_address(base, LIR_OprFact::illegalOpr, 0, disp, type);356}357LIR_Address* emit_array_address(LIR_Opr array_opr, LIR_Opr index_opr, BasicType type, bool needs_card_mark);358359// the helper for generate_address360void add_large_constant(LIR_Opr src, int c, LIR_Opr dest);361362// machine preferences and characteristics363bool can_inline_as_constant(Value i) const;364bool can_inline_as_constant(LIR_Const* c) const;365bool can_store_as_constant(Value i, BasicType type) const;366367LIR_Opr safepoint_poll_register();368369void profile_branch(If* if_instr, If::Condition cond);370void increment_event_counter_impl(CodeEmitInfo* info,371ciMethod *method, int frequency,372int bci, bool backedge, bool notify);373void increment_event_counter(CodeEmitInfo* info, int bci, bool backedge);374void increment_invocation_counter(CodeEmitInfo *info) {375if (compilation()->count_invocations()) {376increment_event_counter(info, InvocationEntryBci, false);377}378}379void increment_backedge_counter(CodeEmitInfo* info, int bci) {380if (compilation()->count_backedges()) {381increment_event_counter(info, bci, true);382}383}384385CodeEmitInfo* state_for(Instruction* x, ValueStack* state, bool ignore_xhandler = false);386CodeEmitInfo* state_for(Instruction* x);387388// allocates a virtual register for this instruction if389// one isn't already allocated. Only for Phi and Local.390LIR_Opr operand_for_instruction(Instruction *x);391392void set_block(BlockBegin* block) { _block = block; }393394void block_prolog(BlockBegin* block);395void block_epilog(BlockBegin* block);396397void do_root (Instruction* instr);398void walk (Instruction* instr);399400void bind_block_entry(BlockBegin* block);401void start_block(BlockBegin* block);402403LIR_Opr new_register(BasicType type);404LIR_Opr new_register(Value value) { return new_register(as_BasicType(value->type())); }405LIR_Opr new_register(ValueType* type) { return new_register(as_BasicType(type)); }406407// returns a register suitable for doing pointer math408LIR_Opr new_pointer_register() {409#ifdef _LP64410return new_register(T_LONG);411#else412return new_register(T_INT);413#endif414}415416static LIR_Condition lir_cond(If::Condition cond) {417LIR_Condition l = lir_cond_unknown;418switch (cond) {419case If::eql: l = lir_cond_equal; break;420case If::neq: l = lir_cond_notEqual; break;421case If::lss: l = lir_cond_less; break;422case If::leq: l = lir_cond_lessEqual; break;423case If::geq: l = lir_cond_greaterEqual; break;424case If::gtr: l = lir_cond_greater; break;425case If::aeq: l = lir_cond_aboveEqual; break;426case If::beq: l = lir_cond_belowEqual; break;427default: fatal("You must pass valid If::Condition");428};429return l;430}431432#ifdef __SOFTFP__433void do_soft_float_compare(If *x);434#endif // __SOFTFP__435436void init();437438SwitchRangeArray* create_lookup_ranges(TableSwitch* x);439SwitchRangeArray* create_lookup_ranges(LookupSwitch* x);440void do_SwitchRanges(SwitchRangeArray* x, LIR_Opr value, BlockBegin* default_sux);441442void do_RuntimeCall(address routine, int expected_arguments, Intrinsic* x);443#ifdef JFR_HAVE_INTRINSICS444void do_ClassIDIntrinsic(Intrinsic* x);445void do_getEventWriter(Intrinsic* x);446#endif447ciKlass* profile_type(ciMethodData* md, int md_first_offset, int md_offset, intptr_t profiled_k,448Value arg, LIR_Opr& mdp, bool not_null, ciKlass* signature_at_call_k,449ciKlass* callee_signature_k);450void profile_arguments(ProfileCall* x);451void profile_parameters(Base* x);452void profile_parameters_at_call(ProfileCall* x);453LIR_Opr maybe_mask_boolean(StoreIndexed* x, LIR_Opr array, LIR_Opr value, CodeEmitInfo*& null_check_info);454455public:456Compilation* compilation() const { return _compilation; }457FrameMap* frame_map() const { return _compilation->frame_map(); }458ciMethod* method() const { return _method; }459BlockBegin* block() const { return _block; }460IRScope* scope() const { return block()->scope(); }461462int max_virtual_register_number() const { return _virtual_register_number; }463464void block_do(BlockBegin* block);465466// Flags that can be set on vregs467enum VregFlag {468must_start_in_memory = 0 // needs to be assigned a memory location at beginning, but may then be loaded in a register469, callee_saved = 1 // must be in a callee saved register470, byte_reg = 2 // must be in a byte register471, num_vreg_flags472473};474475LIRGenerator(Compilation* compilation, ciMethod* method)476: _compilation(compilation)477, _method(method)478, _virtual_register_number(LIR_OprDesc::vreg_base)479, _vreg_flags(NULL, 0, num_vreg_flags) {480init();481}482483// for virtual registers, maps them back to Phi's or Local's484Instruction* instruction_for_opr(LIR_Opr opr);485Instruction* instruction_for_vreg(int reg_num);486487void set_vreg_flag (int vreg_num, VregFlag f);488bool is_vreg_flag_set(int vreg_num, VregFlag f);489void set_vreg_flag (LIR_Opr opr, VregFlag f) { set_vreg_flag(opr->vreg_number(), f); }490bool is_vreg_flag_set(LIR_Opr opr, VregFlag f) { return is_vreg_flag_set(opr->vreg_number(), f); }491492// statics493static LIR_Opr exceptionOopOpr();494static LIR_Opr exceptionPcOpr();495static LIR_Opr divInOpr();496static LIR_Opr divOutOpr();497static LIR_Opr remOutOpr();498static LIR_Opr shiftCountOpr();499LIR_Opr syncTempOpr();500LIR_Opr atomicLockOpr();501502// returns a register suitable for saving the thread in a503// call_runtime_leaf if one is needed.504LIR_Opr getThreadTemp();505506// visitor functionality507virtual void do_Phi (Phi* x);508virtual void do_Local (Local* x);509virtual void do_Constant (Constant* x);510virtual void do_LoadField (LoadField* x);511virtual void do_StoreField (StoreField* x);512virtual void do_ArrayLength (ArrayLength* x);513virtual void do_LoadIndexed (LoadIndexed* x);514virtual void do_StoreIndexed (StoreIndexed* x);515virtual void do_NegateOp (NegateOp* x);516virtual void do_ArithmeticOp (ArithmeticOp* x);517virtual void do_ShiftOp (ShiftOp* x);518virtual void do_LogicOp (LogicOp* x);519virtual void do_CompareOp (CompareOp* x);520virtual void do_IfOp (IfOp* x);521virtual void do_Convert (Convert* x);522virtual void do_NullCheck (NullCheck* x);523virtual void do_TypeCast (TypeCast* x);524virtual void do_Invoke (Invoke* x);525virtual void do_NewInstance (NewInstance* x);526virtual void do_NewTypeArray (NewTypeArray* x);527virtual void do_NewObjectArray (NewObjectArray* x);528virtual void do_NewMultiArray (NewMultiArray* x);529virtual void do_CheckCast (CheckCast* x);530virtual void do_InstanceOf (InstanceOf* x);531virtual void do_MonitorEnter (MonitorEnter* x);532virtual void do_MonitorExit (MonitorExit* x);533virtual void do_Intrinsic (Intrinsic* x);534virtual void do_BlockBegin (BlockBegin* x);535virtual void do_Goto (Goto* x);536virtual void do_If (If* x);537virtual void do_IfInstanceOf (IfInstanceOf* x);538virtual void do_TableSwitch (TableSwitch* x);539virtual void do_LookupSwitch (LookupSwitch* x);540virtual void do_Return (Return* x);541virtual void do_Throw (Throw* x);542virtual void do_Base (Base* x);543virtual void do_OsrEntry (OsrEntry* x);544virtual void do_ExceptionObject(ExceptionObject* x);545virtual void do_RoundFP (RoundFP* x);546virtual void do_UnsafeGetRaw (UnsafeGetRaw* x);547virtual void do_UnsafePutRaw (UnsafePutRaw* x);548virtual void do_UnsafeGetObject(UnsafeGetObject* x);549virtual void do_UnsafePutObject(UnsafePutObject* x);550virtual void do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x);551virtual void do_UnsafePrefetchRead (UnsafePrefetchRead* x);552virtual void do_UnsafePrefetchWrite(UnsafePrefetchWrite* x);553virtual void do_ProfileCall (ProfileCall* x);554virtual void do_ProfileReturnType (ProfileReturnType* x);555virtual void do_ProfileInvoke (ProfileInvoke* x);556virtual void do_RuntimeCall (RuntimeCall* x);557virtual void do_MemBar (MemBar* x);558virtual void do_RangeCheckPredicate(RangeCheckPredicate* x);559#ifdef ASSERT560virtual void do_Assert (Assert* x);561#endif562563#ifdef C1_LIRGENERATOR_MD_HPP564#include C1_LIRGENERATOR_MD_HPP565#endif566};567568569class LIRItem: public CompilationResourceObj {570private:571Value _value;572LIRGenerator* _gen;573LIR_Opr _result;574bool _destroys_register;575LIR_Opr _new_result;576577LIRGenerator* gen() const { return _gen; }578579public:580LIRItem(Value value, LIRGenerator* gen) {581_destroys_register = false;582_gen = gen;583set_instruction(value);584}585586LIRItem(LIRGenerator* gen) {587_destroys_register = false;588_gen = gen;589_result = LIR_OprFact::illegalOpr;590set_instruction(NULL);591}592593void set_instruction(Value value) {594_value = value;595_result = LIR_OprFact::illegalOpr;596if (_value != NULL) {597_gen->walk(_value);598_result = _value->operand();599}600_new_result = LIR_OprFact::illegalOpr;601}602603Value value() const { return _value; }604ValueType* type() const { return value()->type(); }605LIR_Opr result() {606assert(!_destroys_register || (!_result->is_register() || _result->is_virtual()),607"shouldn't use set_destroys_register with physical regsiters");608if (_destroys_register && _result->is_register()) {609if (_new_result->is_illegal()) {610_new_result = _gen->new_register(type());611gen()->lir()->move(_result, _new_result);612}613return _new_result;614} else {615return _result;616}617return _result;618}619620void set_result(LIR_Opr opr);621622void load_item();623void load_byte_item();624void load_nonconstant();625// load any values which can't be expressed as part of a single store instruction626void load_for_store(BasicType store_type);627void load_item_force(LIR_Opr reg);628629void dont_load_item() {630// do nothing631}632633void set_destroys_register() {634_destroys_register = true;635}636637bool is_constant() const { return value()->as_Constant() != NULL; }638bool is_stack() { return result()->is_stack(); }639bool is_register() { return result()->is_register(); }640641ciObject* get_jobject_constant() const;642jint get_jint_constant() const;643jlong get_jlong_constant() const;644jfloat get_jfloat_constant() const;645jdouble get_jdouble_constant() const;646jint get_address_constant() const;647};648649#endif // SHARE_VM_C1_C1_LIRGENERATOR_HPP650651652