summaryrefslogtreecommitdiff
path: root/gcc/doc/portability.texi
diff options
context:
space:
mode:
authorupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
committerupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
commit554fd8c5195424bdbcabf5de30fdc183aba391bd (patch)
tree976dc5ab7fddf506dadce60ae936f43f58787092 /gcc/doc/portability.texi
downloadcbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.bz2
cbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.xz
obtained gcc-4.6.4.tar.bz2 from upstream website;upstream
verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository.
Diffstat (limited to 'gcc/doc/portability.texi')
-rw-r--r--gcc/doc/portability.texi40
1 files changed, 40 insertions, 0 deletions
diff --git a/gcc/doc/portability.texi b/gcc/doc/portability.texi
new file mode 100644
index 000000000..c5f8048fa
--- /dev/null
+++ b/gcc/doc/portability.texi
@@ -0,0 +1,40 @@
+@c Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+@c 1999, 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
+@c This is part of the GCC manual.
+@c For copying conditions, see the file gcc.texi.
+
+@node Portability
+@chapter GCC and Portability
+@cindex portability
+@cindex GCC and portability
+
+GCC itself aims to be portable to any machine where @code{int} is at least
+a 32-bit type. It aims to target machines with a flat (non-segmented) byte
+addressed data address space (the code address space can be separate).
+Target ABIs may have 8, 16, 32 or 64-bit @code{int} type. @code{char}
+can be wider than 8 bits.
+
+GCC gets most of the information about the target machine from a machine
+description which gives an algebraic formula for each of the machine's
+instructions. This is a very clean way to describe the target. But when
+the compiler needs information that is difficult to express in this
+fashion, ad-hoc parameters have been defined for machine descriptions.
+The purpose of portability is to reduce the total work needed on the
+compiler; it was not of interest for its own sake.
+
+@cindex endianness
+@cindex autoincrement addressing, availability
+@findex abort
+GCC does not contain machine dependent code, but it does contain code
+that depends on machine parameters such as endianness (whether the most
+significant byte has the highest or lowest address of the bytes in a word)
+and the availability of autoincrement addressing. In the RTL-generation
+pass, it is often necessary to have multiple strategies for generating code
+for a particular kind of syntax tree, strategies that are usable for different
+combinations of parameters. Often, not all possible cases have been
+addressed, but only the common ones or only the ones that have been
+encountered. As a result, a new target may require additional
+strategies. You will know
+if this happens because the compiler will call @code{abort}. Fortunately,
+the new strategies can be added in a machine-independent fashion, and will
+affect only the target machines that need them.