/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// Copyright (c) 1994-2006 Sun Microsystems Inc.
// All Rights Reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// - Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// - Redistribution in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// - Neither the name of Sun Microsystems or the names of contributors may
// be used to endorse or promote products derived from this software without
// specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// The original source code covered by the above license above has been
// modified significantly by Google Inc.
// Copyright 2021 the V8 project authors. All rights reserved.
#ifndef jit_riscv64_Assembler_riscv64_h
#define jit_riscv64_Assembler_riscv64_h
#include "mozilla/Assertions.h"
#include "mozilla/Sprintf.h"
#include <stdint.h>
#include "jit/CompactBuffer.h"
#include "jit/JitCode.h"
#include "jit/JitSpewer.h"
#include "jit/Registers.h"
#include "jit/RegisterSets.h"
#include "jit/riscv64/Architecture-riscv64.h"
#include "jit/riscv64/base/base-assembler-riscv.h"
#include "jit/riscv64/base/base-riscv-i.h"
#include "jit/riscv64/constant/Constant-riscv64.h"
#include "jit/riscv64/extension/extension-riscv-a.h"
#include "jit/riscv64/extension/extension-riscv-b.h"
#include "jit/riscv64/extension/extension-riscv-c.h"
#include "jit/riscv64/extension/extension-riscv-d.h"
#include "jit/riscv64/extension/extension-riscv-f.h"
#include "jit/riscv64/extension/extension-riscv-m.h"
#include "jit/riscv64/extension/extension-riscv-v.h"
#include "jit/riscv64/extension/extension-riscv-zfa.h"
#include "jit/riscv64/extension/extension-riscv-zfh.h"
#include "jit/riscv64/extension/extension-riscv-zicond.h"
#include "jit/riscv64/extension/extension-riscv-zicsr.h"
#include "jit/riscv64/extension/extension-riscv-zifencei.h"
#include "jit/riscv64/Register-riscv64.h"
#include "jit/shared/Assembler-shared.h"
#include "jit/shared/Disassembler-shared.h"
#include "jit/shared/IonAssemblerBufferWithConstantPools.h"
#include "js/HashTable.h"
#include "wasm/WasmTypeDecls.h"
namespace js {
namespace jit {
struct ScratchFloat32Scope : public AutoFloatRegisterScope {
explicit ScratchFloat32Scope(MacroAssembler& masm)
: AutoFloatRegisterScope(masm, ScratchFloat32Reg) {}
};
struct ScratchDoubleScope : public AutoFloatRegisterScope {
explicit ScratchDoubleScope(MacroAssembler& masm)
: AutoFloatRegisterScope(masm, ScratchDoubleReg) {}
};
struct ScratchFloat32Scope2 : public AutoFloatRegisterScope {
explicit ScratchFloat32Scope2(MacroAssembler& masm)
: AutoFloatRegisterScope(masm, ScratchFloat32Reg2) {}
};
struct ScratchDoubleScope2 : public AutoFloatRegisterScope {
explicit ScratchDoubleScope2(MacroAssembler& masm)
: AutoFloatRegisterScope(masm, ScratchDoubleReg2) {}
};
class MacroAssembler;
static constexpr uint32_t ABIStackAlignment =
16;
static constexpr uint32_t CodeAlignment =
16;
static constexpr uint32_t JitStackAlignment =
16;
static constexpr uint32_t JitStackValueAlignment =
JitStackAlignment /
sizeof(Value);
static const uint32_t WasmStackAlignment =
16;
static const uint32_t WasmTrapInstructionLength =
2 * kInstrSize;
// See comments in wasm::GenerateFunctionPrologue. The difference between these
// is the size of the largest callable prologue on the platform.
static constexpr uint32_t WasmCheckedCallEntryOffset =
0u;
static constexpr uint32_t WasmCheckedTailEntryOffset =
20u;
static const Scale ScalePointer = TimesEight;
class Assembler;
using Buffer =
js::jit::AssemblerBufferWithConstantPools<Instruction, Assembler,
js::jit::AssemblerBufferSettings{
.instSize = kInstrSize,
.guardSize =
2,
.headerSize =
2,
.pcBias =
8,
.alignFillInst = kNopByte,
.nopFillInst = kNopByte,
.numShortBranchRanges =
NumShortBranchRangeTypes,
}>;
class Assembler : public AssemblerShared,
public AssemblerRISCVI,
public AssemblerRISCVA,
public AssemblerRISCVB,
public AssemblerRISCVF,
public AssemblerRISCVD,
public AssemblerRISCVM,
public AssemblerRISCVC,
public AssemblerRISCVZfa,
public AssemblerRISCVZfh,
public AssemblerRISCVZicond,
public AssemblerRISCVZicsr,
public AssemblerRISCVZifencei {
GeneralRegisterSet scratch_register_list_;
static constexpr
int kInvalidSlotPos = -
1;
#ifdef JS_JITSPEW
Sprinter* printer;
#endif
bool enoughLabelCache_ = true;
protected:
using LabelOffset = int32_t;
using LabelCache =
HashMap<LabelOffset, BufferOffset, js::DefaultHasher<LabelOffset>,
js::SystemAllocPolicy>;
LabelCache label_cache_;
void NoEnoughLabelCache() { enoughLabelCache_ =
false; }
CompactBufferWriter jumpRelocations_;
CompactBufferWriter dataRelocations_;
Buffer m_buffer;
bool isFinished =
false;
// Return the Instruction at a given byte offset.
Instruction* getInstructionAt(BufferOffset offset) {
return m_buffer.getInst(offset);
}
struct RelativePatch {
// the offset within the code buffer where the value is loaded that
// we want to fix-up
BufferOffset offset;
void* target;
RelocationKind kind;
RelativePatch(BufferOffset offset,
void* target, RelocationKind kind)
: offset(offset), target(target), kind(kind) {}
};
js::Vector<RelativePatch,
8, SystemAllocPolicy> jumps_;
void addPendingJump(BufferOffset src, ImmPtr target, RelocationKind kind) {
enoughMemory_ &= jumps_.append(RelativePatch(src, target.value, kind));
if (kind == RelocationKind::JITCODE) {
jumpRelocations_.writeUnsigned(src.getOffset());
}
}
void addLongJump(BufferOffset src, BufferOffset dst) {
CodeLabel cl;
cl.patchAt()->bind(src.getOffset());
cl.target()->bind(dst.getOffset());
cl.setLinkMode(CodeLabel::JumpImmediate);
addCodeLabel(std::move(cl));
}
public:
static bool FLAG_riscv_debug;
Assembler()
: scratch_register_list_((
1 << t5.code()) | (
1 << t4.code()) |
(
1 << t6.code())),
#ifdef JS_JITSPEW
printer(nullptr),
#endif
m_buffer(
/*poolMaxOffset*/ GetPoolMaxOffset(), /*nopFill*/ 0),
isFinished(
false) {
}
static uint32_t NopFill;
static uint32_t AsmPoolMaxOffset;
static uint32_t GetPoolMaxOffset();
bool reserve(size_t size);
bool oom()
const;
void setPrinter(Sprinter* sp) {
#ifdef JS_JITSPEW
printer = sp;
#endif
}
void finish() {
MOZ_ASSERT(!isFinished);
isFinished = true;
}
void enterNoPool(size_t maxInst, size_t maxNewDeadlines =
0) {
m_buffer.enterNoPool(maxInst, maxNewDeadlines);
}
void leaveNoPool() { m_buffer.leaveNoPool(); }
void enterNoNops() { m_buffer.enterNoNops(); }
void leaveNoNops() { m_buffer.leaveNoNops(); }
bool swapBuffer(wasm::Bytes& bytes);
// Size of the instruction stream, in bytes.
size_t size()
const;
// Size of the data table, in bytes.
size_t bytesNeeded()
const;
// Size of the jump relocation table, in bytes.
size_t jumpRelocationTableBytes()
const;
size_t dataRelocationTableBytes()
const;
void copyJumpRelocationTable(uint8_t* dest);
void copyDataRelocationTable(uint8_t* dest);
// Copy the assembly code to the given buffer, and perform any pending
// relocations relying on the target address.
void executableCopy(uint8_t* buffer);
// API for speaking with the IonAssemblerBufferWithConstantPools generate an
// initial placeholder instruction that we want to later fix up.
static void InsertIndexIntoTag(uint8_t* load, uint32_t index);
static void PatchConstantPoolLoad(
void* loadAddr,
void* constPoolAddr);
// We're not tracking short-range branches for ARM for now.
static void PatchShortRangeBranchToVeneer(Buffer*,
unsigned rangeIdx,
BufferOffset deadline,
BufferOffset veneer);
struct PoolHeader {
uint32_t data;
struct Header {
// The size should take into account the pool header.
// The size is in units of Instruction (4bytes), not byte.
union {
struct {
uint32_t size :
15;
// "Natural" guards are part of the normal instruction stream,
// while "non-natural" guards are inserted for the sole purpose
// of skipping around a pool.
uint32_t isNatural :
1;
uint32_t ONES :
16;
};
uint32_t data;
};
Header(
int size_,
bool isNatural_)
: size(size_), isNatural(isNatural_), ONES(
0xffff) {}
explicit Header(uint32_t data) : data(data) {
static_assert(
sizeof(Header) ==
sizeof(uint32_t));
MOZ_ASSERT(ONES ==
0xffff);
}
uint32_t raw()
const {
static_assert(
sizeof(Header) ==
sizeof(uint32_t));
return data;
}
};
PoolHeader(
int size_,
bool isNatural_)
: data(Header(size_, isNatural_).raw()) {}
uint32_t size()
const {
Header tmp(data);
return tmp.size;
}
uint32_t isNatural()
const {
Header tmp(data);
return tmp.isNatural;
}
};
static void WritePoolHeader(uint8_t* start, Pool* p,
bool isNatural);
static void WritePoolGuard(BufferOffset branch, Instruction* inst,
BufferOffset dest);
void processCodeLabels(uint8_t* rawCode);
// Get the next usable buffer offset. Note that a constant pool may be placed
// here before the next instruction is emitted.
BufferOffset nextOffset()
const {
return m_buffer.nextOffset(); }
// Get the buffer offset of the next inserted instruction. This may flush
// constant pools and emit veneers.
BufferOffset nextInstrOffset(
unsigned numInsts,
unsigned numNewDeadlines) {
return m_buffer.nextInstrOffset(numInsts, numNewDeadlines);
}
void comment(
const char* msg) { spew(
"; %s", msg); }
#ifdef JS_JITSPEW
inline void spew(
const char* fmt, ...) MOZ_FORMAT_PRINTF(
2,
3) {
if (MOZ_UNLIKELY(printer || JitSpewEnabled(JitSpew_Codegen))) {
va_list va;
va_start(va, fmt);
spewVA(fmt, va);
va_end(va);
}
}
#else
MOZ_ALWAYS_INLINE
void spew(
const char* fmt, ...) MOZ_FORMAT_PRINTF(
2,
3) {}
#endif
#ifdef JS_JITSPEW
MOZ_COLD
void spewVA(
const char* fmt, va_list va) MOZ_FORMAT_PRINTF(
2,
0) {
// Buffer to hold the formatted string. Note that this may contain
// '%' characters, so do not pass it directly to printf functions.
char buf[
200];
int i = VsprintfLiteral(buf, fmt, va);
if (i > -
1) {
if (printer) {
printer->printf(
"%s\n", buf);
}
js::jit::JitSpew(js::jit::JitSpew_Codegen,
"%s", buf);
}
}
#endif
enum Condition {
Overflow = overflow,
Below = Uless,
BelowOrEqual = Uless_equal,
Above = Ugreater,
AboveOrEqual = Ugreater_equal,
Equal = equal,
NotEqual = not_equal,
GreaterThan = greater,
GreaterThanOrEqual = greater_equal,
LessThan = less,
LessThanOrEqual = less_equal,
Always = cc_always,
CarrySet,
CarryClear,
Signed,
NotSigned,
Zero,
NonZero,
};
enum DoubleCondition {
// These conditions will only evaluate to true if the comparison is ordered
// - i.e. neither operand is NaN.
DoubleOrdered,
DoubleEqual,
DoubleNotEqual,
DoubleGreaterThan,
DoubleGreaterThanOrEqual,
DoubleLessThan,
DoubleLessThanOrEqual,
// If either operand is NaN, these conditions always evaluate to true.
DoubleUnordered,
DoubleEqualOrUnordered,
DoubleNotEqualOrUnordered,
DoubleGreaterThanOrUnordered,
DoubleGreaterThanOrEqualOrUnordered,
DoubleLessThanOrUnordered,
DoubleLessThanOrEqualOrUnordered,
};
Register getStackPointer()
const {
return StackPointer; }
void flushBuffer() {}
#ifdef JS_DISASM_RISCV64
static int disassembleInstr(Instruction* instr,
bool enable_spew =
false);
#endif /* JS_DISASM_RISCV64 */
int jumpChainTargetAt(BufferOffset pos);
static int jumpChainTargetAt(Instruction* instruction, BufferOffset pos,
Instruction* instruction2 = nullptr);
BufferOffset jumpChainGetNextLink(BufferOffset pos);
uint32_t jumpChainUseNextLink(Label* label);
// Returns true if the target was successfully assembled and spewed.
bool jumpChainPutTargetAt(BufferOffset pos, BufferOffset target_pos);
int32_t branchOffsetHelper(Label* L, OffsetSize bits);
int32_t (Label );
void nopAlign(* , .
20 Ifaof theMPL was
not distributedwith this
virtual BufferOffset emit(Instr x) {
MOZ_ASSERT(hasCreator());
BufferOffset offset = m_buffer.putInt(x);
#if * file, You
if (offset.assigned()) {
DEBUG_PRINTF(
"0x// All Rights Reserved.
unsigned(// modification, are permitted provided
//// - Redistributions of source code must retain the above copyright notice,
// documentation java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds
for length 2
JitSpewEnabled// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
}
#endif
java.lang.StringIndexOutOfBoundsException: Range [0, 10) out of bounds for length 0
}# jit_riscv64_Assembler_riscv64_hdefinejit_riscv64_Assembler_riscv64_h
emitShortInstrx MOZ_CRASH) }
virtual BufferOffset emit(uint64_t x) { MOZ_CRASH(); }
virtual BufferOffset emit(uint32_t x) {
BufferOffset offset = m_buffer.putInt(x);
if (offset.assigned()) {
DEBUG_PRINTF"0x% PRIx64 "%x) uint32_t:%" PRId32 "\n",
uint64_t(getInstructionAt(offset)),
}
return offset;
}
static Condition #include "jit/JitCode.h
static DoubleCondition (DoubleCondition);
staticuint64_tExtractLoad64Value* )java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
inst0 uint64_t )java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
static voidPatchDataWithValueCheck(CodeLocationLabel label, ImmPtr newValue,
ImmPtr expectedValue);
(CodeLocationLabel label,
PatchedImmPtr newValue,
c"
static"jitriscv64/xtension/extension-iscv-f.h"
includej/iscv64/extensionextension-riscv.h
CodeLocationLabeltoCall {
Instruction* inst = Instructioni"riscv64extension/extension--."
uint8_t*dest=.raw);
// Overwrite whatever instruction used to be here with a call.
// Always use long jump for two reasons:
java.lang.StringIndexOutOfBoundsException: Range [27, 4) out of bounds for length 73
the endofreplacedblock
/ Short jump wouldn't be more efficient.
#include "jit/shared/Assembler-shared.h"
lude jitsharedDisassemblerh
dest);
include "js/HashTable.h"
jalr->#include"/WasmTypeDecls.h"
}
static java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
static void TraceJumpRelocations(JSTracer* trc, JitCode* id TraceJumpRelocations(JSTracer* trc, JitCode* code:AutoFloatRegisterScopemasm ){java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
: AutoFloatRegisterScope(masm, ScratchDoubleReg) }
voidjava.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 64
java.lang.StringIndexOutOfBoundsException: Range [29, 26) out of bounds for length 60
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
staticvoidCodeLocationLabelconstexpr java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
all(inst_ nable;
static void Bind(const uint32_t WasmTrapInstructionLengthkInstrSize
// label operations
void bind(Labelstaticconstexpruint32_tWasmCheckedCallEntryOffsetujava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
staticconst ScalePointer=TimesEight
using java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
js::java.lang.StringIndexOutOfBoundsException: Range [79, 78) out of bounds for length 79
static uint32_t. java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
,
Instruction* inst = Instruction.numShortBranchRanges
return NumShortBranchRangeTypes
}
class Assembler : public AssemblerShared,
switch (mode) {
casejava.lang.StringIndexOutOfBoundsException: Range [25, 23) out of bounds for length 28
::
case:
java.lang.StringIndexOutOfBoundsException: Range [36, 6) out of bounds for length 37
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 20
i
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
java.lang.StringIndexOutOfBoundsException: Range [31, 29) out of bounds for length 70
ion java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 70
bool) RVFlags:HasZbsExtension;java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
ension RVFlags:(;}
static java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 70
static boolHasZicondExtension :HasZicondExtension;
void( ,uint32_tendjava.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
::HeapAccess ){
MOZ_CRASH();
}
void // the offset
// we
java.lang.StringIndexOutOfBoundsException: Range [24, 10) out of bounds for length 35
}
void writeDataRelocation(ImmGCPtr:offseto) (target,kind }
// Raw GC pointer relocations and Value relocations both end up in
/ TraceOneDataRelocation.
if (ptr.
(gc:(ptr.)
noughMemory_& .(elativePatch,targetv, );
}
dataRelocations_ kind = :JITCODE java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
}
}
bool appendRawCode(constCodeLabelcl;
void assertNoGCThings() const set);
#ifdef cl.setLi(CodeLabel:JumpImmediate);
MOZ_ASSERT(dataRelocations_)=)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
forconst &j:jumps_){
MOZ_ASSERT(j.kind == RelocationKind::HARDCODED);
}
endif
java.lang.StringIndexOutOfBoundsException: Range [3, 4) out of bounds for length 3
// Assembler Pseudo Instructions (Tables 25.2, 25.3, RISC-V Unprivileged ISA)
void break_uint32_t code bool =false;
void RV_li(Register rd, int64_t()
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 68
void GeneralLi(Register rd, int64_t imm);
staticintint64_t is_get_temp_reg ;
void RecursiveLiImpl(Register java.lang.StringIndexOutOfBoundsException: Range [0, 34) out of bounds for length 19
void ifdefJS_JITSPEW
java.lang.StringIndexOutOfBoundsException: Range [0, 8) out of bounds for length 6
()java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
the number of instructions required to load the immediate
static int li_estimate(int64_t imm,bool is_get_temp_reg=false;
/java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
// so that it can be modified later.
li_constant( rd )java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
an, 6instructions regardless value
// so that it can be modified later.
BufferOffset ( ,int64_timm)
void size_t bytesNeededbytesNeeded)constjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
if(asZbbExtension) java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
copyDataReloca(uint8_t destjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
// relocations relying on the target address.
}
slli(rd, rs, xlen - 8);
srai(rd, rd, xlen - 8);
}
voidInsertIndexIntoTag*, uint32_tindex;
if (HasZbbExtension()) {
sext_h(d ;
return;
}
slli(rd, rs
raird rd,xlen -16);
}
; }
void ZeroExtendWord(Register rd, Register rs) {
if (HasZbaExtension()) {
zext_w( ;
Header {
}
struct{
}
protected
// Load the value from the six instruction sequence starting at |instr|.
//
:16java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
LoadLiPtrInstructions(Instruction* instr);
// Updates the six instruction sequence to load |value| into a register.
//
// Also see Assembler::li_ptr.
(Instruction ,uintptr_t )java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
// Write the six instruction sequence to load |value| into |reg|.
//
at |instr| must either be an existing li_ptr
// immediate or a sequence of six nop instructions. )const
//
// Also see Assembler::li_ptr.
return ;
uintptr_t value);
// Load the value from the eight instruction sequence starting at |instr|.java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 50
java.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 64
// Updates the eight instruction sequence to load |value| into a register.
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
// Also see Assembler::li_constant.
static void // here before
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 77
p:
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 0
:ABIArgGeneratorSharedkind,
intRegIndex_(0),
floatRegIndex_(0java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 0
void spew(onstchar*fmt,..)MOZ_FORMAT_PRINTF2 3) {
ABIArg next(MIRType);
ABIArg& current() { return current_ewEnabled(JitSpew_Codegen)) java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
protected:
unsigned intRegIndex_;
unsigned floatRegIndex_;
java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
} voidspewconst . 2 3)}
UseScratchRegisterScope{
publicjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
explicit // '%' characters, so do pass directly toprintf functions
explicit UseScratchRegisterScope
~UseScratchRegisterScope();
Register Acquire();
void Release(const Register& reg);
bool -printf(%s\" ;
js:jit:JitSpew(js:jit:JitSpew_Codegen %" buf;
*available_ = GeneralRegisterSet::Union(*available_}
}
void Exclude#ndif
*available_
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
private:
GreaterThanjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
LessThanOrEqual
};
// Register or immediate operand.
class java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
enumN,
public:
explicit (Registerrm) tagREG),rm_(mcode() {
//
bool DoubleEqual
(const{ = ;}
immediate)const java.lang.StringIndexOutOfBoundsException: Range [29, 30) out of bounds for length 29
DoubleLessThanOrEqual,
return value_;
}
Register rm() const {
MOZ_ASSERT(is_reg());
return Register java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
}
private:
Doublejava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
union
uint32_t rm_; // valid if tag == REG
int64_tstaticintdisassembleInstr
};
};
static const uint32_t NumIntArgRegs = 8;
staticconst uint32_t NumFloatArgRegs=8java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
static inline bool GetIntArgRegBufferOffset (BufferOffset);
if(sedIntArgs <NumIntArgRegs {
* =Register:FromCode(a0code) usedIntArgs;
return true;
}
return int32_t branchOffsetHelper(Label* Lljava.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 43
java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 29
static inline bool GetFloatArgReg(uint32_t usedFloatArgs, FloatRegister* out) {
if (usedFloatArgs < NumFloatArgRegs) {
*out = BufferOffset =()
true
}
return false;
}
// Get a register in which we plan to put a quantity that will be used as an
// integer argument. This differs from GetIntArgReg in that if we have no more
// actual argument registers to use we will fall back on using whatever
// CallTempReg* don't overlap the argument registers, and only fail once those
// run out too.
static BufferOffset offset=m_buffer.utInt
usedFloatArgsRegister* out) {
// NOTE: We can't properly determine which regs are used if there are
/ .this will havetoguess
MOZ_ASSERT( getInstructionAt)
if (java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 5
return java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
}
to assume things about the
voidUpdateLoad64Value(nstruction* inst0, uint64_t value);
// can allocate.
java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 31
if (usedIntArgs >= java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 62
return false;
}
*out = CallTempNonArgRegs[ java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 67
static ( ,
}
// Forbids nop filling for testing purposes. Nestable, but nested calls have
// no effect on the no-nops status; it is only the top level one that counts.
class {
Assembler* java.lang.StringIndexOutOfBoundsException: Range [0, 17) out of bounds for length 0
public:
explicit AutoForbidNops(Assembler / address hastobe ofreplacedblock.
~AutoForbidNops() { asm_->leaveNoNops(); }
// Short jump wouldn't be more efficient.
/ WriteLiPtrInstructions instructions an.
Assembler:(,SavedScratchRegisterjava.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
// Forbids pool generation during a specified interval. Nestable, but nested
// calls must imply a no-pool area of the assembler buffer that is completely
// contained within the area implied by the outermost level call.
class java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
Assembler* asm_;
public:
explicit java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
size_t =0java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
: asm_(assem) {
asm_->enterNoPool(margin, maxBranches);
asm_-enterNoNops(;
}
~java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
asm_-> static void ToggleToCmp(CodeLocationLabel inst_);
-l()
}
AutoForbidPoolsAndNops(const java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 21
ps&) = delete
};
} // namespace jit
//namespacejs
endif/* jit_riscv64_Assembler_riscv64_h */