Skip to content

Commit

Permalink
Imported Upstream version 4.1.2.nf1
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikita V. Youshchenko committed Sep 28, 2008
1 parent dc51df3 commit 377f250
Show file tree
Hide file tree
Showing 18 changed files with 2,059 additions and 423 deletions.
2 changes: 1 addition & 1 deletion doc/c-tree.texi
Expand Up @@ -2127,7 +2127,7 @@ pointer or reference type.

@item FIX_TRUNC_EXPR
These nodes represent conversion of a floating-point value to an
integer. The single operand will have a floating-point type, while the
integer. The single operand will have a floating-point type, while
the complete expression will have an integral (or boolean) type. The
operand is rounded towards zero.

Expand Down
4 changes: 2 additions & 2 deletions doc/contrib.texi
@@ -1,5 +1,5 @@
@c Copyright (C) 1988,1989,1992,1993,1994,1995,1996,1997,1998,1999,2000,
@c 2001,2002,2003,2004,2005,2006 Free Software Foundation, Inc.
@c 2001,2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc.
@c This is part of the GCC manual.
@c For copying conditions, see the file gcc.texi.

Expand Down Expand Up @@ -547,7 +547,7 @@ improvements, and string clean up and testsuites.

@item
All of the Mauve project
@uref{http://sources.redhat.com/cgi-bin/cvsweb.cgi/~checkout~/mauve/THANKS?rev=1.2&cvsroot=mauve&only_with_tag=HEAD,,contributors},
@uref{http://sourceware.org/cgi-bin/cvsweb.cgi/~checkout~/mauve/THANKS?rev=1.2&cvsroot=mauve&only_with_tag=HEAD,,contributors},
for Java test code.

@item
Expand Down
2 changes: 1 addition & 1 deletion doc/cpp.texi
Expand Up @@ -3785,7 +3785,7 @@ execution character set.

Currently, CPP requires its input to be ASCII or UTF-8. The execution
character set may be controlled by the user, with the
@option{-ftarget-charset} and @option{-ftarget-wide-charset} options.
@option{-fexec-charset} and @option{-fwide-exec-charset} options.

@item Identifier characters.
@anchor{Identifier characters}
Expand Down
2 changes: 1 addition & 1 deletion doc/cppinternals.texi
Expand Up @@ -963,7 +963,7 @@ directives outside the main conditional block for the optimization to be
on.

Note that whilst we are inside the conditional block, @code{mi_valid} is
likely to be reset to @code{false}, but this does not matter since the
likely to be reset to @code{false}, but this does not matter since
the closing @code{#endif} restores it to @code{true} if appropriate.

Finally, since @code{_cpp_lex_direct} pops the file off the buffer stack
Expand Down
229 changes: 180 additions & 49 deletions doc/extend.texi
Expand Up @@ -1236,7 +1236,7 @@ As a GNU extension, GCC allows initialization of objects with static storage
duration by compound literals (which is not possible in ISO C99, because
the initializer is not a constant).
It is handled as if the object was initialized only with the bracket
enclosed list if compound literal's and object types match.
enclosed list if the types of the compound literal and the object match.
The initializer list of the compound literal must be constant.
If the object being initialized has array type of unknown size, the size is
determined by compound literal size.
Expand Down Expand Up @@ -2164,7 +2164,7 @@ problem.)
@item sseregparm
@cindex @code{sseregparm} attribute
On the Intel 386 with SSE support, the @code{sseregparm} attribute
causes the compiler to pass up to 8 floating point arguments in
causes the compiler to pass up to 3 floating point arguments in
SSE registers instead of on the stack. Functions that take a
variable number of arguments will continue to pass all of their
floating point arguments on the stack.
Expand Down Expand Up @@ -6676,16 +6676,175 @@ Generates the @code{movhps} machine instruction as a store to memory.
Generates the @code{movlps} machine instruction as a store to memory.
@end table

The following built-in functions are available when @option{-msse2} is used.
All of them generate the machine instruction that is part of the name.

@smallexample
int __builtin_ia32_comisdeq (v2df, v2df)
int __builtin_ia32_comisdlt (v2df, v2df)
int __builtin_ia32_comisdle (v2df, v2df)
int __builtin_ia32_comisdgt (v2df, v2df)
int __builtin_ia32_comisdge (v2df, v2df)
int __builtin_ia32_comisdneq (v2df, v2df)
int __builtin_ia32_ucomisdeq (v2df, v2df)
int __builtin_ia32_ucomisdlt (v2df, v2df)
int __builtin_ia32_ucomisdle (v2df, v2df)
int __builtin_ia32_ucomisdgt (v2df, v2df)
int __builtin_ia32_ucomisdge (v2df, v2df)
int __builtin_ia32_ucomisdneq (v2df, v2df)
v2df __builtin_ia32_cmpeqpd (v2df, v2df)
v2df __builtin_ia32_cmpltpd (v2df, v2df)
v2df __builtin_ia32_cmplepd (v2df, v2df)
v2df __builtin_ia32_cmpgtpd (v2df, v2df)
v2df __builtin_ia32_cmpgepd (v2df, v2df)
v2df __builtin_ia32_cmpunordpd (v2df, v2df)
v2df __builtin_ia32_cmpneqpd (v2df, v2df)
v2df __builtin_ia32_cmpnltpd (v2df, v2df)
v2df __builtin_ia32_cmpnlepd (v2df, v2df)
v2df __builtin_ia32_cmpngtpd (v2df, v2df)
v2df __builtin_ia32_cmpngepd (v2df, v2df)
v2df __builtin_ia32_cmpordpd (v2df, v2df)
v2df __builtin_ia32_cmpeqsd (v2df, v2df)
v2df __builtin_ia32_cmpltsd (v2df, v2df)
v2df __builtin_ia32_cmplesd (v2df, v2df)
v2df __builtin_ia32_cmpunordsd (v2df, v2df)
v2df __builtin_ia32_cmpneqsd (v2df, v2df)
v2df __builtin_ia32_cmpnltsd (v2df, v2df)
v2df __builtin_ia32_cmpnlesd (v2df, v2df)
v2df __builtin_ia32_cmpordsd (v2df, v2df)
v2di __builtin_ia32_paddq (v2di, v2di)
v2di __builtin_ia32_psubq (v2di, v2di)
v2df __builtin_ia32_addpd (v2df, v2df)
v2df __builtin_ia32_subpd (v2df, v2df)
v2df __builtin_ia32_mulpd (v2df, v2df)
v2df __builtin_ia32_divpd (v2df, v2df)
v2df __builtin_ia32_addsd (v2df, v2df)
v2df __builtin_ia32_subsd (v2df, v2df)
v2df __builtin_ia32_mulsd (v2df, v2df)
v2df __builtin_ia32_divsd (v2df, v2df)
v2df __builtin_ia32_minpd (v2df, v2df)
v2df __builtin_ia32_maxpd (v2df, v2df)
v2df __builtin_ia32_minsd (v2df, v2df)
v2df __builtin_ia32_maxsd (v2df, v2df)
v2df __builtin_ia32_andpd (v2df, v2df)
v2df __builtin_ia32_andnpd (v2df, v2df)
v2df __builtin_ia32_orpd (v2df, v2df)
v2df __builtin_ia32_xorpd (v2df, v2df)
v2df __builtin_ia32_movsd (v2df, v2df)
v2df __builtin_ia32_unpckhpd (v2df, v2df)
v2df __builtin_ia32_unpcklpd (v2df, v2df)
v16qi __builtin_ia32_paddb128 (v16qi, v16qi)
v8hi __builtin_ia32_paddw128 (v8hi, v8hi)
v4si __builtin_ia32_paddd128 (v4si, v4si)
v2di __builtin_ia32_paddq128 (v2di, v2di)
v16qi __builtin_ia32_psubb128 (v16qi, v16qi)
v8hi __builtin_ia32_psubw128 (v8hi, v8hi)
v4si __builtin_ia32_psubd128 (v4si, v4si)
v2di __builtin_ia32_psubq128 (v2di, v2di)
v8hi __builtin_ia32_pmullw128 (v8hi, v8hi)
v8hi __builtin_ia32_pmulhw128 (v8hi, v8hi)
v2di __builtin_ia32_pand128 (v2di, v2di)
v2di __builtin_ia32_pandn128 (v2di, v2di)
v2di __builtin_ia32_por128 (v2di, v2di)
v2di __builtin_ia32_pxor128 (v2di, v2di)
v16qi __builtin_ia32_pavgb128 (v16qi, v16qi)
v8hi __builtin_ia32_pavgw128 (v8hi, v8hi)
v16qi __builtin_ia32_pcmpeqb128 (v16qi, v16qi)
v8hi __builtin_ia32_pcmpeqw128 (v8hi, v8hi)
v4si __builtin_ia32_pcmpeqd128 (v4si, v4si)
v16qi __builtin_ia32_pcmpgtb128 (v16qi, v16qi)
v8hi __builtin_ia32_pcmpgtw128 (v8hi, v8hi)
v4si __builtin_ia32_pcmpgtd128 (v4si, v4si)
v16qi __builtin_ia32_pmaxub128 (v16qi, v16qi)
v8hi __builtin_ia32_pmaxsw128 (v8hi, v8hi)
v16qi __builtin_ia32_pminub128 (v16qi, v16qi)
v8hi __builtin_ia32_pminsw128 (v8hi, v8hi)
v16qi __builtin_ia32_punpckhbw128 (v16qi, v16qi)
v8hi __builtin_ia32_punpckhwd128 (v8hi, v8hi)
v4si __builtin_ia32_punpckhdq128 (v4si, v4si)
v2di __builtin_ia32_punpckhqdq128 (v2di, v2di)
v16qi __builtin_ia32_punpcklbw128 (v16qi, v16qi)
v8hi __builtin_ia32_punpcklwd128 (v8hi, v8hi)
v4si __builtin_ia32_punpckldq128 (v4si, v4si)
v2di __builtin_ia32_punpcklqdq128 (v2di, v2di)
v16qi __builtin_ia32_packsswb128 (v16qi, v16qi)
v8hi __builtin_ia32_packssdw128 (v8hi, v8hi)
v16qi __builtin_ia32_packuswb128 (v16qi, v16qi)
v8hi __builtin_ia32_pmulhuw128 (v8hi, v8hi)
void __builtin_ia32_maskmovdqu (v16qi, v16qi)
v2df __builtin_ia32_loadupd (double *)
void __builtin_ia32_storeupd (double *, v2df)
v2df __builtin_ia32_loadhpd (v2df, double *)
v2df __builtin_ia32_loadlpd (v2df, double *)
int __builtin_ia32_movmskpd (v2df)
int __builtin_ia32_pmovmskb128 (v16qi)
void __builtin_ia32_movnti (int *, int)
void __builtin_ia32_movntpd (double *, v2df)
void __builtin_ia32_movntdq (v2df *, v2df)
v4si __builtin_ia32_pshufd (v4si, int)
v8hi __builtin_ia32_pshuflw (v8hi, int)
v8hi __builtin_ia32_pshufhw (v8hi, int)
v2di __builtin_ia32_psadbw128 (v16qi, v16qi)
v2df __builtin_ia32_sqrtpd (v2df)
v2df __builtin_ia32_sqrtsd (v2df)
v2df __builtin_ia32_shufpd (v2df, v2df, int)
v2df __builtin_ia32_cvtdq2pd (v4si)
v4sf __builtin_ia32_cvtdq2ps (v4si)
v4si __builtin_ia32_cvtpd2dq (v2df)
v2si __builtin_ia32_cvtpd2pi (v2df)
v4sf __builtin_ia32_cvtpd2ps (v2df)
v4si __builtin_ia32_cvttpd2dq (v2df)
v2si __builtin_ia32_cvttpd2pi (v2df)
v2df __builtin_ia32_cvtpi2pd (v2si)
int __builtin_ia32_cvtsd2si (v2df)
int __builtin_ia32_cvttsd2si (v2df)
long long __builtin_ia32_cvtsd2si64 (v2df)
long long __builtin_ia32_cvttsd2si64 (v2df)
v4si __builtin_ia32_cvtps2dq (v4sf)
v2df __builtin_ia32_cvtps2pd (v4sf)
v4si __builtin_ia32_cvttps2dq (v4sf)
v2df __builtin_ia32_cvtsi2sd (v2df, int)
v2df __builtin_ia32_cvtsi642sd (v2df, long long)
v4sf __builtin_ia32_cvtsd2ss (v4sf, v2df)
v2df __builtin_ia32_cvtss2sd (v2df, v4sf)
void __builtin_ia32_clflush (const void *)
void __builtin_ia32_lfence (void)
void __builtin_ia32_mfence (void)
v16qi __builtin_ia32_loaddqu (const char *)
void __builtin_ia32_storedqu (char *, v16qi)
unsigned long long __builtin_ia32_pmuludq (v2si, v2si)
v2di __builtin_ia32_pmuludq128 (v4si, v4si)
v8hi __builtin_ia32_psllw128 (v8hi, v2di)
v4si __builtin_ia32_pslld128 (v4si, v2di)
v2di __builtin_ia32_psllq128 (v4si, v2di)
v8hi __builtin_ia32_psrlw128 (v8hi, v2di)
v4si __builtin_ia32_psrld128 (v4si, v2di)
v2di __builtin_ia32_psrlq128 (v2di, v2di)
v8hi __builtin_ia32_psraw128 (v8hi, v2di)
v4si __builtin_ia32_psrad128 (v4si, v2di)
v2di __builtin_ia32_pslldqi128 (v2di, int)
v8hi __builtin_ia32_psllwi128 (v8hi, int)
v4si __builtin_ia32_pslldi128 (v4si, int)
v2di __builtin_ia32_psllqi128 (v2di, int)
v2di __builtin_ia32_psrldqi128 (v2di, int)
v8hi __builtin_ia32_psrlwi128 (v8hi, int)
v4si __builtin_ia32_psrldi128 (v4si, int)
v2di __builtin_ia32_psrlqi128 (v2di, int)
v8hi __builtin_ia32_psrawi128 (v8hi, int)
v4si __builtin_ia32_psradi128 (v4si, int)
v4si __builtin_ia32_pmaddwd128 (v8hi, v8hi)
@end smallexample

The following built-in functions are available when @option{-msse3} is used.
All of them generate the machine instruction that is part of the name.

@smallexample
v2df __builtin_ia32_addsubpd (v2df, v2df)
v2df __builtin_ia32_addsubps (v2df, v2df)
v4sf __builtin_ia32_addsubps (v4sf, v4sf)
v2df __builtin_ia32_haddpd (v2df, v2df)
v2df __builtin_ia32_haddps (v2df, v2df)
v4sf __builtin_ia32_haddps (v4sf, v4sf)
v2df __builtin_ia32_hsubpd (v2df, v2df)
v2df __builtin_ia32_hsubps (v2df, v2df)
v4sf __builtin_ia32_hsubps (v4sf, v4sf)
v16qi __builtin_ia32_lddqu (char const *)
void __builtin_ia32_monitor (void *, unsigned int, unsigned int)
v2df __builtin_ia32_movddup (v2df)
Expand Down Expand Up @@ -9815,11 +9974,10 @@ Predefined Macros,cpp,The GNU C Preprocessor}).

