/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- * vim: set ts=8 sts=2 et sw=2 tw=80: * 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/. */
inlinebool HasSubregL(RegisterID reg) { #ifdef JS_CODEGEN_X64 // In 64-bit mode, all registers have an 8-bit lo subreg. returntrue; #else // In 32-bit mode, only the first four registers do. return reg <= rbx; #endif
}
inlinebool HasSubregH(RegisterID reg) { // The first four registers always have h registers. However, note that // on x64, h registers may not be used in instructions using REX // prefixes. Also note that this may depend on what other registers are // used! return reg <= rbx;
}
// Rounding modes for ROUNDPS / ROUNDPD. Note these are the same as for // RoundingMode above but incorporate the 'inexact' bit which says not to signal // exceptions for lost precision. It's not obvious that this bit is needed; it // was however suggested in the wasm SIMD proposal that led to these encodings. enumclass SSERoundingMode {
RoundToNearest = 0x08,
RoundDown = 0x09,
RoundUp = 0x0A,
RoundToZero = 0x0B
};
// Test whether the given address will fit in an address immediate field. // This is always true on x86, but on x64 it's only true for addreses which // fit in the 32-bit immediate field. inlinebool IsAddressImmediate(constvoid* address) {
intptr_t value = reinterpret_cast<intptr_t>(address);
int32_t immediate = static_cast<int32_t>(value); return value == immediate;
}
// Convert the given address to a 32-bit immediate field value. This is a // no-op on x86, but on x64 it asserts that the address is actually a valid // address immediate. inline int32_t AddressImmediate(constvoid* address) {
MOZ_ASSERT(IsAddressImmediate(address)); returnstatic_cast<int32_t>(reinterpret_cast<intptr_t>(address));
}
} // namespace X86Encoding
} // namespace jit
} // namespace js
#endif/* jit_x86_shared_Constants_x86_shared_h */
Messung V0.5
¤ Dauer der Verarbeitung: 0.15 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.