summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2013-03-03 07:02:02 (GMT)
committerH. Peter Anvin <hpa@zytor.com>2013-03-03 07:02:31 (GMT)
commitc5c0c14c1375029dffa8d7bbca05f871b82c39c1 (patch)
tree68e3d84fb0cf8bdf397fb16325064aa1412eac8f
parentc3275484580e8b5be08156bb08c85beee614b248 (diff)
downloadvirtio9p-c5c0c14c1375029dffa8d7bbca05f871b82c39c1.zip
virtio9p-c5c0c14c1375029dffa8d7bbca05f871b82c39c1.tar.gz
virtio9p-c5c0c14c1375029dffa8d7bbca05f871b82c39c1.tar.bz2
virtio9p-c5c0c14c1375029dffa8d7bbca05f871b82c39c1.tar.xz
Minor cleanups
Change the assembly code to be a bit easier to read, hopefully
-rw-r--r--acc.S7
-rw-r--r--start.S6
2 files changed, 8 insertions, 5 deletions
diff --git a/acc.S b/acc.S
index dc10fd6..a8cc15a 100644
--- a/acc.S
+++ b/acc.S
@@ -117,12 +117,13 @@ fxn_unknown = acc_never
.globl acc_cds
acc_cds:
lfsw dos_sdafn,%si
- cmpw $CDS_MAGIC,%fs:(SDF_CDS+CDS_DPBPTR)(%si) /* Our magic? */
+ addw $SDF_CDS,%si
+ cmpw $CDS_MAGIC,%fs:CDS_DPBPTR(%si) /* Our magic? */
jne acc_fail
movb drive_letter,%al
- cmpb %al,%fs:(SDF_CDS+CDS_PATH+0)(%si) /* Our drive letter? */
+ cmpb %al,%fs:(CDS_PATH+0)(%si) /* Our drive letter? */
jne acc_fail
- cmpw $0x5c3a,%fs:(SDF_CDS+CDS_PATH+1)(%si) /* Path starts with X:\? */
+ cmpw $0x5c3a,%fs:(CDS_PATH+1)(%si) /* Path starts with X:\? */
jne acc_fail
/* XXX: check for a character device */
/* CF = 0 if equal */
diff --git a/start.S b/start.S
index 56f5f19..601af42 100644
--- a/start.S
+++ b/start.S
@@ -639,8 +639,10 @@ send_attach:
movw %es,int2f_chain+2
lesw our_cds,%bx
- andw $~0xf080,%es:CDS_FLAGS(%bx) /* Clear undesired flags */
- orb $0xc0,%es:(CDS_FLAGS+1)(%bx) /* Network drive, physical, real */
+ movw %es:CDS_FLAGS(%bx),%ax
+ andw $~0xf080,%ax /* Clear undesired flags */
+ orb $0xc0,%ah /* Network drive, physical, real */
+ movw %ax,%es:CDS_FLAGS(%bx)
movl $0x005c3a00,%eax
movb drive_letter,%al /* Now %eax = "X:\" + NUL for the proper X */