comparison 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
comparison
equal deleted inserted replaced
-1:000000000000 0:bfdcc3820b32
1 @ fixup.s
2
3 @ "set reg, #val" is a synonym for a PC-relative load instruction. The same
4 @ goes for the conditional versions seths and seteq, which are used in the
5 @ Lab 4 compiler to translate runtime checks.
6
7 .macro set, reg, val
8 ldr \reg, =\val
9 .endm
10
11 .macro seths, reg, val
12 ldrhs \reg, =\val
13 .endm
14
15 .macro seteq, reg, val
16 ldreq \reg, =\val
17 .endm