Add tests for dereferencing constants and registers

Signed-off-by: Josh Kilmer <srjek2@gmail.com>