当前位置: 首页>>代码示例>>C++>>正文


C++ LIR_Opr::is_virtual方法代码示例

本文整理汇总了C++中LIR_Opr::is_virtual方法的典型用法代码示例。如果您正苦于以下问题:C++ LIR_Opr::is_virtual方法的具体用法?C++ LIR_Opr::is_virtual怎么用?C++ LIR_Opr::is_virtual使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LIR_Opr的用法示例。


在下文中一共展示了LIR_Opr::is_virtual方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: set_result

 void  set_result(Value x, LIR_Opr opr)           {
   assert(opr->is_valid(), "must set to valid value");
   assert(x->operand()->is_illegal(), "operand should never change");
   assert(!opr->is_register() || opr->is_virtual(), "should never set result to a physical register");
   x->set_operand(opr);
   assert(opr == x->operand(), "must be");
   if (opr->is_virtual()) {
     _instruction_for_operand.at_put_grow(opr->vreg_number(), x, NULL);
   }
 }
开发者ID:netroby,项目名称:jdk9-shenandoah-hotspot,代码行数:10,代码来源:c1_LIRGenerator.hpp

示例2: do_Convert

void LIRGenerator::do_Convert(Convert* x) {
  // flags that vary for the different operations and different SSE-settings
  bool fixed_input, fixed_result, round_result, needs_stub;

  switch (x->op()) {
    case Bytecodes::_i2l: // fall through
    case Bytecodes::_l2i: // fall through
    case Bytecodes::_i2b: // fall through
    case Bytecodes::_i2c: // fall through
    case Bytecodes::_i2s: fixed_input = false;       fixed_result = false;       round_result = false;      needs_stub = false; break;

    case Bytecodes::_f2d: fixed_input = UseSSE == 1; fixed_result = false;       round_result = false;      needs_stub = false; break;
    case Bytecodes::_d2f: fixed_input = false;       fixed_result = UseSSE == 1; round_result = UseSSE < 1; needs_stub = false; break;
    case Bytecodes::_i2f: fixed_input = false;       fixed_result = false;       round_result = UseSSE < 1; needs_stub = false; break;
    case Bytecodes::_i2d: fixed_input = false;       fixed_result = false;       round_result = false;      needs_stub = false; break;
    case Bytecodes::_f2i: fixed_input = false;       fixed_result = false;       round_result = false;      needs_stub = true;  break;
    case Bytecodes::_d2i: fixed_input = false;       fixed_result = false;       round_result = false;      needs_stub = true;  break;
    case Bytecodes::_l2f: fixed_input = false;       fixed_result = UseSSE >= 1; round_result = UseSSE < 1; needs_stub = false; break;
    case Bytecodes::_l2d: fixed_input = false;       fixed_result = UseSSE >= 2; round_result = UseSSE < 2; needs_stub = false; break;
    case Bytecodes::_f2l: fixed_input = true;        fixed_result = true;        round_result = false;      needs_stub = false; break;
    case Bytecodes::_d2l: fixed_input = true;        fixed_result = true;        round_result = false;      needs_stub = false; break;
    default: ShouldNotReachHere();
  }

  LIRItem value(x->value(), this);
  value.load_item();
  LIR_Opr input = value.result();
  LIR_Opr result = rlock(x);

  // arguments of lir_convert
  LIR_Opr conv_input = input;
  LIR_Opr conv_result = result;
  ConversionStub* stub = NULL;

  if (fixed_input) {
    conv_input = fixed_register_for(input->type());
    __ move(input, conv_input);
  }

  assert(fixed_result == false || round_result == false, "cannot set both");
  if (fixed_result) {
    conv_result = fixed_register_for(result->type());
  } else if (round_result) {
    result = new_register(result->type());
    set_vreg_flag(result, must_start_in_memory);
  }

  if (needs_stub) {
    stub = new ConversionStub(x->op(), conv_input, conv_result);
  }

  __ convert(x->op(), conv_input, conv_result, stub);

  if (result != conv_result) {
    __ move(conv_result, result);
  }

  assert(result->is_virtual(), "result must be virtual register");
  set_result(x, result);
}
开发者ID:ericbbcc,项目名称:hotspot,代码行数:60,代码来源:c1_LIRGenerator_x86.cpp

示例3: result

  LIR_Opr result()             {
assert(_destroys_register==not_destroyed||(!_result->is_register()||_result->is_virtual()),
           "shouldn't use set_destroys_register with physical regsiters");
if(_destroys_register==awaiting_copy&&_result->is_register()){
LIR_Opr new_result=_gen->new_register(type())->set_destroyed();
      gen()->lir()->move(_result, new_result);
      _destroys_register = destroyed;
_result=new_result;
    }
    return _result;
  }
开发者ID:GregBowyer,项目名称:ManagedRuntimeInitiative,代码行数:11,代码来源:c1_LIRGenerator.hpp

示例4: result

 LIR_Opr result()             {
   assert(!_destroys_register || (!_result->is_register() || _result->is_virtual()),
          "shouldn't use set_destroys_register with physical regsiters");
   if (_destroys_register && _result->is_register()) {
     if (_new_result->is_illegal()) {
       _new_result = _gen->new_register(type());
       gen()->lir()->move(_result, _new_result);
     }
     return _new_result;
   } else {
     return _result;
   }
   return _result;
 }
开发者ID:pombreda,项目名称:graal,代码行数:14,代码来源:c1_LIRGenerator.hpp

示例5: load_byte_item

// Item will be loaded into a byte register; Intel only
void LIRItem::load_byte_item() {
  load_item();
  LIR_Opr res = result();

  if (!res->is_virtual() || !_gen->is_vreg_flag_set(res, LIRGenerator::byte_reg)) {
    // make sure that it is a byte register
    assert(!value()->type()->is_float() && !value()->type()->is_double(),
           "can't load floats in byte register");
    LIR_Opr reg = _gen->rlock_byte(T_BYTE);
    __ move(res, reg);

    _result = reg;
  }
}
开发者ID:ericbbcc,项目名称:hotspot,代码行数:15,代码来源:c1_LIRGenerator_x86.cpp

示例6: regname

VMReg FrameMap::regname(LIR_Opr opr) const {
  if (opr->is_single_cpu()) {
    assert(!opr->is_virtual(), "should not see virtual registers here");
    return opr->as_register()->as_VMReg();
  } else if (opr->is_single_stack()) {
    return sp_offset2vmreg(sp_offset_for_slot(opr->single_stack_ix()));
  } else if (opr->is_address()) {
    LIR_Address* addr = opr->as_address_ptr();
    assert(addr->base() == stack_pointer(), "sp based addressing only");
    return sp_offset2vmreg(in_ByteSize(addr->index()->as_jint()));
  }
  ShouldNotReachHere();
  return VMRegImpl::Bad();
}
开发者ID:gaoxiaojun,项目名称:dync,代码行数:14,代码来源:c1_FrameMap.cpp


注:本文中的LIR_Opr::is_virtual方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。