aboutsummaryrefslogtreecommitdiff
path: root/sys/arch/amd64
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-02-20 13:12:27 -0500
committerIan Moffett <ian@osmora.org>2025-02-20 13:12:27 -0500
commit6bbe7ef049bc1b9d150a21ccd082c2f65f344682 (patch)
tree49c040189ca5d9242297fbcdbfbfc1a7b1ea64de /sys/arch/amd64
parent6018ed09c35b35343cf64133529850ddc8071138 (diff)
kernel/amd64: i8237: Optimize set channel select
There is no need for an intermediary register before setting %AL. This commit removes redundant instructions to reduce the amount of cycles used for this operation. Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r--sys/arch/amd64/isa/i8237.S5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/arch/amd64/isa/i8237.S b/sys/arch/amd64/isa/i8237.S
index 00b5bd9..ef6090a 100644
--- a/sys/arch/amd64/isa/i8237.S
+++ b/sys/arch/amd64/isa/i8237.S
@@ -95,9 +95,8 @@ i8237_set_mode:
jg 1f
/* Set channel select bits */
- mov %dil, %bl
- andb $3, %bl
- mov %bl, %al
+ mov %dil, %al
+ andb $3, %al
/* Set channel mode bits */
mov %sil, %dl