PATCH to cp/ir.texi: Document complex numbers
Gabriel Dos Reis
gdr@codesourcery.com
Fri Apr 21 15:27:00 GMT 2000
This patchlet documents __complex__ and related macros and data types
inside gcc/g++. OK?
-- Gaby
CodeSourcery, LLC http://www.codesourcery.com
2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
* ir.texi: Document complex number representation.
Index: ir.texi
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/ir.texi,v
retrieving revision 1.26
diff -p -r1.26 ir.texi
*** ir.texi 2000/02/17 20:45:49 1.26
--- ir.texi 2000/04/21 22:03:44
*************** double} types. The number of bits in th
*** 442,448 ****
is given by @code{TYPE_PRECISION}, as in the @code{INTEGER_TYPE} case.
@item COMPLEX_TYPE
! FIXME: The __complex__ extension is supported in G++. Document.
@item ENUMERAL_TYPE
Used to represent an enumeration type. The @code{TYPE_PRECISION} gives
--- 442,449 ----
is given by @code{TYPE_PRECISION}, as in the @code{INTEGER_TYPE} case.
@item COMPLEX_TYPE
! Used to represent GCC builtin @code{__complex__} data types. The
! @code{TREE_TYPE} is the type of the real and imaginary parts.
@item ENUMERAL_TYPE
Used to represent an enumeration type. The @code{TYPE_PRECISION} gives
*************** The @code{WHILE_BODY} is the body of the
*** 1459,1464 ****
--- 1460,1466 ----
@findex tree_int_cst_lt
@findex tree_int_cst_equal
@tindex REAL_CST
+ @tindex COMPLEX_CST
@tindex STRING_CST
@findex TREE_STRING_LENGTH
@findex TREE_STRING_POINTER
*************** The @code{WHILE_BODY} is the body of the
*** 1473,1478 ****
--- 1475,1484 ----
@tindex INDIRECT_REF
@tindex FIX_TRUNC_EXPR
@tindex FLOAT_EXPR
+ @tindex COMPLEX_EXPR
+ @tindex CONJ_EXPR
+ @tindex REALPART_EXPR
+ @tindex IMAGPART_EXPR
@tindex NOP_EXPR
@tindex CONVERT_EXPR
@tindex THROW_EXPR
*************** its bit-pattern.
*** 1591,1596 ****
--- 1597,1608 ----
FIXME: Talk about how to obtain representations of this constant, do
comparisons, and so forth.
+ @item COMPLEX_CST
+ These nodes are used to represent complex number constants, that is a
+ @code{__complex__} whose parts are constant nodes. The
+ @code{TREE_REALPART} (resp. @code@TREE_IMAGPART}) returns the real part
+ (resp. the imaginary part).
+
@item STRING_CST
These nodes represent string-constants. The @code{TREE_STRING_LENGTH}
returns the length of the string, as an @code{int}. The
*************** the complete expression will have a floa
*** 1681,1686 ****
--- 1693,1711 ----
FIXME: How is the operand supposed to be rounded? Is this dependent on
-mieee?
+
+ @item COMPLEX_EXPR
+ These nodes are used to represent complex numbers constructed from two
+ expressions of the same (integer or real) type. The first operand is the
+ real part and the second operand is the imaginary part.
+
+ @item CONJ_EXPR
+ These nodes represent the conjugate of their operand.
+
+ @item REALPART_EXPR
+ @item IMAGPART_EXPR
+ These nodes represent respectively the real and the imaginary parts
+ of complex numbers (their sole argument).
@item NON_LVALUE_EXPR
These nodes indicate that their one and only operand is not an lvalue.
More information about the Gcc-patches
mailing list