Changeset 1e891d0 in mainline for uspace/lib/c/arch/ia32/include/ddi.h


Ignore:
Timestamp:
2011-07-24T17:47:13Z (13 years ago)
Author:
Petr Koupy <petr.koupy@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ceb07b9
Parents:
10f4b47c
Message:

Inline assembly in ia32 libc headers made compatible with pcc.

File:
1 edited

Legend:

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

    r10f4b47c r1e891d0  
    4444       
    4545        asm volatile (
    46                 "inb %w[port], %b[val]\n"
    47                 : [val] "=a" (val)
    48                 : [port] "d" (port)
     46                "inb %w1, %b0\n"
     47                : "=a" (val)
     48                : "d" (port)
    4949        );
    5050       
     
    5757       
    5858        asm volatile (
    59                 "inw %w[port], %w[val]\n"
    60                 : [val] "=a" (val)
    61                 : [port] "d" (port)
     59                "inw %w1, %w0\n"
     60                : "=a" (val)
     61                : "d" (port)
    6262        );
    6363       
     
    7070       
    7171        asm volatile (
    72                 "inl %w[port], %[val]\n"
    73                 : [val] "=a" (val)
    74                 : [port] "d" (port)
     72                "inl %w1, %0\n"
     73                : "=a" (val)
     74                : "d" (port)
    7575        );
    7676       
     
    8181{
    8282        asm volatile (
    83                 "outb %b[val], %w[port]\n"
    84                 :: [val] "a" (val), [port] "d" (port)
     83                "outb %b0, %w1\n"
     84                :: "a" (val), "d" (port)
    8585        );
    8686}
     
    8989{
    9090        asm volatile (
    91                 "outw %w[val], %w[port]\n"
    92                 :: [val] "a" (val), [port] "d" (port)
     91                "outw %w0, %w1\n"
     92                :: "a" (val), "d" (port)
    9393        );
    9494}
     
    9797{
    9898        asm volatile (
    99                 "outl %[val], %w[port]\n"
    100                 :: [val] "a" (val), [port] "d" (port)
     99                "outl %0, %w1\n"
     100                :: "a" (val), "d" (port)
    101101        );
    102102}
Note: See TracChangeset for help on using the changeset viewer.