diff options
author | jkim <jkim@FreeBSD.org> | 2012-11-30 00:59:37 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2012-11-30 00:59:37 +0000 |
commit | 5bf7bb816cff4dc6155f9faa4b17bf0771aae948 (patch) | |
tree | 7466bac1fd4516cdcb4936fa7dd3a7a7b6b1234b /sys/amd64/pci | |
parent | f9f87022c1a8e1d2f0d80afdc321017f553097ae (diff) | |
download | FreeBSD-src-5bf7bb816cff4dc6155f9faa4b17bf0771aae948.zip FreeBSD-src-5bf7bb816cff4dc6155f9faa4b17bf0771aae948.tar.gz |
Tidy up inline assembly. No functional change.
Diffstat (limited to 'sys/amd64/pci')
-rw-r--r-- | sys/amd64/pci/pci_cfgreg.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/amd64/pci/pci_cfgreg.c b/sys/amd64/pci/pci_cfgreg.c index 2714ecb..34db76c 100644 --- a/sys/amd64/pci/pci_cfgreg.c +++ b/sys/amd64/pci/pci_cfgreg.c @@ -324,15 +324,15 @@ pciereg_cfgread(int bus, unsigned slot, unsigned func, unsigned reg, switch (bytes) { case 4: - __asm __volatile("mov %1, %%eax" : "=a" (data) + __asm __volatile("movl %1, %0" : "=a" (data) : "m" (*(uint32_t *)va)); break; case 2: - __asm __volatile("movzwl %1, %%eax" : "=a" (data) + __asm __volatile("movzwl %1, %0" : "=a" (data) : "m" (*(uint16_t *)va)); break; case 1: - __asm __volatile("movzbl %1, %%eax" : "=a" (data) + __asm __volatile("movzbl %1, %0" : "=a" (data) : "m" (*(uint8_t *)va)); break; } @@ -354,16 +354,16 @@ pciereg_cfgwrite(int bus, unsigned slot, unsigned func, unsigned reg, int data, switch (bytes) { case 4: - __asm __volatile("mov %%eax, %0" : "=m" (*(uint32_t *)va) + __asm __volatile("movl %1, %0" : "=m" (*(uint32_t *)va) : "a" (data)); break; case 2: - __asm __volatile("mov %%ax, %0" : "=m" (*(uint16_t *)va) - : "a" (data)); + __asm __volatile("movw %1, %0" : "=m" (*(uint16_t *)va) + : "a" ((uint16_t)data)); break; case 1: - __asm __volatile("mov %%al, %0" : "=m" (*(uint8_t *)va) - : "a" (data)); + __asm __volatile("movb %1, %0" : "=m" (*(uint8_t *)va) + : "a" ((uint8_t)data)); break; } } |