Peek the architectural stack at a specified offset from its top, without affecting the top of the stack. Note that this operation violates the FIFO property of the stack and may be used cautiously. Args: offset: offset in bytes from the top of the stack, not nec
(self, offset: int)
| 75 | return data |
| 76 | |
| 77 | def stack_read(self, offset: int) -> int: |
| 78 | """Peek the architectural stack at a specified offset from its top, without affecting |
| 79 | the top of the stack. |
| 80 | |
| 81 | Note that this operation violates the FIFO property of the stack and may be used cautiously. |
| 82 | |
| 83 | Args: |
| 84 | offset: offset in bytes from the top of the stack, not necessarily aligned to the |
| 85 | native stack item size. the offset may be either positive or netagive, where |
| 86 | a 0 value means retrieving the value at the top of the stack |
| 87 | |
| 88 | Returns: the value at the specified address |
| 89 | """ |
| 90 | |
| 91 | return self.ql.mem.read_ptr(self.regs.arch_sp + offset) |
| 92 | |
| 93 | def stack_write(self, offset: int, value: int) -> None: |
| 94 | """Write a value to the architectural stack at a specified offset from its top, without |
no test coverage detected