annotate lab4/fixup.s @ 0:bfdcc3820b32

Basis
author Mike Spivey <mike@cs.ox.ac.uk>
date Thu, 05 Oct 2017 08:04:15 +0100
parents
children
rev   line source
mike@0 1 @ fixup.s
mike@0 2
mike@0 3 @ "set reg, #val" is a synonym for a PC-relative load instruction. The same
mike@0 4 @ goes for the conditional versions seths and seteq, which are used in the
mike@0 5 @ Lab 4 compiler to translate runtime checks.
mike@0 6
mike@0 7 .macro set, reg, val
mike@0 8 ldr \reg, =\val
mike@0 9 .endm
mike@0 10
mike@0 11 .macro seths, reg, val
mike@0 12 ldrhs \reg, =\val
mike@0 13 .endm
mike@0 14
mike@0 15 .macro seteq, reg, val
mike@0 16 ldreq \reg, =\val
mike@0 17 .endm