track gratuitous change to sys/i386/include/reg.h

This commit is contained in:
Sam Leffler 2002-10-21 03:47:22 +00:00
parent 8e9dc28535
commit 5100bb69ac
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=105604
2 changed files with 4 additions and 4 deletions

View File

@ -39,7 +39,7 @@ i386_clr_watch(int watchnum, struct dbreg * d)
if (watchnum < 0 || watchnum >= 4)
return -1;
d->dr7 = d->dr7 & ~((0x3 << (watchnum*2)) | (0x0f << (watchnum*4+16)));
DBREG_DRX(d,7) = DBREG_DRX(d,7) & ~((0x3 << (watchnum*2)) | (0x0f << (watchnum*4+16)));
DBREG_DRX(d,watchnum) = 0;
return 0;

View File

@ -41,7 +41,7 @@ i386_set_watch(int watchnum, unsigned int watchaddr, int size,
if (watchnum == -1) {
for (i = 0, mask = 0x3; i < 4; i++, mask <<= 2)
if ((d->dr7 & mask) == 0)
if ((DBREG_DRX(d,7) & mask) == 0)
break;
if (i < 4)
watchnum = i;
@ -72,13 +72,13 @@ i386_set_watch(int watchnum, unsigned int watchaddr, int size,
mask |= access;
/* clear the bits we are about to affect */
d->dr7 &= ~((0x3 << (watchnum*2)) | (0x0f << (watchnum*4+16)));
DBREG_DRX(d,7) &= ~((0x3 << (watchnum*2)) | (0x0f << (watchnum*4+16)));
/* set drN register to the address, N=watchnum */
DBREG_DRX(d,watchnum) = watchaddr;
/* enable the watchpoint */
d->dr7 |= (0x2 << (watchnum*2)) | (mask << (watchnum*4+16));
DBREG_DRX(d,7) |= (0x2 << (watchnum*2)) | (mask << (watchnum*4+16));
return watchnum;
}