simplify primitive code
This commit is contained in:
parent
2ceb9f75da
commit
96ebc29630
27
jumpforth.S
27
jumpforth.S
|
|
@ -1145,8 +1145,7 @@ defcode FROMR,"R>"
|
||||||
|
|
||||||
/* ( R: a -- a ) ( -- a ) */
|
/* ( R: a -- a ) ( -- a ) */
|
||||||
defcode RFETCH,"R@"
|
defcode RFETCH,"R@"
|
||||||
movl (%ebp),%eax
|
pushl (%ebp)
|
||||||
push %eax
|
|
||||||
NEXT
|
NEXT
|
||||||
|
|
||||||
/* ( R: xu ... x0 -- xu ... x0 ) ( S: u -- xu ) */
|
/* ( R: xu ... x0 -- xu ... x0 ) ( S: u -- xu ) */
|
||||||
|
|
@ -1173,10 +1172,8 @@ defcode TWOFROMR,"2R>"
|
||||||
|
|
||||||
/* ( R: a b -- a b ) ( -- a b ) */
|
/* ( R: a b -- a b ) ( -- a b ) */
|
||||||
defcode TWORFETCH,"2R@"
|
defcode TWORFETCH,"2R@"
|
||||||
movl (%ebp),%ebx
|
pushl 4(%ebp)
|
||||||
movl 4(%ebp),%eax
|
pushl (%ebp)
|
||||||
push %eax
|
|
||||||
push %ebx
|
|
||||||
NEXT
|
NEXT
|
||||||
|
|
||||||
/* ( xu ... x1 u -- ) ( R: -- xu ... x1 u ) */
|
/* ( xu ... x1 u -- ) ( R: -- xu ... x1 u ) */
|
||||||
|
|
@ -1296,15 +1293,15 @@ defcode EXECUTE
|
||||||
|
|
||||||
/* ( ebx ecx edx esi edi ebp eax/sc -- eax/result ) */
|
/* ( ebx ecx edx esi edi ebp eax/sc -- eax/result ) */
|
||||||
defcode SYSCALL6
|
defcode SYSCALL6
|
||||||
|
mov %ebp,%ecx
|
||||||
|
mov %esi,%ebx
|
||||||
pop %eax
|
pop %eax
|
||||||
movl 16(%esp),%ecx
|
|
||||||
movl %ebp,16(%esp)
|
|
||||||
pop %ebp
|
pop %ebp
|
||||||
pop %edi
|
pop %edi
|
||||||
movl 12(%esp),%ebx
|
|
||||||
movl %esi,12(%esp)
|
|
||||||
pop %esi
|
pop %esi
|
||||||
pop %edx
|
pop %edx
|
||||||
|
xchg %ecx,(%esp)
|
||||||
|
xchg %ebx,4(%esp)
|
||||||
int $0x80
|
int $0x80
|
||||||
pop %ebp
|
pop %ebp
|
||||||
pop %esi
|
pop %esi
|
||||||
|
|
@ -1313,13 +1310,13 @@ defcode SYSCALL6
|
||||||
|
|
||||||
/* ( ebx ecx edx esi edi eax/sc -- eax/result ) */
|
/* ( ebx ecx edx esi edi eax/sc -- eax/result ) */
|
||||||
defcode SYSCALL5
|
defcode SYSCALL5
|
||||||
|
mov %esi,%ebx
|
||||||
pop %eax
|
pop %eax
|
||||||
pop %edi
|
pop %edi
|
||||||
movl 12(%esp),%ebx
|
|
||||||
movl %esi,12(%esp)
|
|
||||||
pop %esi
|
pop %esi
|
||||||
pop %edx
|
pop %edx
|
||||||
pop %ecx
|
pop %ecx
|
||||||
|
xchg %ebx,(%esp)
|
||||||
int $0x80
|
int $0x80
|
||||||
pop %esi
|
pop %esi
|
||||||
push %eax
|
push %eax
|
||||||
|
|
@ -1327,14 +1324,14 @@ defcode SYSCALL5
|
||||||
|
|
||||||
/* ( ebx ecx edx esi eax/sc -- eax/result ) */
|
/* ( ebx ecx edx esi eax/sc -- eax/result ) */
|
||||||
defcode SYSCALL4
|
defcode SYSCALL4
|
||||||
|
mov %esi,%edi
|
||||||
pop %eax
|
pop %eax
|
||||||
movl 12(%esp),%ebx
|
|
||||||
movl %esi,12(%esp)
|
|
||||||
pop %esi
|
pop %esi
|
||||||
pop %edx
|
pop %edx
|
||||||
pop %ecx
|
pop %ecx
|
||||||
|
pop %ebx
|
||||||
int $0x80
|
int $0x80
|
||||||
pop %esi
|
mov %edi,%esi
|
||||||
push %eax
|
push %eax
|
||||||
NEXT
|
NEXT
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue