Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/vax/vax Bugfixes for emulated instructions MOVTC an...
details: https://anonhg.NetBSD.org/src/rev/7f4e4acf2c5f
branches: trunk
changeset: 555829:7f4e4acf2c5f
user: ragge <ragge%NetBSD.org@localhost>
date: Sun Nov 30 10:02:21 2003 +0000
description:
Bugfixes for emulated instructions MOVTC and MOVTUC, from Bertram Barth:
> - condition-codes should be set from (unmodified) srclen vs. dstlen
> instead from the modified (register-) values after completion.
>
> - for MOVTUC the V-bit should be set if the esc-char was found.
>
> - the arguments for comparison should be reversed.
>
> - count is unsigned word, but for condition-codes the comparison
> should be done with signed words (ie. N = srclen LSS dstlen)
diffstat:
sys/arch/vax/vax/emulate.S | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diffs (50 lines):
diff -r b4c9989df883 -r 7f4e4acf2c5f sys/arch/vax/vax/emulate.S
--- a/sys/arch/vax/vax/emulate.S Sun Nov 30 09:22:25 2003 +0000
+++ b/sys/arch/vax/vax/emulate.S Sun Nov 30 10:02:21 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: emulate.S,v 1.3 2003/08/07 16:30:18 agc Exp $ */
+/* $NetBSD: emulate.S,v 1.4 2003/11/30 10:02:21 ragge Exp $ */
/*
* Copyright (c) 1986, 1987 The Regents of the University of California.
* All rights reserved.
@@ -126,7 +126,7 @@
movb %r11,(%r5)+
sobgtr %r4,Lmovtc_2loop
Lmovtc_out:
- cmpl %r4,%r0
+ cmpw arg1,arg5
savepsl
clrl %r2
return
@@ -140,21 +140,27 @@
argl(4,%r3) # (4) table address == %r3
argl(6,%r5) # (6) destination address == %r5
arguw(5,%r4) # (5) destination length == %r4
- jeql Lmovtuc_out
+ jeql Lmovtuc_out1
Lmovtuc_loop:
tstl %r0
- jeql Lmovtuc_out
+ jeql Lmovtuc_out1
movzbl (%r1),%r2
movzbl (%r3)[%r2],%r2
cmpl %r2,%r11
- jeql Lmovtuc_out
+ jeql Lmovtuc_out2
movzbl (%r1)+,%r2
movb (%r3)[%r2],(%r5)+
decl %r0
sobgtr %r4,Lmovtuc_loop
+Lmovtuc_out1:
+ clrl %r2 # clear V-bit
+ brb Lmovtuc_out
+Lmovtuc_out2:
+ movl $2,%r2 # set V-bit
Lmovtuc_out:
- cmpl %r4,%r0
+ cmpw arg1,arg5
savepsl
+ bisl2 %r2,4(%sp) # merge V-bit into psl
clrl %r2
return
Home |
Main Index |
Thread Index |
Old Index