// Copyright 2024 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
// fli.d: Load floating-point immediate (predefined constants) // The imm5 field (rs1) encodes which constant to load (same values as fli.s, // but with double-precision representation) void fli_d(FPURegister rd, uint8_t imm5);
// ============================================================================= // FLI (Floating-Point Load Immediate) Constants // ============================================================================= // The FLI instruction loads one of 32 predefined floating-point constants. // The constant is selected by a 5-bit immediate (imm5) in the rs1 field. // // imm5 encoding: // 0: -1.0 // 1: minimum positive normal (FLT_MIN / DBL_MIN) // 2: 1.0 × 2⁻¹⁶ // 3: 1.0 × 2⁻¹⁵ // ... // 16: 1.0 // ... // 30: +∞ // 31: Canonical NaN
// Returns the single-precision floating-point value for the given FLI.S // immediate encoding (imm5). // Precondition: imm5 <= 31 float GetFLISValue(uint8_t imm5);
// Returns the double-precision floating-point value for the given FLI.D // immediate encoding (imm5). // Precondition: imm5 <= 31 double GetFLIDValue(uint8_t imm5);
// Returns the FLI.S immediate encoding (imm5) for the given single-precision // floating-point value, or -1 if the value cannot be encoded by FLI.S. int GetImm5ForFLIS(float value);
// Returns the FLI.D immediate encoding (imm5) for the given double-precision // floating-point value, or -1 if the value cannot be encoded by FLI.D. int GetImm5ForFLID(double value);
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.