[ARM] Add support for MVE pre and post inc loads and stores
[llvm-core.git] / tools / llvm-exegesis / lib / RegisterValue.h
blobda581275461604adce0706193d9ec186037ec679
1 //===-- RegisterValue.h -----------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 ///
9 /// \file
10 ///
11 /// Defines a Target independent value for a Register. This is useful to explore
12 /// the influence of the instruction input values on its execution time.
13 ///
14 //===----------------------------------------------------------------------===//
16 #ifndef LLVM_TOOLS_LLVM_EXEGESIS_REGISTERVALUE_H
17 #define LLVM_TOOLS_LLVM_EXEGESIS_REGISTERVALUE_H
19 #include <llvm/ADT/APFloat.h>
20 #include <llvm/ADT/APInt.h>
22 namespace llvm {
23 namespace exegesis {
25 // A simple object storing the value for a particular register.
26 struct RegisterValue {
27 static RegisterValue zero(unsigned Reg) { return {Reg, llvm::APInt()}; }
28 unsigned Register;
29 llvm::APInt Value;
32 enum class PredefinedValues {
33 POS_ZERO, // Positive zero
34 NEG_ZERO, // Negative zero
35 ONE, // 1.0
36 TWO, // 2.0
37 INF, // Infinity
38 QNAN, // Quiet NaN
39 ULP, // One Unit in the last place
40 SMALLEST = ULP, // The minimum subnormal number
41 SMALLEST_NORM, // The minimum normal number
42 LARGEST, // The maximum normal number
43 ONE_PLUS_ULP, // The value just after 1.0
46 llvm::APInt bitcastFloatValue(const llvm::fltSemantics &FltSemantics,
47 PredefinedValues Value);
49 } // namespace exegesis
50 } // namespace llvm
52 #endif // LLVM_TOOLS_LLVM_EXEGESIS_REGISTERVALUE_H