From 7123e27894e989f8de24990accdafc63dd061bf3 Mon Sep 17 00:00:00 2001 From: John Criswell Date: Fri, 9 Apr 2004 16:43:20 +0000 Subject: [PATCH] Modified the prototypes of the llvm.readport and llvm.writeport intrinsics so that they do not specify specific integer sizes (as those are constrained by the code generator, not the intrinsic itself). Also put these intrinsics into their own "Operating System" section. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12789 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/LangRef.html | 63 ++++++++++++++++++++++++++--------------------- 1 file changed, 35 insertions(+), 28 deletions(-) diff --git a/docs/LangRef.html b/docs/LangRef.html index e6cd7947a24..8b05f11f8ea 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -101,10 +101,13 @@
  1. 'llvm.returnaddress' Intrinsic
  2. 'llvm.frameaddress' Intrinsic
  3. +
+ +
  • Operating System Intrinsics +
    1. 'llvm.readport' Intrinsic
    2. 'llvm.writeport' Intrinsic
    -
  • Standard C Library Intrinsics
    1. 'llvm.memcpy' Intrinsic
    2. @@ -1998,6 +2001,18 @@ source-language caller.

      + + + +
      +

      +These intrinsics are provided by LLVM to support the implementation of +operating system level code. +

      + +
      'llvm.readport' Intrinsic @@ -2007,36 +2022,32 @@ source-language caller.
      Syntax:
      -  call sbyte  (ushort address)* %llvm.readport(ushort <address>)
      -  call ubyte  (ushort address)* %llvm.readport(ushort <address>)
      -  call short  (ushort address)* %llvm.readport(ushort <address>)
      -  call ushort (ushort address)* %llvm.readport(ushort <address>)
      -  call int    (ushort address)* %llvm.readport(ushort <address>)
      -  call uint   (ushort address)* %llvm.readport(ushort <address>)
      +  call <integer type> (<integer type>)* %llvm.readport (<integer type> <address>)
       
      Overview:

      -The 'llvm.readport' intrinsic reads data from the specified I/O port. +The 'llvm.readport' intrinsic reads data from the specified hardware +I/O port.

      Arguments:

      -The argument to this intrinsic indicates the I/O address from which to read -the data. The address is in the I/O address namespace; it is not a memory -location. +The argument to this intrinsic indicates the hardware I/O address from which +to read the data. The address is in the hardware I/O address namespace (as +opposed to being a memory location for memory mapped I/O).

      Semantics:

      -The 'llvm.readport' intrinsic reads data from the I/O port specified -by address and returns the value. The address and return value must -be integers, but the size is dependent upon the platform upon which the -program is code generated. For example, on x86, the address must be a -ushort, and the return value must be 8, 16, or 32 bits. +The 'llvm.readport' intrinsic reads data from the hardware I/O port +specified by address and returns the value. The address and return +value must be integers, but the size is dependent upon the platform upon which +the program is code generated. For example, on x86, the address must be an +unsigned 16 bit value, and the return value must be 8, 16, or 32 bits.

      @@ -2050,26 +2061,22 @@ ushort, and the return value must be 8, 16, or 32 bits.
      Syntax:
      -  call void (ushort address, sbyte value)* %llvm.writeport(ushort <address>, sbyte <value>)
      -  call void (ushort address, ubyte value)* %llvm.writeport(ushort <address>, ubyte <value>)
      -  call void (ushort address, short value)* %llvm.writeport(ushort <address>, short <value>)
      -  call void (ushort address, ushort value)* %llvm.writeport(ushort <address>, ushort <value>)
      -  call void (ushort address, int value)* %llvm.writeport(ushort <address>, int <value>)
      -  call void (ushort address, uint value)* %llvm.writeport(ushort <address>, uint <value>)
      +  call void (<integer type>, <integer type>)* %llvm.writeport (<integer type> <value>, <integer type> <address>)
       
      Overview:

      -The 'llvm.writeport' intrinsic writes data to the specified I/O port. +The 'llvm.writeport' intrinsic writes data to the specified hardware +I/O port.

      Arguments:

      -The first argument to this intrinsic indicates the I/O address to which data -should be written. The address is in the I/O address namespace; it is not a -memory location. +The first argument to this intrinsic indicates the hardware I/O address to +which data should be written. The address is in the hardware I/O address +namespace (as opposed to being a memory location for memory mapped I/O).

      @@ -2082,8 +2089,8 @@ The second argument is the value to write to the I/O port. The 'llvm.writeport' intrinsic writes value to the I/O port specified by address. The address and value must be integers, but the size is dependent upon the platform upon which the program is code generated. -For example, on x86, the address must be a ushort, and the value written must -be 8, 16, or 32 bits in length. +For example, on x86, the address must be an unsigned 16 bit value, and the +value written must be 8, 16, or 32 bits in length.

      -- 2.34.1