diff options
author | davidovski <david@davidovski.xyz> | 2023-02-02 14:10:02 +0000 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2023-02-02 14:10:02 +0000 |
commit | f29d569cd33a73da5ad675f43a34ad53c5cc9bc6 (patch) | |
tree | 76fe6267f8307e7630fc6f53ff99a9767ad40de0 /repo/qt5-qtwebengine/fix-chromium-build.patch | |
parent | 05d004dfe0c9a9d898fac8a4a0292ca2a74ca391 (diff) |
Work
Diffstat (limited to 'repo/qt5-qtwebengine/fix-chromium-build.patch')
-rw-r--r-- | repo/qt5-qtwebengine/fix-chromium-build.patch | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/repo/qt5-qtwebengine/fix-chromium-build.patch b/repo/qt5-qtwebengine/fix-chromium-build.patch deleted file mode 100644 index 8b26238..0000000 --- a/repo/qt5-qtwebengine/fix-chromium-build.patch +++ /dev/null @@ -1,79 +0,0 @@ -diff --git a/src/3rdparty/chromium/v8/src/compiler/backend/arm64/code-generator-arm64.cc b/src/3rdparty/chromium/v8/src/compiler/backend/arm64/code-generator-arm64.cc -index 1c02aa69a..69e5e58de 100644 ---- a/src/3rdparty/chromium/v8/src/compiler/backend/arm64/code-generator-arm64.cc -+++ b/src/3rdparty/chromium/v8/src/compiler/backend/arm64/code-generator-arm64.cc -@@ -375,6 +375,74 @@ Condition FlagsConditionToCondition(FlagsCondition condition) { - UNREACHABLE(); - } - -+class WasmOutOfLineTrap : public OutOfLineCode { -+ public: -+ WasmOutOfLineTrap(CodeGenerator* gen, Instruction* instr) -+ : OutOfLineCode(gen), gen_(gen), instr_(instr) {} -+ void Generate() override { -+ Arm64OperandConverter i(gen_, instr_); -+ TrapId trap_id = -+ static_cast<TrapId>(i.InputInt32(instr_->InputCount() - 1)); -+ GenerateCallToTrap(trap_id); -+ } -+ -+ protected: -+ CodeGenerator* gen_; -+ -+ void GenerateWithTrapId(TrapId trap_id) { GenerateCallToTrap(trap_id); } -+ -+ private: -+ void GenerateCallToTrap(TrapId trap_id) { -+ if (trap_id == TrapId::kInvalid) { -+ // We cannot test calls to the runtime in cctest/test-run-wasm. -+ // Therefore we emit a call to C here instead of a call to the runtime. -+ __ CallCFunction(ExternalReference::wasm_call_trap_callback_for_testing(), -+ 0); -+ __ LeaveFrame(StackFrame::WASM); -+ auto call_descriptor = gen_->linkage()->GetIncomingDescriptor(); -+ int pop_count = static_cast<int>(call_descriptor->StackParameterCount()); -+ pop_count += (pop_count & 1); // align -+ __ Drop(pop_count); -+ __ Ret(); -+ } else { -+ gen_->AssembleSourcePosition(instr_); -+ // A direct call to a wasm runtime stub defined in this module. -+ // Just encode the stub index. This will be patched when the code -+ // is added to the native module and copied into wasm code space. -+ __ Call(static_cast<Address>(trap_id), RelocInfo::WASM_STUB_CALL); -+ ReferenceMap* reference_map = -+ gen_->zone()->New<ReferenceMap>(gen_->zone()); -+ gen_->RecordSafepoint(reference_map, Safepoint::kNoLazyDeopt); -+ __ AssertUnreachable(AbortReason::kUnexpectedReturnFromWasmTrap); -+ } -+ } -+ -+ Instruction* instr_; -+}; -+ -+class WasmProtectedInstructionTrap final : public WasmOutOfLineTrap { -+ public: -+ WasmProtectedInstructionTrap(CodeGenerator* gen, int pc, Instruction* instr) -+ : WasmOutOfLineTrap(gen, instr), pc_(pc) {} -+ -+ void Generate() override { -+ gen_->AddProtectedInstructionLanding(pc_, __ pc_offset()); -+ GenerateWithTrapId(TrapId::kTrapMemOutOfBounds); -+ } -+ -+ private: -+ int pc_; -+}; -+ -+void EmitOOLTrapIfNeeded(Zone* zone, CodeGenerator* codegen, -+ InstructionCode opcode, Instruction* instr, int pc) { -+ const MemoryAccessMode access_mode = -+ static_cast<MemoryAccessMode>(MiscField::decode(opcode)); -+ if (access_mode == kMemoryAccessProtected) { -+ zone->New<WasmProtectedInstructionTrap>(codegen, pc, instr); -+ } -+} -+ - void EmitWordLoadPoisoningIfNeeded(CodeGenerator* codegen, - InstructionCode opcode, Instruction* instr, - Arm64OperandConverter const& i) { |