mirror of
https://gitlab.os-k.eu/os-k-team/kvisc.git
synced 2023-08-25 14:05:46 +02:00
killed push/pop
This commit is contained in:
parent
e9a26fa24b
commit
d2911d6602
@ -5,6 +5,8 @@
|
|||||||
; Main function
|
; Main function
|
||||||
;
|
;
|
||||||
main:
|
main:
|
||||||
|
mov rbx, 10
|
||||||
|
lea rax, b[rbx + -1]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
stosb_test:
|
stosb_test:
|
||||||
|
59
vm/in/INSTRS
59
vm/in/INSTRS
@ -308,32 +308,6 @@ cmpxchg rm rim
|
|||||||
# Stack manipulation instructions #
|
# Stack manipulation instructions #
|
||||||
#---------------------------------------------------------------------------#
|
#---------------------------------------------------------------------------#
|
||||||
|
|
||||||
#
|
|
||||||
# PUSH value onto stack
|
|
||||||
#
|
|
||||||
# RSP = RSP - 8
|
|
||||||
# *RSP = $1
|
|
||||||
#
|
|
||||||
# Throws:
|
|
||||||
# #STA if RBP MOD 8 > 0
|
|
||||||
# #STA if RSP MOD 8 > 0
|
|
||||||
# #STU if RSP > RBP
|
|
||||||
#
|
|
||||||
push rim
|
|
||||||
|
|
||||||
#
|
|
||||||
# POP value from stack
|
|
||||||
#
|
|
||||||
# $1 = *RSP
|
|
||||||
# RSP = RSP + 8
|
|
||||||
#
|
|
||||||
# Throws:
|
|
||||||
# #STA if RBP MOD 8 > 0
|
|
||||||
# #STA if RSP MOD 8 > 0
|
|
||||||
# #STU if RSP >= RBP
|
|
||||||
#
|
|
||||||
pop rm
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Unconditional jump with possible return (CALL)
|
# Unconditional jump with possible return (CALL)
|
||||||
#
|
#
|
||||||
@ -503,9 +477,6 @@ movsb r r
|
|||||||
# Supervisor only instructions #
|
# Supervisor only instructions #
|
||||||
#---------------------------------------------------------------------------#
|
#---------------------------------------------------------------------------#
|
||||||
|
|
||||||
pushf
|
|
||||||
popf
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Call an architecture-reserved function slot of device (DEVCTL)
|
# Call an architecture-reserved function slot of device (DEVCTL)
|
||||||
#
|
#
|
||||||
@ -632,4 +603,34 @@ cla
|
|||||||
cln
|
cln
|
||||||
|
|
||||||
#---------------------------------------------------------------------------#
|
#---------------------------------------------------------------------------#
|
||||||
|
# Deprecated and deleted instruction #
|
||||||
|
#---------------------------------------------------------------------------#
|
||||||
|
|
||||||
|
#
|
||||||
|
# PUSH value onto stack
|
||||||
|
#
|
||||||
|
# RSP = RSP - 8
|
||||||
|
# *RSP = $1
|
||||||
|
#
|
||||||
|
# Throws:
|
||||||
|
# #STA if RBP MOD 8 > 0
|
||||||
|
# #STA if RSP MOD 8 > 0
|
||||||
|
# #STU if RSP > RBP
|
||||||
|
#
|
||||||
|
!push rim
|
||||||
|
|
||||||
|
#
|
||||||
|
# POP value from stack
|
||||||
|
#
|
||||||
|
# $1 = *RSP
|
||||||
|
# RSP = RSP + 8
|
||||||
|
#
|
||||||
|
# Throws:
|
||||||
|
# #STA if RBP MOD 8 > 0
|
||||||
|
# #STA if RSP MOD 8 > 0
|
||||||
|
# #STU if RSP >= RBP
|
||||||
|
#
|
||||||
|
!pop rm
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------#
|
||||||
|
|
||||||
|
@ -50,8 +50,9 @@ for _, line in enumerate(fi):
|
|||||||
|
|
||||||
cond = False
|
cond = False
|
||||||
if tok[0][0] == '!':
|
if tok[0][0] == '!':
|
||||||
assert(len(tok[0]) > 1)
|
#assert(len(tok[0]) > 1)
|
||||||
tok[0] = tok[0][1:]
|
#tok[0] = tok[0][1:]
|
||||||
|
continue
|
||||||
|
|
||||||
i = tok[0].strip()
|
i = tok[0].strip()
|
||||||
|
|
||||||
|
@ -239,7 +239,8 @@ void extract_param(ctx_t *ctx, acc_t *p, uchar fmt)
|
|||||||
p->imm2 = 0;
|
p->imm2 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
p->addr = R(p->reg1) + R(p->reg2) * p->imm1 + p->imm2;
|
p->addr = R(p->reg1) + R(p->reg2) * p->imm1
|
||||||
|
+ (long)(short)p->imm2;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user