1
0
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:
julianb0 2019-06-14 12:40:49 +02:00
parent e9a26fa24b
commit d2911d6602
No known key found for this signature in database
GPG Key ID: 9C7ACF0C053FB8A1
4 changed files with 37 additions and 32 deletions

View File

@ -5,6 +5,8 @@
; Main function
;
main:
mov rbx, 10
lea rax, b[rbx + -1]
ret
stosb_test:

View File

@ -308,32 +308,6 @@ cmpxchg rm rim
# 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)
#
@ -503,9 +477,6 @@ movsb r r
# Supervisor only instructions #
#---------------------------------------------------------------------------#
pushf
popf
#
# Call an architecture-reserved function slot of device (DEVCTL)
#
@ -632,4 +603,34 @@ cla
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
#---------------------------------------------------------------------------#

View File

@ -50,8 +50,9 @@ for _, line in enumerate(fi):
cond = False
if tok[0][0] == '!':
assert(len(tok[0]) > 1)
tok[0] = tok[0][1:]
#assert(len(tok[0]) > 1)
#tok[0] = tok[0][1:]
continue
i = tok[0].strip()

View File

@ -239,7 +239,8 @@ void extract_param(ctx_t *ctx, acc_t *p, uchar fmt)
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;