Commit 1a2b6f2
committed
heartbleed: use 64-bit mcycle read to avoid overflow in legacy
The legacy demo unintentionally aliased a 32-bit `rdcycle` function to
`rdcycle64`, and used its 32-bit output as a 64-bit value. This caused
an overflow in `mcycle` after a few minutes of running, which sometimes
left the demo stuck and unable to progress in its legacy component.
Replace this function with an actual 64-bit mcycle read using the
low/high registers appropriately.
Signed-off-by: Alex Jones <[email protected]>1 parent 9f58e47 commit 1a2b6f2
1 file changed
+13
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
56 | 68 | | |
57 | 69 | | |
58 | 70 | | |
| |||
0 commit comments