Both the C and C++ standard have the concept of volatile objects. These
are normally accessed by pointers and used for accessing hardware. The
standards encourage compilers to refrain from optimizations
concerning accesses to volatile objects that it might perform on
non-volatile objects. The C standard leaves it implementation defined
as to what constitutes a volatile access. The C++ standard omits to
specify this, except to say that C++ should behave in a similar manner
standards encourage compilers to refrain from optimizations concerning
accesses to volatile objects. The C standard leaves it implementation
defined as to what constitutes a volatile access. The C++ standard omits
to specify this, except to say that C++ should behave in a similar manner
to C with respect to volatiles, where possible. The minimum either
standard specifies is that at a sequence point all previous accesses to
volatile objects have stabilized and no subsequent accesses have
Expand All @@ -9829,55 +9987,28 @@ for accesses across a sequence point. The use of volatiles does not
allow you to violate the restriction on updating objects multiple times
within a sequence point.

In most expressions, it is intuitively obvious what is a read and what is
a write. For instance

@smallexample
volatile int *dst = @var{somevalue};
volatile int *src = @var{someothervalue};
*dst = *src;
@end smallexample

@noindent
will cause a read of the volatile object pointed to by @var{src} and stores the
value into the volatile object pointed to by @var{dst}. There is no
guarantee that these reads and writes are atomic, especially for objects
larger than @code{int}.
@xref{Qualifiers implementation, , Volatile qualifier and the C compiler}.

