diff options
author | jhb <jhb@FreeBSD.org> | 2001-10-25 16:52:43 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-10-25 16:52:43 +0000 |
commit | 3b0708baaa383752c65fd09bd69d9d79e6857817 (patch) | |
tree | 811dbb6147997f50d7ec090db6700709109ddefe /sys | |
parent | 655d637879dec802b6cd0cc8cfd51ecde797e30d (diff) | |
download | FreeBSD-src-3b0708baaa383752c65fd09bd69d9d79e6857817.zip FreeBSD-src-3b0708baaa383752c65fd09bd69d9d79e6857817.tar.gz |
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
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/amd64/cpu_switch.S | 8 | ||||
-rw-r--r-- | sys/amd64/amd64/swtch.s | 8 | ||||
-rw-r--r-- | sys/i386/i386/swtch.s | 8 |
3 files changed, 9 insertions, 15 deletions
diff --git a/sys/amd64/amd64/cpu_switch.S b/sys/amd64/amd64/cpu_switch.S index 97958fc..c664c29 100644 --- a/sys/amd64/amd64/cpu_switch.S +++ b/sys/amd64/amd64/cpu_switch.S @@ -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 diff --git a/sys/amd64/amd64/swtch.s b/sys/amd64/amd64/swtch.s index 97958fc..c664c29 100644 --- a/sys/amd64/amd64/swtch.s +++ b/sys/amd64/amd64/swtch.s @@ -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 diff --git a/sys/i386/i386/swtch.s b/sys/i386/i386/swtch.s index 97958fc..c664c29 100644 --- a/sys/i386/i386/swtch.s +++ b/sys/i386/i386/swtch.s @@ -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 |