Exemplo n.º 1
0
void proest_inverse_permute(proest_ctx *x) {
    int round;

    for (round = PROEST_NROUNDS-1; round >= 0; --round) {
        AddConstant(x, round);
        ShiftRegistersInverse(x, round);
        MixColumns(x);
        SubBits(x);
    }
}
Exemplo n.º 2
0
	CodeGen::GenState* CodeGen::GenerateDefaultState()
	{
		auto state = GenState::CreateNewState();
		auto _print_fun_ = Context::GetGC()->New<Function>(Context::_print_);
		auto _fun_id = state->AddConstant(_print_fun_->toValue());

		auto var_id = state->AddVariable(u"print");
		state->AddInstruction(VM_CODE::LOAD_C, _fun_id);
		state->AddInstruction(VM_CODE::STORE_V, var_id);
		return state;
	}
Exemplo n.º 3
0
void proest_permute(proest_ctx *x)
{
  int round;

  for(round=0;round<PROEST_NROUNDS;round++)
  {
    SubBits(x);
    MixColumns(x);
    ShiftRegisters(x,round);
    AddConstant(x,round);
  }
}
Exemplo n.º 4
0
BOOL XESkillMng::Load( LPCTSTR szXml )
{
	m_strProp = szXml;
	// 파일은 utf16이지만 테이블엔 utf8로 보관
	m_pTextTable = new XTextTableUTF8;	
	if( m_pTextTable->Load( XE::MakePath( DIR_PROP, _T("text_skill.txt") ) ) == FALSE )
	{
		XLOG( "text_skill.txt load failed!" );
		return FALSE;
	}
	XXMLDoc doc;
	if( doc.Load( XE::MakePath( DIR_PROP, szXml ) ) == FALSE )
		return FALSE;
	// 루트노드를 찾는다.
	TiXmlElement *pRoot = doc.GetDoc().FirstChildElement( "skill" );
	XBREAKF( pRoot == NULL, "%s: <skill>root node not found" );
	// 
	AddConstant();
	//
	LoadSkill( pRoot, NULL, NULL );
	return TRUE;
}
Exemplo n.º 5
0
/* 添加int 类型的常量到符号表 */
Symbol IntConstant (int i) 
{
    union value val = {};
    val.i[0] = i;
    return AddConstant (T(INT), val);
}