7.7
3 Generic Instructions
Link to this section with
@secref["Generic_Instructions" #:doc '(lib "asm/scribblings/asm.scrbl")]
Link to this section with
@secref["Generic_Instructions" #:doc '(lib "asm/scribblings/asm.scrbl")]
Based on the GNU lightning instruction set, with some differences.
3.1 Registers
Link to this section with
@secref["Registers" #:doc '(lib "asm/scribblings/asm.scrbl")]
Link to this section with
@secref["Registers" #:doc '(lib "asm/scribblings/asm.scrbl")]
Callee-saved registers.
Caller-saved registers.
Floating-point registers.
Frame pointer.
3.2 Arithmetic
Link to this section with
@secref["Arithmetic" #:doc '(lib "asm/scribblings/asm.scrbl")]
Link to this section with
@secref["Arithmetic" #:doc '(lib "asm/scribblings/asm.scrbl")]
Can any scribble experts think of a nice way of documenting
all these functions without a load of typing?
;; Binary ALU operations
add
addx
addc
sub
subx
subc
rsb
mul
div
rem
and
or
xor
lsh
rsh
;; Four operand binary ALU operations
qmul
qdiv
;; Unary ALU operations
neg
com
abs
sqrt
3.3 Comparisons
Link to this section with
@secref["Comparisons" #:doc '(lib "asm/scribblings/asm.scrbl")]
Link to this section with
@secref["Comparisons" #:doc '(lib "asm/scribblings/asm.scrbl")]
lt
le
gt
ge
eq
ne
unlt
unle
ungt
unge
uneq
ltgt
ord
unord
3.4 Branches
Link to this section with
@secref["Branches" #:doc '(lib "asm/scribblings/asm.scrbl")]
Link to this section with
@secref["Branches" #:doc '(lib "asm/scribblings/asm.scrbl")]
blt
ble
bgt
bge
beq
bne
bunlt
bunle
bungt
bunge
buneq
bltgt
bord
bunord
bms
bmc
boadd
bxadd
bosub
bxsub
3.5 Function calls
Link to this section with
@secref["Function_calls" #:doc '(lib "asm/scribblings/asm.scrbl")]
Link to this section with
@secref["Function_calls" #:doc '(lib "asm/scribblings/asm.scrbl")]
;; Function calls
prepare
pusharg
call
finish
jmp
retval
arg
getarg
putarg
prolog
epilog
alloca
ret
frame
tramp
3.6 Other
Link to this section with
@secref["Other" #:doc '(lib "asm/scribblings/asm.scrbl")]
Link to this section with
@secref["Other" #:doc '(lib "asm/scribblings/asm.scrbl")]
;; Transfer operations
mov
ext
trunc
;; Network extensions
hton
ntoh
;; Load operations
ld
ldx
;; Store operations
st
stx