本文整理汇总了C++中instruction_operand::load_code_block方法的典型用法代码示例。如果您正苦于以下问题:C++ instruction_operand::load_code_block方法的具体用法?C++ instruction_operand::load_code_block怎么用?C++ instruction_operand::load_code_block使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类instruction_operand
的用法示例。
在下文中一共展示了instruction_operand::load_code_block方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: operator
void operator()(instruction_operand op)
{
switch(op.rel_type())
{
case RT_XT:
{
code_block *compiled = op.load_code_block();
cell owner = compiled->owner;
if(to_boolean(owner)) op.store_value(parent->compute_xt_address(owner));
break;
}
case RT_XT_PIC:
{
code_block *compiled = op.load_code_block();
cell owner = parent->code_block_owner(compiled);
if(to_boolean(owner)) op.store_value(parent->compute_xt_pic_address(owner));
break;
}
case RT_XT_PIC_TAIL:
{
code_block *compiled = op.load_code_block();
cell owner = parent->code_block_owner(compiled);
if(to_boolean(owner)) op.store_value(parent->compute_xt_pic_tail_address(owner));
break;
}
default:
break;
}
}
示例2: operator
void operator()(instruction_operand op)
{
code_block *compiled = op.parent_code_block();
cell old_offset = op.rel_offset() + (cell)compiled->entry_point() - code_offset;
switch(op.rel_type())
{
case RT_LITERAL:
op.store_value(data_visitor.visit_pointer(op.load_value(old_offset)));
break;
case RT_ENTRY_POINT:
case RT_ENTRY_POINT_PIC:
case RT_ENTRY_POINT_PIC_TAIL:
op.store_code_block(code_visitor(op.load_code_block(old_offset)));
break;
case RT_HERE:
op.store_value(op.load_value(old_offset) + code_offset);
break;
case RT_UNTAGGED:
break;
default:
parent->store_external_address(op);
break;
}
}
示例3: operator
void operator()(instruction_operand op)
{
relocation_type type = op.rel_type();
if(type == RT_ENTRY_POINT
|| type == RT_ENTRY_POINT_PIC
|| type == RT_ENTRY_POINT_PIC_TAIL)
op.store_code_block(visitor(op.load_code_block()));
}
示例4: operator
void operator()(instruction_operand op)
{
switch(op.rel_type())
{
case RT_ENTRY_POINT:
{
code_block *compiled = op.load_code_block();
cell owner = compiled->owner;
if(to_boolean(owner))
op.store_value(parent->compute_entry_point_address(owner));
break;
}
case RT_ENTRY_POINT_PIC:
{
code_block *compiled = op.load_code_block();
if(reset_inline_caches || !compiled->pic_p())
{
cell owner = parent->code_block_owner(compiled);
if(to_boolean(owner))
op.store_value(parent->compute_entry_point_pic_address(owner));
}
break;
}
case RT_ENTRY_POINT_PIC_TAIL:
{
code_block *compiled = op.load_code_block();
if(reset_inline_caches || !compiled->pic_p())
{
cell owner = parent->code_block_owner(compiled);
if(to_boolean(owner))
op.store_value(parent->compute_entry_point_pic_tail_address(owner));
}
break;
}
default:
break;
}
}