diff --git a/include/keystone/keystone.h b/include/keystone/keystone.h index 9e7f35570230052f5468d5084b277e4493936690..28ce0ce19df8f656905370f3bb7f1e60006f4f61 100644 --- a/include/keystone/keystone.h +++ b/include/keystone/keystone.h @@ -139,7 +139,8 @@ typedef enum ks_opt_value { KS_OPT_SYNTAX_INTEL = 1 << 0, // X86 Intel syntax - default on X86 (KS_OPT_SYNTAX). KS_OPT_SYNTAX_ATT = 1 << 1, // X86 ATT asm syntax (KS_OPT_SYNTAX). KS_OPT_SYNTAX_NASM = 1 << 2, // X86 Nasm syntax (KS_OPT_SYNTAX). - KS_OPT_SYNTAX_MASM = 1 << 3, // X86 Masm syntax (KS_OPT_SYNTAX). + KS_OPT_SYNTAX_MASM = 1 << 3, // X86 Masm syntax (KS_OPT_SYNTAX) - unsupported yet. + KS_OPT_SYNTAX_GAS = 1 << 4, // X86 GAS syntax (KS_OPT_SYNTAX) } ks_opt_value; diff --git a/llvm/keystone/ks.cpp b/llvm/keystone/ks.cpp index 6195c0b729d46dd8947d2fef59737761c64e3f21..eab3b1045aac1cb83f4cc4009cca16b80886e2b5 100644 --- a/llvm/keystone/ks.cpp +++ b/llvm/keystone/ks.cpp @@ -418,6 +418,7 @@ ks_err ks_option(ks_engine *ks, ks_opt_type type, size_t value) ks->syntax = (ks_opt_value)value; ks->MAI->setAssemblerDialect(1); break; + case KS_OPT_SYNTAX_GAS: case KS_OPT_SYNTAX_ATT: ks->syntax = (ks_opt_value)value; ks->MAI->setAssemblerDialect(0);