Less obvious expressions are where something which looks like an access
is used in a void context. An example would be,
The behavior differs slightly between C and C++ in the non-obvious cases:

@smallexample
volatile int *src = @var{somevalue};
*src;
@end smallexample

With C, such expressions are rvalues, and as rvalues cause a read of
the object, GCC interprets this as a read of the volatile being pointed
to. The C++ standard specifies that such expressions do not undergo
lvalue to rvalue conversion, and that the type of the dereferenced
With C, such expressions are rvalues, and GCC interprets this either as a
read of the volatile object being pointed to or only as request to evaluate
the side-effects. The C++ standard specifies that such expressions do not
undergo lvalue to rvalue conversion, and that the type of the dereferenced
object may be incomplete. The C++ standard does not specify explicitly
that it is this lvalue to rvalue conversion which is responsible for
that it is this lvalue to rvalue conversion which may be responsible for
causing an access. However, there is reason to believe that it is,
because otherwise certain simple expressions become undefined. However,
because it would surprise most programmers, G++ treats dereferencing a
pointer to volatile object of complete type in a void context as a read
of the object. When the object has incomplete type, G++ issues a
warning.

@smallexample
struct S;
struct T @{int m;@};
volatile S *ptr1 = @var{somevalue};
volatile T *ptr2 = @var{somevalue};
*ptr1;
*ptr2;
@end smallexample

