29.0.1 fails with the following errors when compiling o/js/src/jit/Unified_cpp_js_src_jit14.cpp
Code: Select all
In file included from /var/tmp/portage/www-client/palemoon-29.0.1/work/palemoon-29.0.1/platform/js/src/jit/x64/BaseAssembler-x64.h:9,
from /var/tmp/portage/www-client/palemoon-29.0.1/work/palemoon-29.0.1/platform/js/src/jit/x86-shared/Assembler-x86-shared.h:16,
from /var/tmp/portage/www-client/palemoon-29.0.1/work/palemoon-29.0.1/platform/js/src/jit/x64/Assembler-x64.h:247,
from /var/tmp/portage/www-client/palemoon-29.0.1/work/palemoon-29.0.1/platform/js/src/jit/x86-shared/MacroAssembler-x86-shared.h:14,
from /var/tmp/portage/www-client/palemoon-29.0.1/work/palemoon-29.0.1/platform/js/src/jit/x64/MacroAssembler-x64.h:11,
from /var/tmp/portage/www-client/palemoon-29.0.1/work/palemoon-29.0.1/platform/js/src/jit/MacroAssembler.h:17,
from /var/tmp/portage/www-client/palemoon-29.0.1/work/palemoon-29.0.1/platform/js/src/jit/BaselineJIT.h:17,
from /var/tmp/portage/www-client/palemoon-29.0.1/work/palemoon-29.0.1/platform/js/src/jit/BaselineIC.h:19,
from /var/tmp/portage/www-client/palemoon-29.0.1/work/palemoon-29.0.1/platform/js/src/jit/MIR.h:20,
from /var/tmp/portage/www-client/palemoon-29.0.1/work/palemoon-29.0.1/platform/js/src/jit/LIR.h:19,
from /var/tmp/portage/www-client/palemoon-29.0.1/work/palemoon-29.0.1/platform/js/src/jit/shared/Lowering-shared.h:12,
from /var/tmp/portage/www-client/palemoon-29.0.1/work/palemoon-29.0.1/platform/js/src/jit/x86-shared/Lowering-x86-shared.h:9,
from /var/tmp/portage/www-client/palemoon-29.0.1/work/palemoon-29.0.1/platform/js/src/jit/x86-shared/Lowering-x86-shared.cpp:6,
from /var/tmp/portage/www-client/palemoon-29.0.1/work/palemoon-29.0.1/o/js/src/jit/Unified_cpp_js_src_jit14.cpp:2:
In member function ‘void js::jit::X86Encoding::BaseAssembler::twoByteOpSimd(const char*, js::jit::X86Encoding::VexOperandType, js::jit::X86Encoding::TwoByteOpcodeID, int32_t, js::jit::X86Encoding::RegisterID, js::jit::X86Encoding::XMMRegisterID, js::jit::X86Encoding::XMMRegisterID)’,
inlined from ‘void js::jit::X86Encoding::BaseAssembler::vmovsd_mr(int32_t, js::jit::X86Encoding::RegisterID, js::jit::X86Encoding::XMMRegisterID)’ at /var/tmp/portage/www-client/palemoon-29.0.1/work/palemoon-29.0.1/platform/js/src/jit/x86-shared/BaseAssembler-x86-shared.h:3155:22,
inlined from ‘void js::jit::AssemblerX86Shared::vmovsd(const js::jit::Address&, js::jit::FloatRegister)’ at /var/tmp/portage/www-client/palemoon-29.0.1/work/palemoon-29.0.1/platform/js/src/jit/x86-shared/Assembler-x86-shared.h:614:23,
inlined from ‘void js::jit::Assembler::pop(js::jit::FloatRegister)’ at /var/tmp/portage/www-client/palemoon-29.0.1/work/palemoon-29.0.1/platform/js/src/jit/x64/Assembler-x64.h:350:15,
inlined from ‘void js::jit::MacroAssembler::Pop(js::jit::FloatRegister)’ at /var/tmp/portage/www-client/palemoon-29.0.1/work/palemoon-29.0.1/platform/js/src/jit/x86-shared/MacroAssembler-x86-shared.cpp:581:8:
/var/tmp/portage/www-client/palemoon-29.0.1/work/palemoon-29.0.1/platform/js/src/jit/x86-shared/BaseAssembler-x86-shared.h:3967:21: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
3967 | spew("%-11s" MEM_ob ", %s", legacySSEOpName(name),
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3968 | ADDR_ob(offset, base), XMMRegName(dst));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In member function ‘void js::jit::X86Encoding::BaseAssembler::twoByteOpSimd(const char*, js::jit::X86Encoding::VexOperandType, js::jit::X86Encoding::TwoByteOpcodeID, int32_t, js::jit::X86Encoding::RegisterID, js::jit::X86Encoding::XMMRegisterID, js::jit::X86Encoding::XMMRegisterID)’,
inlined from ‘void js::jit::X86Encoding::BaseAssembler::vmovsd_rm(js::jit::X86Encoding::XMMRegisterID, int32_t, js::jit::X86Encoding::RegisterID)’ at /var/tmp/portage/www-client/palemoon-29.0.1/work/palemoon-29.0.1/platform/js/src/jit/x86-shared/BaseAssembler-x86-shared.h:3110:22,
inlined from ‘void js::jit::AssemblerX86Shared::vmovsd(js::jit::FloatRegister, const js::jit::Address&)’ at /var/tmp/portage/www-client/palemoon-29.0.1/work/palemoon-29.0.1/platform/js/src/jit/x86-shared/Assembler-x86-shared.h:620:23,
inlined from ‘void js::jit::Assembler::push(js::jit::FloatRegister)’ at /var/tmp/portage/www-client/palemoon-29.0.1/work/palemoon-29.0.1/platform/js/src/jit/x64/Assembler-x64.h:341:15,
inlined from ‘void js::jit::MacroAssembler::Push(js::jit::FloatRegister)’ at /var/tmp/portage/www-client/palemoon-29.0.1/work/palemoon-29.0.1/platform/js/src/jit/x86-shared/MacroAssembler-x86-shared.cpp:560:9:
/var/tmp/portage/www-client/palemoon-29.0.1/work/palemoon-29.0.1/platform/js/src/jit/x86-shared/BaseAssembler-x86-shared.h:3964:21: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
3964 | spew("%-11s%s, " MEM_ob, legacySSEOpName(name),
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3965 | XMMRegName(dst), ADDR_ob(offset, base));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: some warnings being treated as errors
The code causing the problem inside the twoByteOpSimd method is
Code: Select all
if (useLegacySSEEncoding(src0, dst)) {
if (IsXMMReversedOperands(opcode)) {
spew("%-11s%s, " MEM_ob, legacySSEOpName(name),
XMMRegName(dst), ADDR_ob(offset, base));
} else {
spew("%-11s" MEM_ob ", %s", legacySSEOpName(name),
ADDR_ob(offset, base), XMMRegName(dst));
}
m_formatter.legacySSEPrefix(ty);
m_formatter.twoByteOp(opcode, offset, base, dst);
return;
}
- useLegacySSEEncoding returns true if src0 == dst (useVEX_ defaults to true so other logic is not used)
- src0 = invalid_xmm when twoByteOpSimd is called by vmovsd_mr therefore gcc can assume for the code path dst = invalid_xmm
- XMMRegName does not provide a value for invalid_xmm therefore no string to spew.
Code: Select all
diff --git a/js/src/jit/x86-shared/Constants-x86-shared.h b/js/src/jit/x86-shared/Constants-x86-shared.h
index e5f1d7cd8..bbae28f2a 100644
--- a/js/src/jit/x86-shared/Constants-x86-shared.h
+++ b/js/src/jit/x86-shared/Constants-x86-shared.h
@@ -43,10 +43,11 @@ enum XMMRegisterID {
inline const char* XMMRegName(XMMRegisterID reg)
{
static const char* const names[] = {
- "%xmm0", "%xmm1", "%xmm2", "%xmm3", "%xmm4", "%xmm5", "%xmm6", "%xmm7"
+ "%xmm0", "%xmm1", "%xmm2", "%xmm3", "%xmm4", "%xmm5", "%xmm6", "%xmm7",
#ifdef JS_CODEGEN_X64
- ,"%xmm8", "%xmm9", "%xmm10", "%xmm11", "%xmm12", "%xmm13", "%xmm14", "%xmm15"
+ "%xmm8", "%xmm9", "%xmm10", "%xmm11", "%xmm12", "%xmm13", "%xmm14", "%xmm15",
#endif
+ "invalid"
};
MOZ_ASSERT(size_t(reg) < mozilla::ArrayLength(names));
return names[reg];
A different way to get rid of the format-overflow warnings/errors is to prevent the problem spews if src0 is invalid_xmm.
Code: Select all
diff --git a/js/src/jit/x86-shared/BaseAssembler-x86-shared.h b/js/src/jit/x86-shared/BaseAssembler-x86-shared.h
index 54b862a56..cea5aff53 100644
--- a/js/src/jit/x86-shared/BaseAssembler-x86-shared.h
+++ b/js/src/jit/x86-shared/BaseAssembler-x86-shared.h
@@ -3959,7 +3959,7 @@ threeByteOpImmSimd("vblendps", VEX_PD, OP3_BLENDPS_VpsWpsIb, ESCAPE_3A, imm, off
void twoByteOpSimd(const char* name, VexOperandType ty, TwoByteOpcodeID opcode,
int32_t offset, RegisterID base, XMMRegisterID src0, XMMRegisterID dst)
{
- if (useLegacySSEEncoding(src0, dst)) {
+ if (src0 != invalid_xmm && useLegacySSEEncoding(src0, dst)) {
if (IsXMMReversedOperands(opcode)) {
spew("%-11s%s, " MEM_ob, legacySSEOpName(name),
XMMRegName(dst), ADDR_ob(offset, base));