218 // Given an immediate value, return an operand usable in logical ops.
219 LIR_Opr load_immediate(int x, BasicType type);
220
221 void set_result(Value x, LIR_Opr opr) {
222 assert(opr->is_valid(), "must set to valid value");
223 assert(x->operand()->is_illegal(), "operand should never change");
224 assert(!opr->is_register() || opr->is_virtual(), "should never set result to a physical register");
225 x->set_operand(opr);
226 assert(opr == x->operand(), "must be");
227 if (opr->is_virtual()) {
228 _instruction_for_operand.at_put_grow(opr->vreg_number(), x, NULL);
229 }
230 }
231 void set_no_result(Value x) { assert(!x->has_uses(), "can't have use"); x->clear_operand(); }
232
233 friend class LIRItem;
234
235 LIR_Opr round_item(LIR_Opr opr);
236 LIR_Opr force_to_spill(LIR_Opr value, BasicType t);
237
238 LIR_Opr force_opr_to(LIR_Opr op, LIR_Opr reg);
239
240 PhiResolverState& resolver_state() { return _resolver_state; }
241
242 void move_to_phi(PhiResolver* resolver, Value cur_val, Value sux_val);
243 void move_to_phi(ValueStack* cur_state);
244
245 // platform dependent
246 LIR_Opr getThreadPointer();
247
248 private:
249 // code emission
250 void do_ArithmeticOp_Long(ArithmeticOp* x);
251 void do_ArithmeticOp_Int (ArithmeticOp* x);
252 void do_ArithmeticOp_FPU (ArithmeticOp* x);
253
254 void do_RegisterFinalizer(Intrinsic* x);
255 void do_isInstance(Intrinsic* x);
256 void do_isPrimitive(Intrinsic* x);
257 void do_getClass(Intrinsic* x);
258 void do_currentThread(Intrinsic* x);
259 void do_FmaIntrinsic(Intrinsic* x);
|
218 // Given an immediate value, return an operand usable in logical ops.
219 LIR_Opr load_immediate(int x, BasicType type);
220
221 void set_result(Value x, LIR_Opr opr) {
222 assert(opr->is_valid(), "must set to valid value");
223 assert(x->operand()->is_illegal(), "operand should never change");
224 assert(!opr->is_register() || opr->is_virtual(), "should never set result to a physical register");
225 x->set_operand(opr);
226 assert(opr == x->operand(), "must be");
227 if (opr->is_virtual()) {
228 _instruction_for_operand.at_put_grow(opr->vreg_number(), x, NULL);
229 }
230 }
231 void set_no_result(Value x) { assert(!x->has_uses(), "can't have use"); x->clear_operand(); }
232
233 friend class LIRItem;
234
235 LIR_Opr round_item(LIR_Opr opr);
236 LIR_Opr force_to_spill(LIR_Opr value, BasicType t);
237
238 PhiResolverState& resolver_state() { return _resolver_state; }
239
240 void move_to_phi(PhiResolver* resolver, Value cur_val, Value sux_val);
241 void move_to_phi(ValueStack* cur_state);
242
243 // platform dependent
244 LIR_Opr getThreadPointer();
245
246 private:
247 // code emission
248 void do_ArithmeticOp_Long(ArithmeticOp* x);
249 void do_ArithmeticOp_Int (ArithmeticOp* x);
250 void do_ArithmeticOp_FPU (ArithmeticOp* x);
251
252 void do_RegisterFinalizer(Intrinsic* x);
253 void do_isInstance(Intrinsic* x);
254 void do_isPrimitive(Intrinsic* x);
255 void do_getClass(Intrinsic* x);
256 void do_currentThread(Intrinsic* x);
257 void do_FmaIntrinsic(Intrinsic* x);
|