mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
Extend support for partial CPU state reads/writes
This patch implements `VariableManager::storeToCPUStateOffset` and `VariableManager::loadFromCPUStateOffset`, which handle in a single point all the accesses by offset to the CPU state. * `getTypeAtOffset`: introduce a feature to easily debug how we compute which field is at a specified offset in the CPU state (`--debug type-at-offset`). * Let `getTypeAtOffset` and its wrappers return the offset inside a field of the CPU state (useful when accessing the third byte of an integer). * Use a dedicated class for the `CorrectCPUStateUsage` worklist
This commit is contained in:
+2
-1
@@ -637,7 +637,8 @@ void CodeGenerator::translate(uint64_t VirtualAddress,
|
||||
|
||||
// Instantiate helpers
|
||||
VariableManager Variables(*TheModule,
|
||||
*HelpersModule);
|
||||
*HelpersModule,
|
||||
TargetArchitecture);
|
||||
|
||||
auto *PCReg = Variables.getByEnvOffset(ptc.pc, "pc").first;
|
||||
JumpTargetManager JumpTargets(MainFunction,
|
||||
|
||||
Reference in New Issue
Block a user