In this example, a warning is issued for @code{*ptr1}, and @code{*ptr2}
causes a read of the object pointed to. If you wish to force an error on
the first case, you must force a conversion to rvalue with, for instance
a static cast, @code{static_cast<S>(*ptr1)}.
pointer to volatile object of complete type when the value is unused as
GCC would do for an equivalent type in C. When the object has incomplete
type, G++ issues a warning; if you wish to force an error, you must
force a conversion to rvalue with, for instance, a static cast.

When using a reference to volatile, G++ does not treat equivalent
expressions as accesses to volatiles, but instead issues a warning that
Expand Down Expand Up @@ -10469,7 +10600,7 @@ and are now removed from G++.
The implicit typename extension has been deprecated and is now
removed from G++.

The use of default arguments in function pointers, function typedefs and
The use of default arguments in function pointers, function typedefs
and other places where they are not permitted by the standard is
deprecated and will be removed from a future version of G++.

Expand Down
2 changes: 1 addition & 1 deletion doc/fsf-funding.7
Expand Up @@ -129,7 +129,7 @@
.\" ========================================================================
.\"
.IX Title "FSF-FUNDING 7"
.TH FSF-FUNDING 7 "2006-05-24" "gcc-4.1.1" "GNU"
.TH FSF-FUNDING 7 "2007-02-14" "gcc-4.1.2" "GNU"
.SH "NAME"
fsf\-funding \- Funding Free Software
.SH "DESCRIPTION"
Expand Down
2 changes: 1 addition & 1 deletion doc/gcov.texi
Expand Up @@ -428,7 +428,7 @@ message ``never executed'' is printed.
For a call, if it was executed at least once, then a percentage
indicating the number of times the call returned divided by the number
of times the call was executed will be printed. This will usually be
100%, but may be less for functions call @code{exit} or @code{longjmp},
100%, but may be less for functions that call @code{exit} or @code{longjmp},
and thus may not return every time they are called.

The execution counts are cumulative. If the example program were
Expand Down
2 changes: 1 addition & 1 deletion doc/gfdl.7
Expand Up @@ -129,7 +129,7 @@
.\" ========================================================================
.\"
.IX Title "GFDL 7"
.TH GFDL 7 "2006-05-24" "gcc-4.1.1" "GNU"
.TH GFDL 7 "2007-02-14" "gcc-4.1.2" "GNU"
.SH "NAME"
gfdl \- GNU Free Documentation License
.SH "DESCRIPTION"
Expand Down
2 changes: 1 addition & 1 deletion doc/gpl.7
Expand Up @@ -129,7 +129,7 @@
.\" ========================================================================
.\"
.IX Title "GPL 7"
.TH GPL 7 "2006-05-24" "gcc-4.1.1" "GNU"
.TH GPL 7 "2007-02-14" "gcc-4.1.2" "GNU"
.SH "NAME"
gpl \- GNU General Public License
.SH "DESCRIPTION"
Expand Down

0 comments on commit 377f250

Please sign in to comment.