Changeset 8cc4ddb in mainline for uspace/lib/c/arch/ia32/include/ddi.h


Ignore:
Timestamp:
2011-08-28T21:16:54Z (13 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0f0f8bc
Parents:
1a5b252 (diff), 36e2b55 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/arch/ia32/include/ddi.h

    r1a5b252 r8cc4ddb  
    4343        if (port < (ioport8_t *) IO_SPACE_BOUNDARY) {
    4444                uint8_t val;
     45               
    4546                asm volatile (
    4647                        "inb %w[port], %b[val]\n"
     
    4849                        : [port] "d" (port)
    4950                );
     51               
    5052                return val;
    51         } else {
     53        } else
    5254                return (uint8_t) *port;
    53         }
    5455}
    5556
     
    5859        if (port < (ioport16_t *) IO_SPACE_BOUNDARY) {
    5960                uint16_t val;
     61               
    6062                asm volatile (
    6163                        "inw %w[port], %w[val]\n"
     
    6365                        : [port] "d" (port)
    6466                );
     67               
    6568                return val;
    66         } else {
     69        } else
    6770                return (uint16_t) *port;
    68         }
    6971}
    7072
     
    7375        if (port < (ioport32_t *) IO_SPACE_BOUNDARY) {
    7476                uint32_t val;
     77               
    7578                asm volatile (
    7679                        "inl %w[port], %[val]\n"
     
    7881                        : [port] "d" (port)
    7982                );
     83               
    8084                return val;
    81         } else {
     85        } else
    8286                return (uint32_t) *port;
    83         }
    8487}
    8588
     
    9194                        :: [val] "a" (val), [port] "d" (port)
    9295                );     
    93         } else {
     96        } else
    9497                *port = val;
    95         }
    9698}
    9799
     
    103105                        :: [val] "a" (val), [port] "d" (port)
    104106                );
    105         } else {
     107        } else
    106108                *port = val;
    107         }
    108109}
    109110
     
    115116                        :: [val] "a" (val), [port] "d" (port)
    116117                );
    117         } else {
     118        } else
    118119                *port = val;
    119         }
    120120}
    121121
Note: See TracChangeset for help on using the changeset viewer.