aboutsummaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
authorRolf Eike Beer <eb@emlix.com>2019-11-15 14:53:26 +0100
committerRolf Eike Beer <eb@emlix.com>2019-12-12 11:38:13 +0100
commitfeb519d1b3705f3ee68047fe09396758e40ff549 (patch)
tree8977e20585d06f85b4d28d4e338ccea529ee81ca /src/3rdparty
parentca206bceaff3667469986402e6143bf4c666b228 (diff)
make LinkBufferBase::finalizeCodeWithDisassembly() less generic
It is actually called from only one place, so adapt it to what that caller really needs, removing more excessive newlines. Change-Id: Ieb1a24ddb911d86af1f862e35e4fdd7ad2d9ff13 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/masm/assembler/LinkBuffer.h28
1 files changed, 12 insertions, 16 deletions
diff --git a/src/3rdparty/masm/assembler/LinkBuffer.h b/src/3rdparty/masm/assembler/LinkBuffer.h
index 632d1fdbc4..ba57564a1d 100644
--- a/src/3rdparty/masm/assembler/LinkBuffer.h
+++ b/src/3rdparty/masm/assembler/LinkBuffer.h
@@ -209,9 +209,9 @@ public:
// complete generation of the code. Alternatively, call
// finalizeCodeWithoutDisassembly() directly if you have your own way of
// displaying disassembly.
-
+
inline CodeRef finalizeCodeWithoutDisassembly();
- inline CodeRef finalizeCodeWithDisassembly(const char *jitKind, const char* format, ...) WTF_ATTRIBUTE_PRINTF(3, 4);
+ inline CodeRef finalizeCodeWithDisassembly(const char *jitKind, const char* func);
CodePtr trampolineAt(Label label)
{
@@ -267,9 +267,9 @@ protected:
#endif
};
-#define FINALIZE_CODE_IF(condition, linkBufferReference, jitKind, dataLogFArgumentsForHeading) \
+#define FINALIZE_CODE_IF(condition, linkBufferReference, jitKind, func) \
(UNLIKELY((condition)) \
- ? ((linkBufferReference).finalizeCodeWithDisassembly (jitKind, dataLogFArgumentsForHeading)) \
+ ? ((linkBufferReference).finalizeCodeWithDisassembly (jitKind, func)) \
: (linkBufferReference).finalizeCodeWithoutDisassembly())
// Use this to finalize code, like so:
@@ -288,11 +288,11 @@ protected:
// Note that the dataLogFArgumentsForHeading are only evaluated when showDisassembly
// is true, so you can hide expensive disassembly-only computations inside there.
-#define FINALIZE_CODE(linkBufferReference, jitKind, dataLogFArgumentsForHeading) \
- FINALIZE_CODE_IF(Options::showDisassembly(), linkBufferReference, jitKind, dataLogFArgumentsForHeading)
+#define FINALIZE_CODE(linkBufferReference, jitKind, func) \
+ FINALIZE_CODE_IF(Options::showDisassembly(), linkBufferReference, jitKind, func)
-#define FINALIZE_DFG_CODE(linkBufferReference, jitKind, dataLogFArgumentsForHeading) \
- FINALIZE_CODE_IF((Options::showDisassembly() || Options::showDFGDisassembly()), linkBufferReference, jitKind, dataLogFArgumentsForHeading)
+#define FINALIZE_DFG_CODE(linkBufferReference, jitKind, func) \
+ FINALIZE_CODE_IF((Options::showDisassembly() || Options::showDFGDisassembly()), linkBufferReference, jitKind, func)
template <typename MacroAssembler, template <typename T> class ExecutableOffsetCalculator>
@@ -304,23 +304,19 @@ inline typename LinkBufferBase<MacroAssembler, ExecutableOffsetCalculator>::Code
}
template <typename MacroAssembler, template <typename T> class ExecutableOffsetCalculator>
-inline typename LinkBufferBase<MacroAssembler, ExecutableOffsetCalculator>::CodeRef LinkBufferBase<MacroAssembler, ExecutableOffsetCalculator>::finalizeCodeWithDisassembly(const char *jitKind, const char* format, ...)
+inline typename LinkBufferBase<MacroAssembler, ExecutableOffsetCalculator>::CodeRef LinkBufferBase<MacroAssembler, ExecutableOffsetCalculator>::finalizeCodeWithDisassembly(const char *jitKind, const char* func)
{
ASSERT(Options::showDisassembly() || Options::showDFGDisassembly());
CodeRef result = finalizeCodeWithoutDisassembly();
- dataLogF("Generated %s code for ", jitKind);
- va_list argList;
- va_start(argList, format);
- WTF::dataLogFV(format, argList);
- va_end(argList);
+ dataLogF("Generated %s code for function %s:", jitKind, func);
dataLogF(
#if OS(WINDOWS)
- ": Code at [0x%p, 0x%p):",
+ " Code at [0x%p, 0x%p):",
#else
- ": Code at [%p, %p):",
+ " Code at [%p, %p):",
#endif
result.code().executableAddress(), static_cast<char*>(result.code().executableAddress()) + result.size());
disassemble(result.code(), m_size, " ", WTF::dataFile());