/***************************************************************************************************12Zyan Disassembler Library (Zydis)34Original Author : Florian Bernd56* Permission is hereby granted, free of charge, to any person obtaining a copy7* of this software and associated documentation files (the "Software"), to deal8* in the Software without restriction, including without limitation the rights9* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell10* copies of the Software, and to permit persons to whom the Software is11* furnished to do so, subject to the following conditions:12*13* The above copyright notice and this permission notice shall be included in all14* copies or substantial portions of the Software.15*16* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR17* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,18* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE19* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER20* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,21* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE22* SOFTWARE.2324***************************************************************************************************/2526#include <Zydis/Zydis.h>2728/* ============================================================================================== */29/* Exported functions */30/* ============================================================================================== */3132ZyanU64 ZydisGetVersion(void)33{34return ZYDIS_VERSION;35}3637ZyanStatus ZydisIsFeatureEnabled(ZydisFeature feature)38{39switch (feature)40{41case ZYDIS_FEATURE_DECODER:42#ifndef ZYDIS_DISABLE_DECODER43return ZYAN_STATUS_TRUE;44#else45return ZYAN_STATUS_FALSE;46#endif47case ZYDIS_FEATURE_ENCODER:48#ifndef ZYDIS_DISABLE_ENCODER49return ZYAN_STATUS_TRUE;50#else51return ZYAN_STATUS_FALSE;52#endif53case ZYDIS_FEATURE_FORMATTER:54#ifndef ZYDIS_DISABLE_FORMATTER55return ZYAN_STATUS_TRUE;56#else57return ZYAN_STATUS_FALSE;58#endif59case ZYDIS_FEATURE_AVX512:60#ifndef ZYDIS_DISABLE_AVX51261return ZYAN_STATUS_TRUE;62#else63return ZYAN_STATUS_FALSE;64#endif6566case ZYDIS_FEATURE_KNC:67#ifndef ZYDIS_DISABLE_KNC68return ZYAN_STATUS_TRUE;69#else70return ZYAN_STATUS_FALSE;71#endif7273case ZYDIS_FEATURE_SEGMENT:74#ifndef ZYDIS_DISABLE_SEGMENT75return ZYAN_STATUS_TRUE;76#else77return ZYAN_STATUS_FALSE;78#endif7980default:81return ZYAN_STATUS_INVALID_ARGUMENT;82}83}8485/* ============================================================================================== */868788