BinaryFile: add architecture-dependent fields

Add return address register and minimal final stack offset in Arch.
This commit is contained in:
Antonio Frighetto
2021-10-03 15:33:17 +02:00
parent 2656b72eed
commit 9595894bcf
6 changed files with 40 additions and 1 deletions
@@ -50,6 +50,8 @@ void GeneratedCodeBasicInfo::run(Module &M) {
DelaySlotSize = QMD.extract<uint32_t>(Tuple, Index++);
PC = M.getGlobalVariable(QMD.extract<StringRef>(Tuple, Index++), true);
SP = M.getGlobalVariable(QMD.extract<StringRef>(Tuple, Index++), true);
RA = M.getGlobalVariable(QMD.extract<StringRef>(Tuple, Index++), true);
MinimalFSO = QMD.extract<int64_t>(Tuple, Index++);
auto Operands = QMD.extract<MDTuple *>(Tuple, Index++)->operands();
for (const MDOperand &Operand : Operands) {
StringRef Name = QMD.extract<StringRef>(Operand.get());