view lab4/fixup.s @ 1:b5139af1a420 tip basis

Fixed permissions on compile scripts
author Mike Spivey <mike@cs.ox.ac.uk>
date Fri, 13 Oct 2017 17:27:58 +0100
parents bfdcc3820b32
children
line wrap: on
line source
@ fixup.s

@ "set reg, #val" is a synonym for a PC-relative load instruction.  The same
@ goes for the conditional versions seths and seteq, which are used in the
@ Lab 4 compiler to translate runtime checks.

.macro set, reg, val
       ldr \reg, =\val
.endm

.macro seths, reg, val
       ldrhs \reg, =\val
.endm

.macro seteq, reg, val
       ldreq \reg, =\val
.endm