• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ VMReg类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: assert

void C2Compiler::initialize_runtime() {

  // Check assumptions used while running ADLC
  Compile::adlc_verification();
  assert(REG_COUNT <= ConcreteRegisterImpl::number_of_registers, "incompatible register counts");

  for (int i = 0; i < ConcreteRegisterImpl::number_of_registers ; i++ ) {
      OptoReg::vm2opto[i] = OptoReg::Bad;
  }

  for( OptoReg::Name i=OptoReg::Name(0); i<OptoReg::Name(REG_COUNT); i = OptoReg::add(i,1) ) {
    VMReg r = OptoReg::as_VMReg(i);
    if (r->is_valid()) {
      OptoReg::vm2opto[r->value()] = i;
    }
  }

  // Check that runtime and architecture description agree on callee-saved-floats
  bool callee_saved_floats = false;
  for( OptoReg::Name i=OptoReg::Name(0); i<OptoReg::Name(_last_Mach_Reg); i = OptoReg::add(i,1) ) {
    // Is there a callee-saved float or double?
    if( register_save_policy[i] == 'E' /* callee-saved */ &&
       (register_save_type[i] == Op_RegF || register_save_type[i] == Op_RegD) ) {
      callee_saved_floats = true;
    }
  }

  DEBUG_ONLY( Node::init_NodeProperty(); )
开发者ID:ismo1652,项目名称:jvmnotebook,代码行数:28,代码来源:c2compiler.cpp


示例2: bias

 VMReg bias(int offset) {
     assert(is_stack(), "must be");
     // VMReg res = VMRegImpl::as_VMReg(value() + offset);
     VMReg res = stack2reg(reg2stack() + offset);
     assert(res->is_stack(), "must be");
     return res;
 }
开发者ID:,项目名称:,代码行数:7,代码来源:


示例3: set_ptr

    void set_ptr ( VMReg ptr ) {
#ifdef _LP64
        _second = ptr->next();
#else
        _second = VMRegImpl::Bad();
#endif
        _first = ptr;
    }
开发者ID:,项目名称:,代码行数:8,代码来源:


示例4: s

void LIR_Assembler::verify_oop_map(CodeEmitInfo* info) {
#ifndef PRODUCT
    if (VerifyOops) {
        OopMapStream s(info->oop_map());
        while (!s.is_done()) {
            OopMapValue v = s.current();
            if (v.is_oop()) {
                VMReg r = v.reg();
                if (!r->is_stack()) {
                    stringStream st;
                    st.print("bad oop %s at %d", r->as_Register()->name(), _masm->offset());
#ifdef SPARC
                    _masm->_verify_oop(r->as_Register(), os::strdup(st.as_string(), mtCompiler), __FILE__, __LINE__);
#else
                    _masm->verify_oop(r->as_Register());
#endif
                } else {
                    _masm->verify_stack_oop(r->reg2stack() * VMRegImpl::stack_slot_size);
                }
            }
            check_codespace();
            CHECK_BAILOUT();

            s.next();
        }
    }
#endif
}
开发者ID:sourcemirror,项目名称:jdk-9-hotspot,代码行数:28,代码来源:c1_LIRAssembler.cpp


示例5: pd_location

address RegisterMap::pd_location(VMReg regname) const {
  register_map_init();

  assert(regname->is_reg(), "sanity check");
  // Only the GPRs get handled this way
  if( !regname->is_Register())
    return NULL;

  // don't talk about bad registers
  if ((bad_mask & ((LocationValidType)1 << regname->value())) != 0) {
    return NULL;
  }

  // Convert to a GPR
  Register reg;
  int second_word = 0;
  // 32-bit registers for in, out and local
  if (!regname->is_concrete()) {
    // HMM ought to return NULL for any non-concrete (odd) vmreg
    // this all tied up in the fact we put out double oopMaps for
    // register locations. When that is fixed we'd will return NULL
    // (or assert here).
    reg = regname->prev()->as_Register();
#ifdef _LP64
    second_word = sizeof(jint);
#else
    return NULL;
#endif // _LP64
  } else {
    reg = regname->as_Register();
  }
  if (reg->is_out()) {
    assert(_younger_window != NULL, "Younger window should be available");
    return second_word + (address)&_younger_window[reg->after_save()->sp_offset_in_saved_window()];
  }
  if (reg->is_local() || reg->is_in()) {
    assert(_window != NULL, "Window should be available");
    return second_word + (address)&_window[reg->sp_offset_in_saved_window()];
  }
  // Only the window'd GPRs get handled this way; not the globals.
  return NULL;
}
开发者ID:AllenWeb,项目名称:jdk7u-hotspot,代码行数:42,代码来源:frame_sparc.cpp


示例6: is_general_purpose_reg

bool CodeInstaller::is_general_purpose_reg(VMReg hotspotRegister) {
  return !hotspotRegister->is_FloatRegister();
}
开发者ID:gaoxiaojun,项目名称:dync,代码行数:3,代码来源:jvmciCodeInstaller_sparc.cpp


示例7: next

 // This really ought to check that the register is "real" in the sense that
 // we don't try and get the VMReg number of a physical register that doesn't
 // have an expressible part. That would be pd specific code
 VMReg next() {
     assert((is_reg() && value() < stack0->value() - 1) || is_stack(), "must be");
     return (VMReg)(intptr_t)(value() + 1);
 }
开发者ID:,项目名称:,代码行数:7,代码来源:


示例8: set2

 void set2    (         VMReg v  ) {
     _second=v->next();
     _first=v;
 }
开发者ID:,项目名称:,代码行数:4,代码来源:


示例9: stack2reg

 // Convert register numbers to stack slots and vice versa
 static VMReg stack2reg( int idx ) {
     return (VMReg) (intptr_t) (stack0->value() + idx);
 }
开发者ID:,项目名称:,代码行数:4,代码来源:


示例10: prev

 VMReg prev() {
     assert((is_stack() && value() > stack0->value()) || (is_reg() && value() != 0), "must be");
     return (VMReg)(intptr_t)(value() - 1);
 }
开发者ID:,项目名称:,代码行数:4,代码来源:


示例11: set_xxx

// frame_size units are stack-slots (4 bytes) NOT intptr_t; we can name odd
// slots to hold 4-byte values like ints and floats in the LP64 build.
void OopMap::set_xxx(VMReg reg, OopMapValue::oop_types x, VMReg optional) {

  assert(reg->value() < _locs_length, "too big reg value for stack size");
  assert( _locs_used[reg->value()] == OopMapValue::unused_value, "cannot insert twice" );
  debug_only( _locs_used[reg->value()] = x; )
开发者ID:pombreda,项目名称:graal,代码行数:7,代码来源:oopMap.cpp


示例12: is_single_phys_reg

 // Return true if single register but adjacent stack slots do not count
 bool is_single_phys_reg() const {
     return (_first->is_reg() && (_first->value() + 1 == _second->value()));
 }
开发者ID:,项目名称:,代码行数:4,代码来源:


示例13: is_adjacent_aligned_on_stack

 // Return true if single stack based "register" where the slot alignment matches input alignment
 bool is_adjacent_aligned_on_stack(int alignment) const {
     return (_first->is_stack() && (_first->value() + 1 == _second->value()) && ((_first->value() & (alignment-1)) == 0));
 }
开发者ID:,项目名称:,代码行数:4,代码来源:


示例14: value

 uintptr_t reg2stack() {
     assert( is_stack(), "Not a stack-based register" );
     return value() - stack0->value();
 }
开发者ID:,项目名称:,代码行数:4,代码来源:



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ VMatrix类代码示例发布时间:2022-05-31
下一篇:
C++ VMMethod类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap