[PATCH] D91410: [llvm][clang][mlir] Add checks for the return values from Target::createXXX to prevent protential null deref

2020-11-17 Thread Eric Astor via Phabricator via cfe-commits
epastor added a comment. LGTM for llvm-ml. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91410/new/ https://reviews.llvm.org/D91410 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[PATCH] D90441: [X86] Add support for vex, vex2, vex3, and evex for MASM

2020-11-04 Thread Eric Astor via Phabricator via cfe-commits
epastor added inline comments. Comment at: llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp:2851 +// Parse MASM style pseudo prefixes. +// FIXME: This prefix should only be used for MASM, not for intel-syntax. +if (isParsingIntelSyntax()) { LiuChen3 wro

[PATCH] D90441: [X86] Add support for vex, vex2, vex3, and evex for MASM

2020-10-30 Thread Eric Astor via Phabricator via cfe-commits
epastor added inline comments. Comment at: clang/test/CodeGen/X86/ms-inline-asm-prefix.c:1 +// RUN:%clang_cc1 %s -ferror-limit 0 -triple=x86_64-pc-widows-msvc -target-feature +avx512f -target-feature +avx2 -target-feature +avx512vl -fasm-blocks -mllvm -x86-asm-syntax=intel -S -

[PATCH] D75198: [ms] Rename ParsingInlineAsm functions/variables to reflect MS-specificity.

2020-02-26 Thread Eric Astor via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG85b641c27aec: [ms] Rename ParsingInlineAsm functions/variables to reflect MS-specificity. (authored by epastor). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D75198: [ms] Rename ParsingInlineAsm functions/variables to reflect MS-specificity.

2020-02-26 Thread Eric Astor via Phabricator via cfe-commits
epastor created this revision. Herald added subscribers: llvm-commits, cfe-commits, hiraditya. Herald added projects: clang, LLVM. epastor added a child revision: D73227: [ms] [llvm-ml] Use default RIP-relative addressing for x64 MASM.. ParsingInlineAsm was a misleading name. These values are onl

[PATCH] D72417: [ms] [X86] Use "P" modifier on all branch-target operands in inline X86 assembly.

2020-01-09 Thread Eric Astor via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1c545f6dbcbb: [ms] [X86] Use "P" modifier on all branch-target operands in inline X86… (authored by epastor). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D7

[PATCH] D72417: [ms] [X86] Use "P" modifier on all branch-target operands in inline X86 assembly.

2020-01-08 Thread Eric Astor via Phabricator via cfe-commits
epastor created this revision. Herald added subscribers: llvm-commits, cfe-commits, hiraditya. Herald added projects: clang, LLVM. Extend llvm.org/D71677 to apply to all branch-target operands, rather than special-casing call instructions. Also add a regression

[PATCH] D71436: [X86][AsmParser] re-introduce 'offset' operator

2019-12-30 Thread Eric Astor via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4a7aa252a32a: [X86][AsmParser] re-introduce 'offset' operator (authored by epastor). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71436/new/ https://review

[PATCH] D71436: [X86][AsmParser] re-introduce 'offset' operator

2019-12-30 Thread Eric Astor via Phabricator via cfe-commits
epastor updated this revision to Diff 235620. epastor added a comment. - The three-argument version of find_if is std::find_if, and the qualification is required. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71436/new/ https://reviews.llvm.org/D7

[PATCH] D71436: [X86][AsmParser] re-introduce 'offset' operator

2019-12-30 Thread Eric Astor via Phabricator via cfe-commits
epastor updated this revision to Diff 235619. epastor marked 5 inline comments as done. epastor added a comment. - Fix a few final issues. - Pack the AsmRewrite struct more optimally. - Only check if we can fuse rewrites with ones we haven't already reached! Repository: rG LLVM Github Mono

[PATCH] D71436: [X86][AsmParser] re-introduce 'offset' operator

