nickdesaulniers updated this revision to Diff 498159. nickdesaulniers added a comment.
- final rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143205/new/ https://reviews.llvm.org/D143205 Files: clang/docs/LanguageExtensions.rst clang/include/clang/Basic/Features.def clang/test/Parser/asm-goto.c Index: clang/test/Parser/asm-goto.c =================================================================== --- clang/test/Parser/asm-goto.c +++ clang/test/Parser/asm-goto.c @@ -7,6 +7,9 @@ #if !__has_extension(gnu_asm_goto_with_outputs) #error Extension 'gnu_asm_goto_with_outputs' should be available by default #endif +#if !__has_extension(gnu_asm_goto_with_outputs_full) +#error Extension 'gnu_asm_goto_with_outputs_full' should be available by default +#endif int a, b, c, d, e, f, g, h, i, j, k, l; Index: clang/include/clang/Basic/Features.def =================================================================== --- clang/include/clang/Basic/Features.def +++ clang/include/clang/Basic/Features.def @@ -268,6 +268,7 @@ EXTENSION(statement_attributes_with_gnu_syntax, true) EXTENSION(gnu_asm, LangOpts.GNUAsm) EXTENSION(gnu_asm_goto_with_outputs, LangOpts.GNUAsm) +EXTENSION(gnu_asm_goto_with_outputs_full, LangOpts.GNUAsm) EXTENSION(matrix_types, LangOpts.MatrixTypes) EXTENSION(matrix_types_scalar_division, true) EXTENSION(cxx_attributes_on_using_declarations, LangOpts.CPlusPlus11) Index: clang/docs/LanguageExtensions.rst =================================================================== --- clang/docs/LanguageExtensions.rst +++ clang/docs/LanguageExtensions.rst @@ -1591,6 +1591,12 @@ Outputs may be used along any branches from the ``asm goto`` whether the branches are taken or not. +Query for this feature with ``__has_extension(gnu_asm_goto_with_outputs)``. + +Prior to clang-16, the output may only be used safely when the indirect +branches are not taken. Query for this difference with +``__has_extension(gnu_asm_goto_with_outputs_full)``. + When using tied-outputs (i.e. outputs that are inputs and outputs, not just outputs) with the `+r` constraint, there is a hidden input that's created before the label, so numeric references to operands must account for that. @@ -1618,8 +1624,6 @@ return -1; } -Query for this feature with ``__has_extension(gnu_asm_goto_with_outputs)``. - Objective-C Features ====================
Index: clang/test/Parser/asm-goto.c =================================================================== --- clang/test/Parser/asm-goto.c +++ clang/test/Parser/asm-goto.c @@ -7,6 +7,9 @@ #if !__has_extension(gnu_asm_goto_with_outputs) #error Extension 'gnu_asm_goto_with_outputs' should be available by default #endif +#if !__has_extension(gnu_asm_goto_with_outputs_full) +#error Extension 'gnu_asm_goto_with_outputs_full' should be available by default +#endif int a, b, c, d, e, f, g, h, i, j, k, l; Index: clang/include/clang/Basic/Features.def =================================================================== --- clang/include/clang/Basic/Features.def +++ clang/include/clang/Basic/Features.def @@ -268,6 +268,7 @@ EXTENSION(statement_attributes_with_gnu_syntax, true) EXTENSION(gnu_asm, LangOpts.GNUAsm) EXTENSION(gnu_asm_goto_with_outputs, LangOpts.GNUAsm) +EXTENSION(gnu_asm_goto_with_outputs_full, LangOpts.GNUAsm) EXTENSION(matrix_types, LangOpts.MatrixTypes) EXTENSION(matrix_types_scalar_division, true) EXTENSION(cxx_attributes_on_using_declarations, LangOpts.CPlusPlus11) Index: clang/docs/LanguageExtensions.rst =================================================================== --- clang/docs/LanguageExtensions.rst +++ clang/docs/LanguageExtensions.rst @@ -1591,6 +1591,12 @@ Outputs may be used along any branches from the ``asm goto`` whether the branches are taken or not. +Query for this feature with ``__has_extension(gnu_asm_goto_with_outputs)``. + +Prior to clang-16, the output may only be used safely when the indirect +branches are not taken. Query for this difference with +``__has_extension(gnu_asm_goto_with_outputs_full)``. + When using tied-outputs (i.e. outputs that are inputs and outputs, not just outputs) with the `+r` constraint, there is a hidden input that's created before the label, so numeric references to operands must account for that. @@ -1618,8 +1624,6 @@ return -1; } -Query for this feature with ``__has_extension(gnu_asm_goto_with_outputs)``. - Objective-C Features ====================
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits