Design of the stack and register scanning module.