2019-12-30 Thread Eric Astor via Phabricator via cfe-commits
epastor added inline comments. Comment at: llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp:1821 +getParser().parsePrimaryExpr(Val, End)) + return Error(Start, "unexpected token!"); + } else if (ParseIntelInlineAsmIdentifier(Val, ID, Info, false, End, true)) { ---

[PATCH] D71436: [X86][AsmParser] re-introduce 'offset' operator

2019-12-30 Thread Eric Astor via Phabricator via cfe-commits
epastor updated this revision to Diff 235617. epastor added a comment. Rebase on top of HEAD - Add compatibility with dc5b614fa9a1 (which changed handling for call operands in x86 assembly) - Remove another artifact of local

[PATCH] D71677: [ms] [X86] Use "P" modifier on operands to call instructions in inline X86 assembly.

2019-12-22 Thread Eric Astor via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdc5b614fa9a1: [ms] [X86] Use "P" modifier on operands to call instructions in inline X86… (authored by epastor). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D71677: [ms] [X86] Use "P" modifier on operands to call instructions in inline X86 assembly.

2019-12-21 Thread Eric Astor via Phabricator via cfe-commits
epastor updated this revision to Diff 235035. epastor marked an inline comment as done. epastor added a comment. Fix test; missing anchor meant the previous version would not catch a regression. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71677/n

[PATCH] D71677: [ms] [X86] Use "P" modifier on operands to call instructions in inline X86 assembly.

2019-12-21 Thread Eric Astor via Phabricator via cfe-commits
epastor marked 2 inline comments as done. epastor added inline comments. Comment at: llvm/test/CodeGen/X86/ms-inline-asm-PR44272.ll:15 +; CHECK: {{## InlineAsm Start|#APP}} +; CHECK: call{{l|q}} func +; CHECK: {{## InlineAsm End|#NO_APP}} rnk wrote: > I'd suggest

[PATCH] D71677: [ms] [X86] Use "P" modifier on operands to call instructions in inline X86 assembly.

2019-12-18 Thread Eric Astor via Phabricator via cfe-commits
epastor added a comment. In D71677#1790458 , @rnk wrote: > Where is {0:P} actually documented? I don't see it in LangRef, but I do see > it in the code. https://llvm.org/docs/LangRef.html#asm-template-argument-modifiers, under X86; specifically documen

[PATCH] D71677: Summary:Use "P" modifier on operands to call instructions in inline X86 assembly.

2019-12-18 Thread Eric Astor via Phabricator via cfe-commits
epastor created this revision. epastor added a reviewer: rnk. Herald added subscribers: llvm-commits, cfe-commits, hiraditya. Herald added projects: clang, LLVM. This is documented as the appropriate template modifier for call operands. Fixes PR44272, and adds a regression test. Also adds support

[PATCH] D71436: [X86][AsmParser] re-introduce 'offset' operator

2019-12-18 Thread Eric Astor via Phabricator via cfe-commits
epastor added inline comments. Comment at: llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp:1821 +getParser().parsePrimaryExpr(Val, End)) + return Error(Start, "unexpected token!"); + } else if (ParseIntelInlineAsmIdentifier(Val, ID, Info, false, End, true)) { ---

[PATCH] D71436: [X86][AsmParser] re-introduce 'offset' operator

2019-12-18 Thread Eric Astor via Phabricator via cfe-commits
epastor updated this revision to Diff 234567. epastor added a comment. - Removing accidental artifacts of local testing... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71436/new/ https://reviews.llvm.org/D71436 Files: clang/lib/Sema/SemaStmtAsm

[PATCH] D71436: [X86][AsmParser] re-introduce 'offset' operator

2019-12-18 Thread Eric Astor via Phabricator via cfe-commits
epastor updated this revision to Diff 234566. epastor marked 2 inline comments as done. epastor added a comment. Fix issues around enum values and labels - Only rewrite variables as offset operands; fixes crash due to conflicting rewrites for labels - Recognize inline assembly references to enum

[PATCH] D71436: [X86][AsmParser] re-introduce 'offset' operator

2019-12-17 Thread Eric Astor via Phabricator via cfe-commits
epastor added a comment. Thanks for feedback! Comment at: clang/test/CodeGen/ms-inline-asm-64.c:18 // CHECK: call void asm sideeffect inteldialect -// CHECK-SAME: mov [eax], $0 +// CHECK-SAME: mov qword ptr [eax], $0 // CHECK-SAME: "r,~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}}

[PATCH] D71436: [X86][AsmParser] re-introduce 'offset' operator

2019-12-17 Thread Eric Astor via Phabricator via cfe-commits
epastor updated this revision to Diff 234371. epastor marked 6 inline comments as done. epastor added a comment. - Address refactoring comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71436/new/ https://reviews.llvm.org/D71436 Files: clang

[PATCH] D71436: [X86][AsmParser] re-introduce 'offset' operator

2019-12-16 Thread Eric Astor via Phabricator via cfe-commits
epastor updated this revision to Diff 234067. epastor added a comment. - Apply formatting fixes where reasonable Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71436/new/ https://reviews.llvm.org/D71436 Files: clang/test/CodeGen/ms-inline-asm-64.

[PATCH] D71436: [X86][AsmParser] re-introduce 'offset' operator

2019-12-13 Thread Eric Astor via Phabricator via cfe-commits
epastor updated this revision to Diff 233813. epastor added a comment. - Respect correct usage of offset. - Don't assume implicit sizing on offset. - Check that offset works in compound expressions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D7143

[PATCH] D71436: [X86][AsmParser] re-introduce 'offset' operator

2019-12-13 Thread Eric Astor via Phabricator via cfe-commits
epastor updated this revision to Diff 233806. epastor added a comment. - Fix Intel named operator parsing Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71436/new/ https://reviews.llvm.org/D71436 Files: clang/test/CodeGen/ms-inline-asm.c clang/

[PATCH] D71436: [X86][AsmParser] re-introduce 'offset' operator

2019-12-13 Thread Eric Astor via Phabricator via cfe-commits
epastor updated this revision to Diff 233786. epastor added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. - Fix tests expecting use of 'r' constraints for offset operands Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D69626: Fix Microsoft compatibility handling of commas in nested macro expansions.

2019-11-04 Thread Eric Astor via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbe6ac471f613: [ms] Fix Microsoft compatibility handling of commas in nested macro expansions. (authored by epastor). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D69626: Fix Microsoft compatibility handling of commas in nested macro expansions.

2019-10-31 Thread Eric Astor via Phabricator via cfe-commits
epastor added a comment. Thanks, Reid; I'm not 100% sure I've checked all the corner cases either, but this at least seems like a step forward. As a reminder: I don't have commit access. Could someone else commit this for me? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D69626: Fix Microsoft compatibility handling of commas in nested macro expansions.

2019-10-30 Thread Eric Astor via Phabricator via cfe-commits
epastor added a comment. In D69626#1728113 , @thakis wrote: > Is this needed to parse system headers? Interesting question. This change isn't - but I presume the (pre-existing) introduction of IgnoredComma was. > In general, we try to emulate only wart

[PATCH] D69626: Fix Microsoft compatibility handling of commas in nested macro expansions.

2019-10-30 Thread Eric Astor via Phabricator via cfe-commits
epastor created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. epastor added reviewers: rnk, thakis. In Microsoft-compatibility mode, single commas from nested macro expansions should not be considered as argument separators; we emulate this by marking them t

[PATCH] D67202: Implement Microsoft-compatible mangling for decomposition declarations.

2019-09-05 Thread Eric Astor via Phabricator via cfe-commits
epastor added a comment. The change passes ninja check-clang - and I've added a test per your suggestions. Thanks! As for llvm-undname: it works reasonably well, but these are anonymous names. It successfully recognizes $S1, etc. as the "name", though! Repository: rG LLVM Github Monorepo C

[PATCH] D67202: Implement Microsoft-compatible mangling for decomposition declarations.

2019-09-05 Thread Eric Astor via Phabricator via cfe-commits
epastor updated this revision to Diff 218934. epastor added a comment. - Add testing for the new deprecation declarations mangling Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67202/new/ https://reviews.llvm.org/D67202 Files: clang/include/clan

[PATCH] D67202: Implement Microsoft-compatible mangling for decomposition declarations.

2019-09-04 Thread Eric Astor via Phabricator via cfe-commits
epastor created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Match cl.exe's mangling for decomposition declarations. Decomposition declarations are considered to be anonymous structs, and use the same convention as for anonymous struct/union declarations.