From 5ba2022b8e67e28bf7dbd02a7eb5d19ba90aadb7 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 7 Aug 2020 15:41:53 +0200 Subject: UserspaceEmulator: Result is initialized after OR with all-1 immediate When compiling with "-Os", GCC produces the following pattern for atomic decrement (which is used by our RefCounted template): or eax, -1 lock xadd [destination], eax Since or-ing with -1 will always produce the same output (-1), we can mark the result of these operations as initialized. This stops us from complaining about false positives when running the shell in UE. :^) --- DevTools/UserspaceEmulator/SoftCPU.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'DevTools/UserspaceEmulator/SoftCPU.h') diff --git a/DevTools/UserspaceEmulator/SoftCPU.h b/DevTools/UserspaceEmulator/SoftCPU.h index c78eddcaf4..16b3c140a6 100644 --- a/DevTools/UserspaceEmulator/SoftCPU.h +++ b/DevTools/UserspaceEmulator/SoftCPU.h @@ -1048,29 +1048,29 @@ private: virtual void wrap_0xD3_16(const X86::Instruction&) override; virtual void wrap_0xD3_32(const X86::Instruction&) override; - template + template void generic_AL_imm8(Op, const X86::Instruction&); - template + template void generic_AX_imm16(Op, const X86::Instruction&); - template + template void generic_EAX_imm32(Op, const X86::Instruction&); - template + template void generic_RM16_imm16(Op, const X86::Instruction&); - template + template void generic_RM16_imm8(Op, const X86::Instruction&); template void generic_RM16_unsigned_imm8(Op, const X86::Instruction&); template void generic_RM16_reg16(Op, const X86::Instruction&); - template + template void generic_RM32_imm32(Op, const X86::Instruction&); - template + template void generic_RM32_imm8(Op, const X86::Instruction&); template void generic_RM32_unsigned_imm8(Op, const X86::Instruction&); template void generic_RM32_reg32(Op, const X86::Instruction&); - template + template void generic_RM8_imm8(Op, const X86::Instruction&); template void generic_RM8_reg8(Op, const X86::Instruction&); -- cgit v1.2.3