Don't overflow the ktr buffer <gulp>.

This commit is contained in:
Jake Burkholder 2001-09-30 18:42:56 +00:00
parent c81f893d0c
commit 75c6786401

View File

@ -47,6 +47,7 @@
/*
* XXX doesn't do timestamp or ktr_cpu.
* XXX could really use another register.
*/
#define ATR(desc, r1, r2, r3, l1, l2) \
.sect .rodata ; \
@ -55,6 +56,9 @@ l1 ## : .asciz desc ; \
set ktr_idx, r1 ; \
lduw [r1], r2 ; \
l2 ## : add r2, 1, r3 ; \
set KTR_ENTRIES - 1, r1 ; \
and r3, r1, r3 ; \
set ktr_idx, r1 ; \
casa [r1] ASI_N, r2, r3 ; \
cmp r2, r3 ; \
bne %icc, l2 ## b ; \