Use %ecx instead of %ebx for the scratch register while updating %dr7 since

%ecx isn't a call safe register and thus we don't have to save and restore
it.

Submitted by:	bde
This commit is contained in:
John Baldwin 2001-10-25 16:52:43 +00:00
parent 7df8a724c2
commit 02c41f11e3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=85490
3 changed files with 9 additions and 15 deletions

View File

@ -281,11 +281,9 @@ cpu_switch_load_gs:
movl %eax,%dr0
movl %dr7,%eax /* load dr7 so as not to */
andl $0x0000fc00,%eax /* disturb reserved bits */
pushl %ebx
movl PCB_DR7(%edx),%ebx
andl $~0x0000fc00,%ebx /* re-enable the restored watchpoints */
orl %ebx,%eax
popl %ebx
movl PCB_DR7(%edx),%ecx
andl $~0x0000fc00,%ecx /* re-enable the restored watchpoints */
orl %ecx,%eax
movl %eax,%dr7
1:
ret

View File

@ -281,11 +281,9 @@ cpu_switch_load_gs:
movl %eax,%dr0
movl %dr7,%eax /* load dr7 so as not to */
andl $0x0000fc00,%eax /* disturb reserved bits */
pushl %ebx
movl PCB_DR7(%edx),%ebx
andl $~0x0000fc00,%ebx /* re-enable the restored watchpoints */
orl %ebx,%eax
popl %ebx
movl PCB_DR7(%edx),%ecx
andl $~0x0000fc00,%ecx /* re-enable the restored watchpoints */
orl %ecx,%eax
movl %eax,%dr7
1:
ret

View File

@ -281,11 +281,9 @@ cpu_switch_load_gs:
movl %eax,%dr0
movl %dr7,%eax /* load dr7 so as not to */
andl $0x0000fc00,%eax /* disturb reserved bits */
pushl %ebx
movl PCB_DR7(%edx),%ebx
andl $~0x0000fc00,%ebx /* re-enable the restored watchpoints */
orl %ebx,%eax
popl %ebx
movl PCB_DR7(%edx),%ecx
andl $~0x0000fc00,%ecx /* re-enable the restored watchpoints */
orl %ecx,%eax
movl %eax,%dr7
1:
ret