Line data Source code
1 : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 : * vim: set ts=8 sts=4 et sw=4 tw=99:
3 : * This Source Code Form is subject to the terms of the Mozilla Public
4 : * License, v. 2.0. If a copy of the MPL was not distributed with this
5 : * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 :
7 : #include "jit/x86-shared/AssemblerBuffer-x86-shared.h"
8 :
9 : #include "mozilla/Sprintf.h"
10 :
11 : #include "jsopcode.h"
12 :
13 : #ifdef JS_JITSPEW
14 : void
15 0 : js::jit::GenericAssembler::spew(const char* fmt, va_list va)
16 : {
17 : // Buffer to hold the formatted string. Note that this may contain
18 : // '%' characters, so do not pass it directly to printf functions.
19 : char buf[200];
20 :
21 0 : int i = VsprintfLiteral(buf, fmt, va);
22 0 : if (i > -1) {
23 0 : if (printer)
24 0 : printer->printf("%s\n", buf);
25 0 : js::jit::JitSpew(js::jit::JitSpew_Codegen, "%s", buf);
26 : }
27 0 : }
28 : #endif
|