|
LLVM 24.0.0git
|
Representation of a byte in memory. More...
#include "llvm/UBAwareInterpreter/Value.h"
Public Member Functions | |
| void | zeroBits (uint8_t Mask) |
| void | poisonBits (uint8_t Mask) |
| void | undefBits (uint8_t Mask) |
| void | writeBits (uint8_t Mask, uint8_t Val) |
| void | writeTagBits (uint8_t Mask, uint8_t Tag) |
| void | writeByte (uint8_t Mask, const Byte &RHS) |
| Byte | lshr (uint8_t Shift) const |
| Byte | shl (uint8_t Shift) const |
| bool | isCanonicalPaddingByte (uint8_t PaddingMask) const |
| Padding bits may carry pointer provenance. | |
Static Public Member Functions | |
| static Byte | poison () |
| static Byte | undef () |
| static Byte | concrete (uint8_t Val) |
| static Byte | fshr (const Byte &Low, const Byte &High, uint32_t ShAmt) |
| Returns a logical byte that is part of two adjacent bytes. | |
Public Attributes | |
| uint8_t | ConcreteMask |
| uint8_t | Value |
| uint8_t | TagMask |
| uint8_t | TagValue |
Representation of a byte in memory.
How to interpret the byte per bit:
Note that the idealized interpreter would store a full pointer tag for every single pointer bit, as well as the position of that bit in the pointer. The provenance is preserved as the bit is copied around, and when a sequence of bytes is eventually converted back to a pointer, all bits must be in the original order and have the same provenance. However, that would be prohibitively expensive. So instead, we rely on randomized ptr-sized tags. This means that if bits get reordered, or if bits from different pointers get mixed, then the result is unlikely to be a valid tag.
Definition at line 52 of file Value.h.
Referenced by llvm::ubi::ByteValue::ByteValue(), llvm::ubi::ExecutorBase::executeMemSet(), llvm::ubi::MemoryObject::MemoryObject(), llvm::ubi::Context::storeRawBytes(), llvm::ubi::InstExecutor::visitBitCastInst(), and llvm::ubi::ByteValue::zero().
Padding bits may carry pointer provenance.
Only require their value bits to be concrete zero, or non-concrete for poison.
Definition at line 123 of file Value.h.
References ConcreteMask, and Value.
Referenced by llvm::ubi::ByteValue::canonicalize(), llvm::ubi::Context::fromBytes(), and llvm::ubi::ByteValue::isValid().
|
inlinestatic |
Definition at line 50 of file Value.h.
Referenced by llvm::ubi::InstExecutor::callIntrinsic(), llvm::ubi::ByteValue::canonicalize(), llvm::ubi::ExecutorBase::executeMemSet(), llvm::ubi::Context::fromBytes(), llvm::ubi::MemoryObject::MemoryObject(), and llvm::ubi::ByteValue::poison().
|
inline |
Definition at line 60 of file Value.h.
References ConcreteMask, TagMask, and Value.
Referenced by llvm::ubi::ByteValue::canonicalize(), and llvm::ubi::Context::toBytes().
|
inlinestatic |
Definition at line 51 of file Value.h.
Referenced by llvm::ubi::InstExecutor::callIntrinsic(), llvm::ubi::MemoryObject::MemoryObject(), and llvm::ubi::Context::toBytes().
|
inline |
Definition at line 66 of file Value.h.
References ConcreteMask, TagMask, and Value.
Definition at line 72 of file Value.h.
References ConcreteMask, TagMask, and Value.
|
inline |
Definition at line 54 of file Value.h.
References ConcreteMask, TagMask, and Value.
Referenced by llvm::ubi::ByteValue::canonicalize(), and llvm::ubi::Context::toBytes().
| uint8_t llvm::ubi::Byte::ConcreteMask |
Definition at line 44 of file Value.h.
Referenced by llvm::ubi::ByteValue::canonicalize(), isCanonicalPaddingByte(), lshr(), poisonBits(), shl(), llvm::ubi::Context::toBytes(), undefBits(), writeBits(), writeByte(), writeTagBits(), and zeroBits().
| uint8_t llvm::ubi::Byte::TagMask |
Definition at line 46 of file Value.h.
Referenced by lshr(), poisonBits(), shl(), undefBits(), writeBits(), writeByte(), writeTagBits(), and zeroBits().
| uint8_t llvm::ubi::Byte::TagValue |
Definition at line 47 of file Value.h.
Referenced by lshr(), shl(), writeByte(), and writeTagBits().
| uint8_t llvm::ubi::Byte::Value |
Definition at line 45 of file Value.h.
Referenced by isCanonicalPaddingByte(), lshr(), poisonBits(), shl(), undefBits(), writeBits(), writeByte(), and zeroBits().