From a31bc6ef173943d6f76ea599692eb44b83e89a15 Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Mon, 13 Feb 2023 21:49:19 +0800 Subject: [PATCH] more keywords for asm --- RedPandaIDE/compiler/compiler.h | 1 + libs/qsynedit/qsynedit/syntaxer/asm.cpp | 32 ++++++++++++++----------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/RedPandaIDE/compiler/compiler.h b/RedPandaIDE/compiler/compiler.h index 7a194025..f012a748 100644 --- a/RedPandaIDE/compiler/compiler.h +++ b/RedPandaIDE/compiler/compiler.h @@ -98,6 +98,7 @@ protected: QString mDirectory; bool mRebuild; std::shared_ptr mProject; + bool mSetLANG; private: bool mStop; diff --git a/libs/qsynedit/qsynedit/syntaxer/asm.cpp b/libs/qsynedit/qsynedit/syntaxer/asm.cpp index 400f6ea3..dc438874 100644 --- a/libs/qsynedit/qsynedit/syntaxer/asm.cpp +++ b/libs/qsynedit/qsynedit/syntaxer/asm.cpp @@ -79,18 +79,19 @@ const QSet ASMSyntaxer::ATTRegisters { }; const QSet ASMSyntaxer::Instructions { - "aaa","aad","aam","aas","adc","adcx","add","addpd","addps", + "aaa","aad","aam","aas","adc","adcx","add", + "addb","addw","addl","addq", "addpd","addps", "addsd","addss","addsubpd","addsubps","adox","aesdec","aesdec128kl","aesdec256kl","aesdeclast","aesdecwide128kl", "aesdecwide256kl","aesenc","aesenc128kl","aesenc256kl","aesenclast","aesencwide128kl","aesencwide256kl","aesimc","aeskeygenassist","and", - "andn","andnpd","andnps","andpd","andps","arpl","bextr","blendpd","blendps","blendvpd", + "andn","andnpd","andnps","andpd","andps","andb","andw","andl","andq","arpl","bextr","blendpd","blendps","blendvpd", "blendvps","blsi","blsmsk","blsr","bndcl","bndcn","bndcu","bndldx","bndmk","bndmov", "bndstx","bound","bsf","bsr","bswap","bt","btc","btr","bts","bzhi", "call","cbw","cdq","cdqe","clac","clc","cld","cldemote","clflush","clflushopt", "cli","clrssbsy","clts","clwb","cmc","cmova","cmovae","cmovb","cmovbe","cmovc", "cmove","cmovg","cmovge","cmovl","cmovle","cmovna","cmovnae","cmovnb","cmovnbe","cmovnc", "cmovne","cmovng","cmovnge","cmovnl","cmovnle","cmovno","cmovnp","cmovns","cmovnz","cmovo", - "cmovp","cmovpe","cmovpo","cmovs","cmovz","cmp","cmppd","cmpps","cmps","cmpsb", - "cmpsd","cmpsq","cmpss","cmpsw","cmpxchg","cmpxchg16b","cmpxchg8b","comisd","comiss","cpuid", + "cmovp","cmovpe","cmovpo","cmovs","cmovz","cmp","cmpb","cmpw","cmpl","cmpq", + "cmppd","cmpps","cmps","cmpsb", "cmpsd","cmpsq","cmpss","cmpsw","cmpxchg","cmpxchg16b","cmpxchg8b","comisd","comiss","cpuid", "cqo","crc32","cvtdq2pd","cvtdq2ps","cvtpd2dq","cvtpd2pi","cvtpd2ps","cvtpi2pd","cvtpi2ps","cvtps2dq", "cvtps2pd","cvtps2pi","cvtsd2si","cvtsd2ss","cvtsi2sd","cvtsi2ss","cvtss2sd","cvtss2si","cvttpd2dq","cvttpd2pi", "cvttps2dq","cvttps2pi","cvttsd2si","cvttss2si","cwd","cwde","daa","das","dec","div", @@ -105,8 +106,8 @@ const QSet ASMSyntaxer::Instructions { "fsave","fscale","fsin","fsincos","fsqrt","fst","fstcw","fstenv","fstp","fstsw", "fsub","fsubp","fsubr","fsubrp","ftst","fucom","fucomi","fucomip","fucomp","fucompp", "fwait","fxam","fxch","fxrstor","fxsave","fxtract","fyl2x","fyl2xp1","gf2p8affineinvqb","gf2p8affineqb", - "gf2p8mulb","haddpd","haddps","hlt","hreset","hsubpd","hsubps","idiv","imul","in", - "inc","incsspd","incsspq","ins","insb","insd","insertps","insw","int n","int1", + "gf2p8mulb","haddpd","haddps","hlt","hreset","hsubpd","hsubps","idiv","idivb","idivw","idivl","idivq","imul", + "imulb","imulw","imull","imulq","in", "inc","incsspd","incsspq","ins","insb","insd","insertps","insw","int n","int1", "int3","into","invd","invlpg","invpcid","iret","iretd","iretq","jmp","ja", "jae","jb","jbe","jc","jcxz","je","jecxz","jg","jge","jl", "jle","jna","jnae","jnb","jnbe","jnc","jne","jng","jnge","jnl", @@ -116,7 +117,7 @@ const QSet ASMSyntaxer::Instructions { "knotq","knotw","korb","kord","korq","kortestb","kortestd","kortestq","kortestw","korw", "kshiftlb","kshiftld","kshiftlq","kshiftlw","kshiftrb","kshiftrd","kshiftrq","kshiftrw","ktestb","ktestd", "ktestq","ktestw","kunpckbw","kunpckdq","kunpckwd","kxnorb","kxnord","kxnorq","kxnorw","kxorb", - "kxord","kxorq","kxorw","lahf","lar","lddqu","ldmxcsr","lds","lea","leave", + "kxord","kxorq","kxorw","lahf","lar","lddqu","ldmxcsr","lds","lea","leaq","leave", "les","lfence","lfs","lgdt","lgs","lidt","lldt","lmsw","loadiwkey","lock", "lods","lodsb","lodsd","lodsq","lodsw","loop","loope","loopne","lsl","lss", "ltr","lzcnt","maskmovdqu","maskmovq","maxpd","maxps","maxsd","maxss","mfence","minpd", @@ -124,8 +125,9 @@ const QSet ASMSyntaxer::Instructions { "movdir64b","movdiri","movdq2q","movdqa","movdqu","movhlps","movhpd","movhps","movlhps","movlpd", "movlps","movmskpd","movmskps","movntdq","movntdqa","movnti","movntpd","movntps","movntq","movq", "movq2dq","movs","movsb","movsd","movshdup","movsldup","movsq","movss","movsw","movsx", - "movsxd","movupd","movups","movzx","mpsadbw","mul","mulpd","mulps","mulsd","mulss", - "mulx","mwait","neg","nop","not","or","orpd","orps","out","outs", + "movsxd","movupd","movups","movzx", "movb","movs","movl", + "mpsadbw","mul","mulpd","mulps","mulsd","mulss", + "mulx","mwait","neg","nop","not","or","orb","orw","orl","orq","orpd","orps","out","outs", "outsb","outsd","outsw","pabsb","pabsd","pabsq","pabsw","packssdw","packsswb","packusdw", "packuswb","paddb","paddd","paddq","paddsb","paddsw","paddusb","paddusw","paddw","palignr", "pand","pandn","pause","pavgb","pavgw","pblendvb","pblendw","pclmulqdq","pcmpeqb","pcmpeqd", @@ -135,15 +137,15 @@ const QSet ASMSyntaxer::Instructions { "pmaxsb","pmaxsd","pmaxsq","pmaxsw","pmaxub","pmaxud","pmaxuq","pmaxuw","pminsb","pminsd", "pminsq","pminsw","pminub","pminud","pminuq","pminuw","pmovmskb","pmovsx","pmovzx","pmuldq", "pmulhrsw","pmulhuw","pmulhw","pmulld","pmullq","pmullw","pmuludq","pop","popa","popad", - "popcnt","popf","popfd","popfq","por","prefetchw","prefetchh","psadbw","pshufb","pshufd", + "popcnt","popf","popfd","popfq","popq","por","prefetchw","prefetchh","psadbw","pshufb","pshufd", "pshufhw","pshuflw","pshufw","psignb","psignd","psignw","pslld","pslldq","psllq","psllw", "psrad","psraq","psraw","psrld","psrldq","psrlq","psrlw","psubb","psubd","psubq", "psubsb","psubsw","psubusb","psubusw","psubw","ptest","ptwrite","punpckhbw","punpckhdq","punpckhqdq", "punpckhwd","punpcklbw","punpckldq","punpcklqdq","punpcklwd","push","pusha","pushad","pushf","pushfd", - "pushfq","pxor","rcl","rcpps","rcpss","rcr","rdfsbase","rdgsbase","rdmsr","rdpid", + "pushfq","pushq","pxor","rcl","rcpps","rcpss","rcr","rdfsbase","rdgsbase","rdmsr","rdpid", "rdpkru","rdpmc","rdrand","rdseed","rdsspd","rdsspq","rdtsc","rdtscp","rep","repe", "repne","repnz","repz","ret","rol","ror","rorx","roundpd","roundps","roundsd", - "roundss","rsm","rsqrtps","rsqrtss","rstorssp","sahf","sal","sar","sarx","saveprevssp", + "roundss","rsm","rsqrtps","rsqrtss","rstorssp","sahf","sal","salb","salw","sall","salq","sar","sarb","sarw","sarl","sarq","sarx","saveprevssp", "sbb","scas","scasb","scasd","scasw","serialize","setssbsy","seta","setae","setb", "setbe","setc","sete","setg","setge","setl","setle","setna","setnae","setnb", "setnbe","setnc","setne","setng","setnge","setnl","setnle","setno","setnp","setns", @@ -186,7 +188,7 @@ const QSet ASMSyntaxer::Instructions { "vrsqrt14sd","vrsqrt14ss","vscalefpd","vscalefps","vscalefsd","vscalefss","vscatterdpd","vscatterdps","vscatterqpd","vscatterqps", "vshuff32x4","vshuff64x2","vshufi32x4","vshufi64x2","vtestpd","vtestps","vzeroall","vzeroupper","wait","wbinvd", "wbnoinvd","wrfsbase","wrgsbase","wrmsr","wrpkru","wrssd","wrssq","wrussd","wrussq","xabort", - "xacquire","xadd","xbegin","xchg","xend","xgetbv","xlat","xlatb","xor","xorpd", + "xacquire","xadd","xbegin","xchg","xend","xgetbv","xlat","xlatb","xor","xorb","xorw","xorl","xorq","xorpd", "xorps","xrelease","xrstor","xrstors","xsave","xsavec","xsaveopt","xsaves","xsetbv","xtest", }; @@ -209,7 +211,7 @@ const QSet ASMSyntaxer::ATTDirectives { ".fail",".file",".fill", ".float", ".func",".global",".gnu",".hidden", ".hword",".ident",".if", ".incbin", - ".inclue", ".int", ".internal", ".irp", + ".inclue", ".int", ".internal", ".intel_syntax",".irp", ".irpc",".lcomm",".lflags",".line",".linkonce", ".list", ".ln", ".loc",".local",".macro", ".mri",".noaltmacro",".nolist",".nop",".nops", @@ -217,6 +219,8 @@ const QSet ASMSyntaxer::ATTDirectives { ".previous",".print",".protected",".psize", ".purgem",".pushsection",".quad",".reloc", ".rept", ".sbttl", ".scl", ".section", + ".seh_pushreg",".seh_setframe", + ".seh_stackalloc",".seh_endprologue", ".set", ".short", ".single", ".size", ".skip", ".sleb128", ".space_size", ".stabd", ".stabn", ".stabs", ".string", ".string8", ".string16",