1370b324cSopenharmony_ci// BranchRegister.cpp 2370b324cSopenharmony_ci 3370b324cSopenharmony_ci#include "StdAfx.h" 4370b324cSopenharmony_ci 5370b324cSopenharmony_ci#include "../Common/RegisterCodec.h" 6370b324cSopenharmony_ci 7370b324cSopenharmony_ci#include "BranchMisc.h" 8370b324cSopenharmony_ci 9370b324cSopenharmony_cinamespace NCompress { 10370b324cSopenharmony_cinamespace NBranch { 11370b324cSopenharmony_ci 12370b324cSopenharmony_ci#ifdef Z7_EXTRACT_ONLY 13370b324cSopenharmony_ci#define GET_CREATE_FUNC(x) NULL 14370b324cSopenharmony_ci#define CREATE_BRA_E(n) 15370b324cSopenharmony_ci#else 16370b324cSopenharmony_ci#define GET_CREATE_FUNC(x) x 17370b324cSopenharmony_ci#define CREATE_BRA_E(n) \ 18370b324cSopenharmony_ci REGISTER_FILTER_CREATE(CreateBra_Encoder_ ## n, CCoder(Z7_BRANCH_CONV_ENC(n))) 19370b324cSopenharmony_ci#endif 20370b324cSopenharmony_ci 21370b324cSopenharmony_ci#define CREATE_BRA(n) \ 22370b324cSopenharmony_ci REGISTER_FILTER_CREATE(CreateBra_Decoder_ ## n, CCoder(Z7_BRANCH_CONV_DEC(n))) \ 23370b324cSopenharmony_ci CREATE_BRA_E(n) 24370b324cSopenharmony_ci 25370b324cSopenharmony_ciCREATE_BRA(PPC) 26370b324cSopenharmony_ciCREATE_BRA(IA64) 27370b324cSopenharmony_ciCREATE_BRA(ARM) 28370b324cSopenharmony_ciCREATE_BRA(ARMT) 29370b324cSopenharmony_ciCREATE_BRA(SPARC) 30370b324cSopenharmony_ci 31370b324cSopenharmony_ci#define METHOD_ITEM(n, id, name) \ 32370b324cSopenharmony_ci REGISTER_FILTER_ITEM( \ 33370b324cSopenharmony_ci CreateBra_Decoder_ ## n, GET_CREATE_FUNC( \ 34370b324cSopenharmony_ci CreateBra_Encoder_ ## n), \ 35370b324cSopenharmony_ci 0x3030000 + id, name) 36370b324cSopenharmony_ci 37370b324cSopenharmony_ciREGISTER_CODECS_VAR 38370b324cSopenharmony_ci{ 39370b324cSopenharmony_ci METHOD_ITEM(PPC, 0x205, "PPC"), 40370b324cSopenharmony_ci METHOD_ITEM(IA64, 0x401, "IA64"), 41370b324cSopenharmony_ci METHOD_ITEM(ARM, 0x501, "ARM"), 42370b324cSopenharmony_ci METHOD_ITEM(ARMT, 0x701, "ARMT"), 43370b324cSopenharmony_ci METHOD_ITEM(SPARC, 0x805, "SPARC") 44370b324cSopenharmony_ci}; 45370b324cSopenharmony_ci 46370b324cSopenharmony_ciREGISTER_CODECS(Branch) 47370b324cSopenharmony_ci 48370b324cSopenharmony_cinamespace NArm64 { 49370b324cSopenharmony_ciREGISTER_FILTER_E(ARM64, 50370b324cSopenharmony_ci CDecoder(), 51370b324cSopenharmony_ci CEncoder(), 52370b324cSopenharmony_ci 0xa, "ARM64") 53370b324cSopenharmony_ci} 54370b324cSopenharmony_ci 55370b324cSopenharmony_ci}} 56