1
0
mirror of https://gitlab.os-k.eu/os-k-team/kvisc.git synced 2023-08-25 14:05:46 +02:00
kvisc/pc/instrs/INSTRS

302 lines
2.8 KiB
Plaintext
Raw Normal View History

2019-05-30 12:44:56 +02:00
# The OS/K Team licenses this file to you under the MIT license.
2019-05-15 21:56:42 +02:00
# See the LICENSE file in the project root for more information.
2019-05-15 21:47:08 +02:00
2019-05-22 18:39:46 +02:00
stop
2019-05-16 10:03:01 +02:00
nop
2019-05-16 18:45:00 +02:00
#
# Logical instructions
#
2019-06-02 16:33:28 +02:00
not rm
and rm rim
or rm rim
xor rm rim
shl rm rim
shr rm rim
cnotz rm
candz rm rim
corz rm rim
cxorz rm rim
cshlz rm rim
cshrz rm rim
cnotnz rm
candnz rm rim
cornz rm rim
cxornz rm rim
cshlnz rm rim
cshrnz rm rim
2019-05-30 20:27:11 +02:00
2019-05-16 18:45:00 +02:00
#
# Unsigned arithmetic instructions
#
2019-06-02 16:33:28 +02:00
# mul:
2019-05-16 18:45:00 +02:00
# rdx = hi(rax * $0)
# rax = lo(rax * $0)
2019-05-30 20:23:27 +02:00
2019-06-02 16:33:28 +02:00
# div:
2019-05-16 18:45:00 +02:00
# rdx = rax % $0
# rax = rax / $0
2019-06-02 16:33:28 +02:00
sgn rm rim
add rm rim
sub rm rim
mul rim
div rim
inc rm
dec rm
csgnz rm rim
caddz rm rim
csubz rm rim
cmulz rim
cdivz rim
cincz rm
cdecz rm
csgnnz rm rim
caddnz rm rim
csubnz rm rim
cmulnz rim
cdivnz rim
cincnz rm
cdecnz rm
2019-05-31 21:25:56 +02:00
2019-05-16 19:49:51 +02:00
#
# Comparison instruction
#
2019-06-02 16:33:28 +02:00
cmp rim rim
cmpb rim rim
cmpw rim rim
cmpl rim rim
cmpt rim rim
test rim rim
testb rim rim
testw rim rim
testl rim rim
testt rim rim
2019-05-16 19:49:51 +02:00
#
# Jump instructions
#
2019-06-02 16:33:28 +02:00
jmp ri
2019-05-16 19:49:51 +02:00
2019-06-02 16:33:28 +02:00
cjmpz ri
cjmpnz ri
2019-05-30 20:23:27 +02:00
2019-06-02 16:33:28 +02:00
cjmpa ri
cjmpae ri
2019-05-29 18:26:28 +02:00
2019-06-02 16:33:28 +02:00
cjmpb ri
cjmpbe ri
2019-05-16 19:49:51 +02:00
2019-06-02 16:33:28 +02:00
jcxz ri
jcxnz ri
2019-05-30 20:23:27 +02:00
2019-06-02 16:33:28 +02:00
loop ri
cloopz ri
cloopnz ri
2019-05-16 19:49:51 +02:00
2019-05-16 18:45:00 +02:00
#
# Movement instructions
#
2019-06-03 15:16:11 +02:00
<<<<<<< Updated upstream
2019-06-02 16:33:28 +02:00
lea rm m
mov rm rim
xchg rm rim
cmpxchg rm rim
cleaz rm m
cmovz rm rim
cxchgz rm rim
ccmpxchgz rm rim
cleanz rm m
cmovnz rm rim
cxchgnz rm rim
ccmpxchgnz rm rim
2019-06-03 15:16:11 +02:00
=======
mov r r
mov r i
mov r m
mov m r
mov m i
mov m m
cmovz r r
cmovz r i
cmovz r m
cmovz m r
cmovz m i
cmovz m m
cmovnz r r
cmovnz r i
cmovnz r m
cmovnz m r
cmovnz m i
cmovnz m m
movb r r
movb r i
movb r m
movb m r
movb m i
movb m m
cmovbz r r
cmovbz r i
cmovbz r m
cmovbz m r
cmovbz m i
cmovbz m m
cmovbnz r r
cmovbnz r i
cmovbnz r m
cmovbnz m r
cmovbnz m i
cmovbnz m m
movw r r
movw r i
movw r m
movw m r
movw m i
movw m m
cmovwz r r
cmovwz r i
cmovwz r m
cmovwz m r
cmovwz m i
cmovwz m m
cmovwnz r r
cmovwnz r i
cmovwnz r m
cmovwnz m r
cmovwnz m i
cmovwnz m m
movl r r
movl r i
movl r m
movl m r
movl m i
movl m m
cmovlz r r
cmovlz r i
cmovlz r m
cmovlz m r
cmovlz m i
cmovlz m m
cmovlnz r r
cmovlnz r i
cmovlnz r m
cmovlnz m r
cmovlnz m i
cmovlnz m m
movt r r
movt r i
movt r m
movt m r
movt m i
movt m m
cmovtz r r
cmovtz r i
cmovtz r m
cmovtz m r
cmovtz m i
cmovtz m m
cmovtnz r r
cmovtnz r i
cmovtnz r m
cmovtnz m r
cmovtnz m i
cmovtnz m m
xchg r r
xchg r i
xchg r m
xchg m r
xchg m i
xchg m m
cxchgz r r
cxchgz r i
cxchgz r m
cxchgz m r
cxchgz m i
cxchgz m m
cxchgnz r r
cxchgnz r i
cxchgnz r m
cxchgnz m r
cxchgnz m i
cxchgnz m m
lea r m
lea m m
cleaz r m
cleaz m m
cleanz r m
cleanz m m
>>>>>>> Stashed changes
2019-05-30 20:23:27 +02:00
2019-05-16 18:45:00 +02:00
#
# Stack manipulation instructions
#
2019-05-16 16:48:45 +02:00
2019-06-02 16:33:28 +02:00
push rim
call rim
pop rm
2019-05-16 17:11:22 +02:00
ret
2019-06-02 16:33:28 +02:00
cpushz rim
ccallz rim
cpopz rm
2019-05-30 20:23:27 +02:00
cretz
2019-06-02 16:33:28 +02:00
cpushnz rim
ccallnz rim
cpopnz rm
2019-05-30 20:23:27 +02:00
cretnz
2019-05-16 17:11:22 +02:00
2019-05-29 22:27:49 +02:00
# push rbp
# mov rbp, rsp
2019-05-29 16:57:22 +02:00
enter
2019-05-29 22:27:49 +02:00
# add rsp, 8
2019-06-02 16:35:46 +02:00
# mov rbp, [rsp]
2019-05-29 16:57:22 +02:00
leave
2019-05-30 20:23:27 +02:00
cleavez
cleavenz
2019-05-29 16:57:22 +02:00
2019-05-16 19:49:51 +02:00
pushf
2019-05-16 18:45:00 +02:00
#
# Supervisor only instructions
#
2019-05-16 19:49:51 +02:00
popf
2019-05-16 16:48:45 +02:00
cli
sti
2019-05-15 21:47:08 +02:00
2019-05-30 13:25:30 +02:00
#
# Misc. instructions
#
2019-05-29 16:57:22 +02:00
# Prints a character on the screen
2019-06-02 16:33:28 +02:00
prn rim
2019-05-29 16:57:22 +02:00
2019-05-30 13:25:30 +02:00
#
# Debugging instructions
#
break
2019-05-30 20:27:49 +02:00
cbreakz
cbreaknz
2019-05-30 13:25:30 +02:00