diff options
author | trav90 <travawine@palemoon.org> | 2022-04-14 09:14:21 -0500 |
---|---|---|
committer | trav90 <travawine@palemoon.org> | 2022-04-15 08:30:25 -0500 |
commit | 41fc1ccf4dfd91f17cf7cff804589a235a295159 (patch) | |
tree | 76b8434b9cec5b85fe254c4c20005fe1b0b91b4b /js | |
parent | 7abed0e35276b50c01c65501d22890d933b3bc56 (diff) | |
download | uxp-41fc1ccf4dfd91f17cf7cff804589a235a295159.tar.gz |
Issue #1818 - Part 3: Remove more old gcc compiler hacks.
Diffstat (limited to 'js')
-rw-r--r-- | js/src/gc/Heap.h | 4 | ||||
-rw-r--r-- | js/src/jit/Safepoints.cpp | 6 | ||||
-rw-r--r-- | js/src/jit/arm/Architecture-arm.h | 3 | ||||
-rw-r--r-- | js/src/jit/arm/Simulator-arm.cpp | 2 | ||||
-rw-r--r-- | js/src/jit/arm64/vixl/Assembler-vixl.h | 4 | ||||
-rw-r--r-- | js/src/jit/arm64/vixl/MozAssembler-vixl.cpp | 2 | ||||
-rw-r--r-- | js/src/wasm/WasmBaselineCompile.cpp | 4 |
7 files changed, 7 insertions, 18 deletions
diff --git a/js/src/gc/Heap.h b/js/src/gc/Heap.h index 2f27702601..2a10420943 100644 --- a/js/src/gc/Heap.h +++ b/js/src/gc/Heap.h @@ -80,9 +80,7 @@ enum InitialHeap { }; /* The GC allocation kinds. */ -// FIXME: uint8_t would make more sense for the underlying type, but causes -// miscompilations in GCC (fixed in 4.8.5 and 4.9.3). See also bug 1143966. -enum class AllocKind { +enum class AllocKind : uint8_t { FIRST, OBJECT_FIRST = FIRST, FUNCTION = FIRST, diff --git a/js/src/jit/Safepoints.cpp b/js/src/jit/Safepoints.cpp index 9446861a0b..27cb642542 100644 --- a/js/src/jit/Safepoints.cpp +++ b/js/src/jit/Safepoints.cpp @@ -264,11 +264,7 @@ AllocationToPartKind(const LAllocation& a) return Part_Arg; } -// gcc 4.5 doesn't actually inline CanEncodeInfoInHeader when only -// using the "inline" keyword, and miscompiles the function as well -// when doing block reordering with branch prediction information. -// See bug 799295 comment 71. -static MOZ_ALWAYS_INLINE bool +static inline bool CanEncodeInfoInHeader(const LAllocation& a, uint32_t* out) { if (a.isGeneralReg()) { diff --git a/js/src/jit/arm/Architecture-arm.h b/js/src/jit/arm/Architecture-arm.h index d2c634798b..5dbc68a599 100644 --- a/js/src/jit/arm/Architecture-arm.h +++ b/js/src/jit/arm/Architecture-arm.h @@ -13,8 +13,7 @@ #include "js/Utility.h" -// GCC versions 4.6 and above define __ARM_PCS_VFP to denote a hard-float -// ABI target. +// GCC defines __ARM_PCS_VFP to denote a hard-float ABI target. #if defined(__ARM_PCS_VFP) #define JS_CODEGEN_ARM_HARDFP #endif diff --git a/js/src/jit/arm/Simulator-arm.cpp b/js/src/jit/arm/Simulator-arm.cpp index 2b295212a5..5dfdb939a0 100644 --- a/js/src/jit/arm/Simulator-arm.cpp +++ b/js/src/jit/arm/Simulator-arm.cpp @@ -1289,8 +1289,6 @@ int32_t Simulator::get_register(int reg) const { MOZ_ASSERT(reg >= 0 && reg < num_registers); - // Work around GCC bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43949 - if (reg >= num_registers) return 0; return registers_[reg] + ((reg == pc) ? SimInstruction::kPCReadOffset : 0); } diff --git a/js/src/jit/arm64/vixl/Assembler-vixl.h b/js/src/jit/arm64/vixl/Assembler-vixl.h index d209f8b570..175349bf56 100644 --- a/js/src/jit/arm64/vixl/Assembler-vixl.h +++ b/js/src/jit/arm64/vixl/Assembler-vixl.h @@ -4016,11 +4016,9 @@ class Assembler : public MozBaseAssembler { const MemOperand& addr, LoadStoreScalingOption option = PreferScaledOffset); - // TODO(all): The third parameter should be passed by reference but gcc 4.8.2 - // reports a bogus uninitialised warning then. BufferOffset Logical(const Register& rd, const Register& rn, - const Operand operand, + const Operand& operand, LogicalOp op); BufferOffset LogicalImmediate(const Register& rd, const Register& rn, diff --git a/js/src/jit/arm64/vixl/MozAssembler-vixl.cpp b/js/src/jit/arm64/vixl/MozAssembler-vixl.cpp index 3b2e0a8bc6..a9bb8a18d9 100644 --- a/js/src/jit/arm64/vixl/MozAssembler-vixl.cpp +++ b/js/src/jit/arm64/vixl/MozAssembler-vixl.cpp @@ -400,7 +400,7 @@ void Assembler::nop(Instruction* at) { BufferOffset Assembler::Logical(const Register& rd, const Register& rn, - const Operand operand, LogicalOp op) + const Operand& operand, LogicalOp op) { VIXL_ASSERT(rd.size() == rn.size()); if (operand.IsImmediate()) { diff --git a/js/src/wasm/WasmBaselineCompile.cpp b/js/src/wasm/WasmBaselineCompile.cpp index d4849f3d1d..7a905ecbea 100644 --- a/js/src/wasm/WasmBaselineCompile.cpp +++ b/js/src/wasm/WasmBaselineCompile.cpp @@ -387,9 +387,9 @@ class BaseCompiler #endif case NONE: MOZ_CRASH("AnyReg::any() on NONE"); + default: + return AnyRegister(); } - // Work around GCC 5 analysis/warning bug. - MOZ_CRASH("AnyReg::any(): impossible case"); } union { |