summaryrefslogtreecommitdiffstats
path: root/sys/dev/ppc/ppc.c
diff options
context:
space:
mode:
authornsouch <nsouch@FreeBSD.org>1999-01-30 15:35:39 +0000
committernsouch <nsouch@FreeBSD.org>1999-01-30 15:35:39 +0000
commit10ef2b8422913dafa8c05f64b5d0c07a3d2ad9c0 (patch)
tree40df97b8849853b739d2d4fdbd234d29a62ee63a /sys/dev/ppc/ppc.c
parentc9bc4bf0090c71bd80805b53e37129f6052a7407 (diff)
downloadFreeBSD-src-10ef2b8422913dafa8c05f64b5d0c07a3d2ad9c0.zip
FreeBSD-src-10ef2b8422913dafa8c05f64b5d0c07a3d2ad9c0.tar.gz
Distinguish EPP address/data register. Add EPP address register access to ppi.
Change microseq offsets. Previously, offsets of the program counter where added to the index of the current microinstruction. Make them rely on the index of the next executed microinstruction. Suggested by: Luigi Rizzo <luigi@labinfo.iet.unipi.it>
Diffstat (limited to 'sys/dev/ppc/ppc.c')
-rw-r--r--sys/dev/ppc/ppc.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/sys/dev/ppc/ppc.c b/sys/dev/ppc/ppc.c
index bd6249b..65e3216 100644
--- a/sys/dev/ppc/ppc.c
+++ b/sys/dev/ppc/ppc.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: ppc.c,v 1.14 1999/01/10 12:04:53 nsouch Exp $
+ * $Id: ppc.c,v 1.15 1999/01/10 16:41:13 nsouch Exp $
*
*/
#include "ppc.h"
@@ -116,14 +116,16 @@ static void ppc_insl_epp(int unit, char *addr, int cnt) {
static u_char ppc_rdtr(int unit) { return r_dtr(ppcdata[unit]); }
static u_char ppc_rstr(int unit) { return r_str(ppcdata[unit]); }
static u_char ppc_rctr(int unit) { return r_ctr(ppcdata[unit]); }
-static u_char ppc_repp(int unit) { return r_epp(ppcdata[unit]); }
+static u_char ppc_repp_A(int unit) { return r_epp_A(ppcdata[unit]); }
+static u_char ppc_repp_D(int unit) { return r_epp_D(ppcdata[unit]); }
static u_char ppc_recr(int unit) { return r_ecr(ppcdata[unit]); }
static u_char ppc_rfifo(int unit) { return r_fifo(ppcdata[unit]); }
static void ppc_wdtr(int unit, char byte) { w_dtr(ppcdata[unit], byte); }
static void ppc_wstr(int unit, char byte) { w_str(ppcdata[unit], byte); }
static void ppc_wctr(int unit, char byte) { w_ctr(ppcdata[unit], byte); }
-static void ppc_wepp(int unit, char byte) { w_epp(ppcdata[unit], byte); }
+static void ppc_wepp_A(int unit, char byte) { w_epp_A(ppcdata[unit], byte); }
+static void ppc_wepp_D(int unit, char byte) { w_epp_D(ppcdata[unit], byte); }
static void ppc_wecr(int unit, char byte) { w_ecr(ppcdata[unit], byte); }
static void ppc_wfifo(int unit, char byte) { w_fifo(ppcdata[unit], byte); }
@@ -151,8 +153,8 @@ static struct ppb_adapter ppc_smclike_adapter = {
ppc_outsb_epp, ppc_outsw_epp, ppc_outsl_epp,
ppc_insb_epp, ppc_insw_epp, ppc_insl_epp,
- ppc_rdtr, ppc_rstr, ppc_rctr, ppc_repp, ppc_recr, ppc_rfifo,
- ppc_wdtr, ppc_wstr, ppc_wctr, ppc_wepp, ppc_wecr, ppc_wfifo
+ ppc_rdtr, ppc_rstr, ppc_rctr, ppc_repp_A, ppc_repp_D, ppc_recr, ppc_rfifo,
+ ppc_wdtr, ppc_wstr, ppc_wctr, ppc_wepp_A, ppc_wepp_D, ppc_wecr, ppc_wfifo
};
static struct ppb_adapter ppc_generic_adapter = {
@@ -168,8 +170,8 @@ static struct ppb_adapter ppc_generic_adapter = {
ppc_outsb_epp, ppc_outsw_epp, ppc_outsl_epp,
ppc_insb_epp, ppc_insw_epp, ppc_insl_epp,
- ppc_rdtr, ppc_rstr, ppc_rctr, ppc_repp, ppc_recr, ppc_rfifo,
- ppc_wdtr, ppc_wstr, ppc_wctr, ppc_wepp, ppc_wecr, ppc_wfifo
+ ppc_rdtr, ppc_rstr, ppc_rctr, ppc_repp_A, ppc_repp_D, ppc_recr, ppc_rfifo,
+ ppc_wdtr, ppc_wstr, ppc_wctr, ppc_wepp_A, ppc_wepp_D, ppc_wecr, ppc_wfifo
};
/*
@@ -1228,24 +1230,21 @@ ppc_exec_microseq(int unit, struct ppb_microseq **p_msq)
case MS_OP_DBRA:
if (--ppc->ppc_accum > 0)
mi += mi->arg[0].i;
- else
- INCR_PC;
+ INCR_PC;
break;
case MS_OP_BRSET:
cc = r_str(ppc);
if ((cc & (char)mi->arg[0].i) == (char)mi->arg[0].i)
mi += mi->arg[1].i;
- else
- INCR_PC;
+ INCR_PC;
break;
case MS_OP_BRCLEAR:
cc = r_str(ppc);
if ((cc & (char)mi->arg[0].i) == 0)
mi += mi->arg[1].i;
- else
- INCR_PC;
+ INCR_PC;
break;
case MS_OP_BRSTAT:
@@ -1253,8 +1252,7 @@ ppc_exec_microseq(int unit, struct ppb_microseq **p_msq)
if ((cc & ((char)mi->arg[0].i | (char)mi->arg[1].i)) ==
(char)mi->arg[0].i)
mi += mi->arg[2].i;
- else
- INCR_PC;
+ INCR_PC;
break;
case MS_OP_C_CALL:
OpenPOWER on IntegriCloud