~kris/9p

9hist

320e99cb8d87bdc267a8cd6daec0f2dee873bb49 — David du Colombier 32 years ago 1833a12
Plan 9 from Bell Labs 1994-03-09
5 files changed, 24 insertions(+), 40 deletions(-)

M carrera/clock.c
M carrera/fns.h
M carrera/l.s
M port/portdat.h
M port/qio.c
M carrera/clock.c => carrera/clock.c +2 -0
@@ 76,6 76,8 @@ clock(Ureg *ur)
		m->load = (m->load*19+nrun)/20;
	}

	ifjab();

	kproftimer(ur->pc);

	kmapinval();

M carrera/fns.h => carrera/fns.h +2 -1
@@ 91,7 91,6 @@ int		tas(ulong*);
void		tlbinit(void);
ulong		tlbvirt(void);
void		touser(void*);
ulong		uvmove(uvlong*, uvlong*);
void		vecinit(void);
void		vector0(void);
void		vector100(void);


@@ 125,7 124,9 @@ ushort	nhgets(void*);

void	ifwrite(void*, Block*);
void*	ifinit(int);
void	ifjab(void);
void	fiberint(int);
ulong	ifaddr(void*);
void	audiosbintr(void);
void	audiodmaintr(void);
ulong	fwblock(void*, void*, ulong);

M carrera/l.s => carrera/l.s +19 -38
@@ 791,7 791,6 @@ ccache:
	RET
	
TEXT	getcallerpc(SB), $0

	MOVW	0(SP), R1
	RET



@@ 804,43 803,6 @@ TEXT	wrcompare(SB), $0
	MOVW	R1, M(COMPARE)
	RET

TEXT	uvmove(SB), $-4
	AND	$7, R1, R2
	MOVW	4(FP), R3
	BNE	R2, uvgetuna
	/* aligned load */
	LD	(0,(1), 2)
	WAIT
	MOVW	R2, R1
	DSLL	(16,1,1)
	DSLL	(16,1,1)
	DSRA	(16,1,1)
	DSRA	(16,1,1)
uvput:
	AND	$7, R3, R4
	BNE	R4, uvputuna
	/* aligned store */
	STD	(2, 0,(3))
	NOP
	RET

	/* unaligned load */
uvgetuna:
	MOVW	0(R1),R2
	MOVW	4(R1),R1
	DSLL	(16,2,2)
	DSLL	(16,2,2)
	OR	R1, R2
	JMP	uvput

	/* unalligned store */
uvputuna:
	DSRA	(16,2,2)
	DSRA	(16,2,2)
	MOVW	R2, 0(R3)
	MOVW	R1, 4(R3)
	RET

TEXT	uvld(SB), $-4		/* uvld(address, dst) */
	MOVW	4(FP), R2
	MOVV	0(R1), R5


@@ 852,3 814,22 @@ TEXT	uvst(SB), $-4		/* uvst(address, src) */
	MOVV	0(R2), R5
	MOVV	R5, 0(R1)
	RET

TEXT	fwblock(SB), $-4	/* wblock(void*port, void *block, csum) */
	MOVW	4(FP), R2
	MOVW	8(FP), R3

	MOVW	$64, R4
fwloop:
	MOVV	0(R2), R5
	MOVV	R5, 0(R1)
	ADDU	R5, R3
	SRLV	$32, R5
	ADDU	R5, R3

	ADD	$8, R2
	SUB	$1, R4
	BNE	R4, fwloop

	MOVW	R3, R1
	RET

M port/portdat.h => port/portdat.h +1 -0
@@ 129,6 129,7 @@ struct Block
	uchar	*base;			/* start of the buffer */
	uchar	flag;
};
#define BLEN(s)	((s)->wp - (s)->rp)

struct Chan
{

M port/qio.c => port/qio.c +0 -1
@@ 46,7 46,6 @@ static Arena arena;
 *  IO queues
 */
typedef struct Queue	Queue;
#define BLEN(b)		((b)->wp - (b)->rp)

struct Queue
{