≈ the.bay.news

Pinning a local variable to a machine register

Ziggit
Pinning a local variable to a machine register
Hi, I’m building a bytecode interpreter hosted in Zig, and I’d like to build a profiler for the guest language. My profiler works by sending a signal on an interval, getting the current PC, and then walking up the stack to collect a profile. Right now I’m keeping the PC in memory so that the signal handler knows where to find it, but I would like to move the PC to a register so that I can speed up the interpreter. What is the best way to force a local variable in to a particular register so ...

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.