| 362 | size_t count); |
| 363 | |
| 364 | static __inline void |
| 365 | bus_space_read_region_1(bus_space_tag_t tag, bus_space_handle_t bsh, |
| 366 | bus_size_t offset, u_int8_t *addr, size_t count) |
| 367 | { |
| 368 | |
| 369 | if (tag == X86_BUS_SPACE_IO) { |
| 370 | int _port_ = bsh + offset; |
| 371 | #ifdef __GNUCLIKE_ASM |
| 372 | __asm __volatile(" \n\ |
| 373 | 1: inb %w2,%%al \n\ |
| 374 | stosb \n\ |
| 375 | incl %2 \n\ |
| 376 | loop 1b" : |
| 377 | "=D" (addr), "=c" (count), "=d" (_port_) : |
| 378 | "0" (addr), "1" (count), "2" (_port_) : |
| 379 | "%eax", "memory", "cc"); |
| 380 | #endif |
| 381 | } else { |
| 382 | bus_space_handle_t _port_ = bsh + offset; |
| 383 | #ifdef __GNUCLIKE_ASM |
| 384 | __asm __volatile(" \n\ |
| 385 | repne \n\ |
| 386 | movsb" : |
| 387 | "=D" (addr), "=c" (count), "=S" (_port_) : |
| 388 | "0" (addr), "1" (count), "2" (_port_) : |
| 389 | "memory", "cc"); |
| 390 | #endif |
| 391 | } |
| 392 | } |
| 393 | |
| 394 | static __inline void |
| 395 | bus_space_read_region_2(bus_space_tag_t tag, bus_space_handle_t bsh, |