Skip to content

Commit fccfcbf

Browse files
Auto-generate files after cl/900787189
1 parent e59627f commit fccfcbf

4 files changed

Lines changed: 12 additions & 64 deletions

File tree

php/ext/google/protobuf/php-upb.c

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -448,21 +448,8 @@ Error, UINTPTR_MAX is undefined
448448
#define UPB_ARM64_BTI_DEFAULT 0
449449
#endif
450450

451-
/* This check is not fully robust: it does not require that we have "musttail"
452-
* support available. We need tail calls to avoid consuming arbitrary amounts
453-
* of stack space.
454-
*
455-
* GCC/Clang can mostly be trusted to generate tail calls as long as
456-
* optimization is enabled, but, debug builds will not generate tail calls
457-
* unless "musttail" is available.
458-
*
459-
* We should probably either:
460-
* 1. require that the compiler supports musttail.
461-
* 2. add some fallback code for when musttail isn't available (ie. return
462-
* instead of tail calling). This is safe and portable, but this comes at
463-
* a CPU cost.
464-
*/
465-
#if (defined(__x86_64__) || defined(__aarch64__)) && defined(__GNUC__)
451+
#if (defined(__x86_64__) || defined(__aarch64__)) && \
452+
UPB_HAS_ATTRIBUTE(preserve_none) && UPB_HAS_ATTRIBUTE(musttail)
466453
#define UPB_FASTTABLE_SUPPORTED 1
467454
#else
468455
#define UPB_FASTTABLE_SUPPORTED 0
@@ -473,7 +460,7 @@ Error, UINTPTR_MAX is undefined
473460
* for example for testing or benchmarking. */
474461
#if defined(UPB_ENABLE_FASTTABLE)
475462
#if !UPB_FASTTABLE_SUPPORTED
476-
#error fasttable is x86-64/ARM64 only and requires GCC or Clang.
463+
#error fasttable is x86-64/ARM64 only and requires preserve_none and musttail.
477464
#endif
478465
#define UPB_FASTTABLE 1
479466
/* Define UPB_TRY_ENABLE_FASTTABLE to use fasttable if possible.

php/ext/google/protobuf/php-upb.h

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -447,21 +447,8 @@ Error, UINTPTR_MAX is undefined
447447
#define UPB_ARM64_BTI_DEFAULT 0
448448
#endif
449449

450-
/* This check is not fully robust: it does not require that we have "musttail"
451-
* support available. We need tail calls to avoid consuming arbitrary amounts
452-
* of stack space.
453-
*
454-
* GCC/Clang can mostly be trusted to generate tail calls as long as
455-
* optimization is enabled, but, debug builds will not generate tail calls
456-
* unless "musttail" is available.
457-
*
458-
* We should probably either:
459-
* 1. require that the compiler supports musttail.
460-
* 2. add some fallback code for when musttail isn't available (ie. return
461-
* instead of tail calling). This is safe and portable, but this comes at
462-
* a CPU cost.
463-
*/
464-
#if (defined(__x86_64__) || defined(__aarch64__)) && defined(__GNUC__)
450+
#if (defined(__x86_64__) || defined(__aarch64__)) && \
451+
UPB_HAS_ATTRIBUTE(preserve_none) && UPB_HAS_ATTRIBUTE(musttail)
465452
#define UPB_FASTTABLE_SUPPORTED 1
466453
#else
467454
#define UPB_FASTTABLE_SUPPORTED 0
@@ -472,7 +459,7 @@ Error, UINTPTR_MAX is undefined
472459
* for example for testing or benchmarking. */
473460
#if defined(UPB_ENABLE_FASTTABLE)
474461
#if !UPB_FASTTABLE_SUPPORTED
475-
#error fasttable is x86-64/ARM64 only and requires GCC or Clang.
462+
#error fasttable is x86-64/ARM64 only and requires preserve_none and musttail.
476463
#endif
477464
#define UPB_FASTTABLE 1
478465
/* Define UPB_TRY_ENABLE_FASTTABLE to use fasttable if possible.

ruby/ext/google/protobuf_c/ruby-upb.c

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -448,21 +448,8 @@ Error, UINTPTR_MAX is undefined
448448
#define UPB_ARM64_BTI_DEFAULT 0
449449
#endif
450450

451-
/* This check is not fully robust: it does not require that we have "musttail"
452-
* support available. We need tail calls to avoid consuming arbitrary amounts
453-
* of stack space.
454-
*
455-
* GCC/Clang can mostly be trusted to generate tail calls as long as
456-
* optimization is enabled, but, debug builds will not generate tail calls
457-
* unless "musttail" is available.
458-
*
459-
* We should probably either:
460-
* 1. require that the compiler supports musttail.
461-
* 2. add some fallback code for when musttail isn't available (ie. return
462-
* instead of tail calling). This is safe and portable, but this comes at
463-
* a CPU cost.
464-
*/
465-
#if (defined(__x86_64__) || defined(__aarch64__)) && defined(__GNUC__)
451+
#if (defined(__x86_64__) || defined(__aarch64__)) && \
452+
UPB_HAS_ATTRIBUTE(preserve_none) && UPB_HAS_ATTRIBUTE(musttail)
466453
#define UPB_FASTTABLE_SUPPORTED 1
467454
#else
468455
#define UPB_FASTTABLE_SUPPORTED 0
@@ -473,7 +460,7 @@ Error, UINTPTR_MAX is undefined
473460
* for example for testing or benchmarking. */
474461
#if defined(UPB_ENABLE_FASTTABLE)
475462
#if !UPB_FASTTABLE_SUPPORTED
476-
#error fasttable is x86-64/ARM64 only and requires GCC or Clang.
463+
#error fasttable is x86-64/ARM64 only and requires preserve_none and musttail.
477464
#endif
478465
#define UPB_FASTTABLE 1
479466
/* Define UPB_TRY_ENABLE_FASTTABLE to use fasttable if possible.

ruby/ext/google/protobuf_c/ruby-upb.h

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -447,21 +447,8 @@ Error, UINTPTR_MAX is undefined
447447
#define UPB_ARM64_BTI_DEFAULT 0
448448
#endif
449449

450-
/* This check is not fully robust: it does not require that we have "musttail"
451-
* support available. We need tail calls to avoid consuming arbitrary amounts
452-
* of stack space.
453-
*
454-
* GCC/Clang can mostly be trusted to generate tail calls as long as
455-
* optimization is enabled, but, debug builds will not generate tail calls
456-
* unless "musttail" is available.
457-
*
458-
* We should probably either:
459-
* 1. require that the compiler supports musttail.
460-
* 2. add some fallback code for when musttail isn't available (ie. return
461-
* instead of tail calling). This is safe and portable, but this comes at
462-
* a CPU cost.
463-
*/
464-
#if (defined(__x86_64__) || defined(__aarch64__)) && defined(__GNUC__)
450+
#if (defined(__x86_64__) || defined(__aarch64__)) && \
451+
UPB_HAS_ATTRIBUTE(preserve_none) && UPB_HAS_ATTRIBUTE(musttail)
465452
#define UPB_FASTTABLE_SUPPORTED 1
466453
#else
467454
#define UPB_FASTTABLE_SUPPORTED 0
@@ -472,7 +459,7 @@ Error, UINTPTR_MAX is undefined
472459
* for example for testing or benchmarking. */
473460
#if defined(UPB_ENABLE_FASTTABLE)
474461
#if !UPB_FASTTABLE_SUPPORTED
475-
#error fasttable is x86-64/ARM64 only and requires GCC or Clang.
462+
#error fasttable is x86-64/ARM64 only and requires preserve_none and musttail.
476463
#endif
477464
#define UPB_FASTTABLE 1
478465
/* Define UPB_TRY_ENABLE_FASTTABLE to use fasttable if possible.

0 commit comments

Comments
 (0)