Verified Commit 46dcc975 authored by Rasmus Thomsen's avatar Rasmus Thomsen
Browse files

community/firefox: fix build w/ GCC 10 on aarch64

fixes #12153
parent e3c9cd7c
......@@ -81,6 +81,7 @@ source="https://ftp.mozilla.org/pub/firefox/releases/$pkgver/source/firefox-$pkg
firefox-pipewire-0-3.patch
avoid-redefinition.patch
fix-gcc10-build.patch
"
subpackages="$pkgname-npapi"
......@@ -404,4 +405,5 @@ f963fcdba7307a0b1712dfb95ceba4ab49f449f60e550bb69d15d50272e6df9add90862251ee561e
db26757b2ebf9f567962e32294b4ae48b3a5d0378a7589dfe650fe3a179ff58befbab5082981c68e1c25fb9e56b2db1e4e510d4bca17c3e3aedbf9a2f21806eb sandbox-sched_setscheduler.patch
b7d0a6126bdf6c0569f80aabf5b37ed2c7a35712eb8a0404a2d85381552f5555d4f97d213ea26cec6a45dc2785f22439376ed5f8e78b4fd664ef0223307b333e sandbox-largefile.patch
4fc9187e6ee5a09a70e89c7213e0682615befc1a22ef9fd27ccb2227ad7c720e06a60a55615573451fd6bf38083e2ed293320322797d83becd605e16ede192fb firefox-pipewire-0-3.patch
b1cb2db3122634f66d2bae7066e76f2dcd455c464e021db4de3b0a08314df95cb667846081682db549dd2af8a00831cabe44a2420c66cdfb5e3b5fa7e6bd21d3 avoid-redefinition.patch"
b1cb2db3122634f66d2bae7066e76f2dcd455c464e021db4de3b0a08314df95cb667846081682db549dd2af8a00831cabe44a2420c66cdfb5e3b5fa7e6bd21d3 avoid-redefinition.patch
a8d696ccb649a6f206ce5feec1ec3a265ad5072d259411d9e6058f17a1b62aa8e371de936345e98cf82bcb36def41660046b180d42618b7e9a447cd7e81116aa fix-gcc10-build.patch"
diff --git a/js/src/wasm/WasmBaselineCompile.cpp b/js/src/wasm/WasmBaselineCompile.cpp
--- a/js/src/wasm/WasmBaselineCompile.cpp
+++ b/js/src/wasm/WasmBaselineCompile.cpp
@@ -650,25 +650,26 @@ class BaseRegAlloc {
bool available = !availGPR.empty();
freeGPR(r);
return available;
#endif
}
template <MIRType t>
bool hasFPU() {
- return availFPU.hasAny<RegTypeOf<t>::value>();
- }
-
#ifdef RABALDR_SIDEALLOC_V128
- template <>
- bool hasFPU<MIRType::Simd128>() {
- MOZ_CRASH("Should not happen");
- }
-#endif
+ // Workaround for GCC problem, bug 1677690
+ if constexpr (t == MIRType::Simd128) {
+ MOZ_CRASH("Should not happen");
+ } else
+#endif
+ {
+ return availFPU.hasAny<RegTypeOf<t>::value>();
+ }
+ }
bool isAvailableGPR(Register r) { return availGPR.has(r); }
bool isAvailableFPU(FloatRegister r) {
#ifdef RABALDR_SIDEALLOC_V128
MOZ_ASSERT(!r.isSimd128());
#endif
return availFPU.has(r);
@@ -741,25 +742,26 @@ class BaseRegAlloc {
MOZ_ASSERT(!r.isSimd128());
#endif
MOZ_ASSERT(isAvailableFPU(r));
availFPU.take(r);
}
template <MIRType t>
FloatRegister allocFPU() {
- return availFPU.takeAny<RegTypeOf<t>::value>();
- }
-
#ifdef RABALDR_SIDEALLOC_V128
- template <>
- FloatRegister allocFPU<MIRType::Simd128>() {
- MOZ_CRASH("Should not happen");
- }
-#endif
+ // Workaround for GCC problem, bug 1677690
+ if constexpr (t == MIRType::Simd128) {
+ MOZ_CRASH("Should not happen");
+ } else
+#endif
+ {
+ return availFPU.takeAny<RegTypeOf<t>::value>();
+ }
+ }
void freeGPR(Register r) { availGPR.add(r); }
void freeInt64(Register64 r) {
#ifdef JS_PUNBOX64
freeGPR(r.reg);
#else
freeGPR(r.low);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment