[PATCH] D59167: [StackMaps] Add explicit location size accessor to the stackmap parser
Jake Hughes via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 8 17:08:50 PST 2019
jacob-hughes created this revision.
jacob-hughes added a reviewer: reames.
Herald added a project: LLVM.
jacob-hughes added a child revision: D59020: [StackMaps] Update llvm-readobj to parse V3 Stackmaps.
jacob-hughes retitled this revision from "Add explicit location size accessor to the stackmap parser" to "[StackMaps] Add explicit location size accessor to the stackmap parser".
The reserved uint8 field in the location block of the stackmap record is used to denote the size of the location.
Repository:
rL LLVM
https://reviews.llvm.org/D59167
Files:
llvm/include/llvm/Object/StackMapParser.h
Index: llvm/include/llvm/Object/StackMapParser.h
===================================================================
--- llvm/include/llvm/Object/StackMapParser.h
+++ llvm/include/llvm/Object/StackMapParser.h
@@ -114,6 +114,12 @@
return LocationKind(P[KindOffset]);
}
+ /// Get the Size for this location.
+ uint8_t getSize() const {
+ return read<uint8_t>(P + SizeOffset);
+
+ }
+
/// Get the Dwarf register number for this location.
uint16_t getDwarfRegNum() const {
return read<uint16_t>(P + DwarfRegNumOffset);
@@ -148,7 +154,8 @@
}
static const int KindOffset = 0;
- static const int DwarfRegNumOffset = KindOffset + sizeof(uint16_t);
+ static const int SizeOffset = KindOffset + sizeof(uint8_t);
+ static const int DwarfRegNumOffset = SizeOffset + sizeof(uint8_t);
static const int SmallConstantOffset = DwarfRegNumOffset + sizeof(uint16_t);
static const int LocationAccessorSize = sizeof(uint64_t);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59167.189966.patch
Type: text/x-patch
Size: 986 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190309/4d8cb3e6/attachment.bin>
More information about the llvm-commits
mailing list