From 3b19d65897db69f1ce2f91bcd581ab76d1c880cf Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 15 Jan 2007 01:54:13 +0000 Subject: [PATCH] Terminology change: drop 'integral' completely. Now we just have integer, which includes i1. Change the semantics of the various instructions to support i1 where they didn't before: for example, it is now legal [though not terribly useful, as it is the same as xor] to add two i1 values. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33217 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/LangRef.html | 49 +++++++++++++++++++++-------------------------- 1 file changed, 22 insertions(+), 27 deletions(-) diff --git a/docs/LangRef.html b/docs/LangRef.html index e7fc5396a8a..b4dc3f975f1 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -772,8 +772,8 @@ system. The current set of primitive types is as follows:

TypeDescription voidNo value - i8Signless 8-bit value - i32Signless 32-bit value + i88-bit value + i3232-bit value float32-bit floating point value labelBranch destination @@ -784,8 +784,8 @@ system. The current set of primitive types is as follows:

TypeDescription i1True or False value - i16Signless 16-bit value - i64Signless 64-bit value + i1616-bit value + i6464-bit value double64-bit floating point value @@ -806,12 +806,7 @@ classifications:

ClassificationTypes integer - i8, i16, i32, i64 - - - integral - i1, i8, i16, i32, i64 - + i1, i8, i16, i32, i64 floating point @@ -1059,7 +1054,7 @@ considered first class.

The number of elements is a constant integer value; elementtype may -be any integral or floating point type.

+be any integer or floating point type.

Examples:
@@ -1266,15 +1261,15 @@ following is the syntax for constant expressions:

trunc ( CST to TYPE )
Truncate a constant to another type. The bit size of CST must be larger - than the bit size of TYPE. Both types must be integral.
+ than the bit size of TYPE. Both types must be integers.
zext ( CST to TYPE )
Zero extend a constant to another type. The bit size of CST must be - smaller or equal to the bit size of TYPE. Both types must be integral.
+ smaller or equal to the bit size of TYPE. Both types must be integers.
sext ( CST to TYPE )
Sign extend a constant to another type. The bit size of CST must be - smaller or equal to the bit size of TYPE. Both types must be integral.
+ smaller or equal to the bit size of TYPE. Both types must be integers.
fptrunc ( CST to TYPE )
Truncate a floating point constant to another floating point type. The @@ -1951,7 +1946,7 @@ Instruction its two operands.

Arguments:

The two arguments to the 'and' instruction must be integral values. Both arguments must have + href="#t_integer">integer values. Both arguments must have identical types.

Semantics:

The truth table used for the 'and' instruction is:

@@ -2004,7 +1999,7 @@ identical types.

or of its two operands.

Arguments:

The two arguments to the 'or' instruction must be integral values. Both arguments must have + href="#t_integer">integer values. Both arguments must have identical types.

Semantics:

The truth table used for the 'or' instruction is:

@@ -2059,7 +2054,7 @@ or of its two operands. The xor is used to implement the "one's complement" operation, which is the "~" operator in C.

Arguments:

The two arguments to the 'xor' instruction must be integral values. Both arguments must have + href="#t_integer">integer values. Both arguments must have identical types.

Semantics:

The truth table used for the 'xor' instruction is:

@@ -2698,7 +2693,7 @@ The 'trunc' instruction truncates its operand to the type ty2.

The 'trunc' instruction takes a value to trunc, which must be an integer type, and a type that specifies the size -and type of the result, which must be an integral +and type of the result, which must be an integer type. The bit size of value must be larger than the bit size of ty2. Equal sized types are not allowed.

@@ -2735,8 +2730,8 @@ It will always truncate bits.

Arguments:

The 'zext' instruction takes a value to cast, which must be of -integral type, and a type to cast it to, which must -also be of integral type. The bit size of the +integer type, and a type to cast it to, which must +also be of integer type. The bit size of the value must be smaller than the bit size of the destination type, ty2.

@@ -2773,8 +2768,8 @@ changes).

Arguments:

The 'sext' instruction takes a value to cast, which must be of -integral type, and a type to cast it to, which must -also be of integral type. The bit size of the +integer type, and a type to cast it to, which must +also be of integer type. The bit size of the value must be smaller than the bit size of the destination type, ty2.

@@ -2887,7 +2882,7 @@ unsigned integer equivalent of type ty2.
Arguments:

The 'fp2uint' instruction takes a value to cast, which must be a floating point value, and a type to cast it to, which -must be an integral type.

+must be an integer type.

Semantics:

The 'fp2uint' instruction converts its @@ -2927,7 +2922,7 @@ If the value was non-zero, the i1 result will be true.

Arguments:

The 'fptosi' instruction takes a value to cast, which must be a floating point value, and a type to cast it to, which -must also be an integral type.

+must also be an integer type.

Semantics:

The 'fptosi' instruction converts its @@ -2965,7 +2960,7 @@ integer and converts that value to the ty2 type.

Arguments:

The 'uitofp' instruction takes a value to cast, which must be an -integral value, and a type to cast it to, which must +integer value, and a type to cast it to, which must be a floating point type.

Semantics:
@@ -2998,7 +2993,7 @@ integer and converts that value to the ty2 type.

Arguments:

The 'sitofp' instruction takes a value to cast, which must be an -integral value, and a type to cast it to, which must be +integer value, and a type to cast it to, which must be a floating point type.

Semantics:
@@ -3157,7 +3152,7 @@ a value, just a keyword. The possibilities for the condition code are:
  • slt: signed less than
  • sle: signed less or equal
  • -

    The remaining two arguments must be integral or +

    The remaining two arguments must be integer or pointer typed. They must also be identical types.

    Semantics:

    The 'icmp' compares var1 and var2 according to