aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorStephane Carrez <stcarrez@nerim.fr>2003-04-26 14:35:19 +0200
committerStephane Carrez <ciceron@gcc.gnu.org>2003-04-26 14:35:19 +0200
commit5936c7e7ac81a226d30c1cfdaae397ed009258df (patch)
tree4aa6fce3deea241d308dbaeb783cba2532525604 /gcc
parent85a43a2f113072b8599e45286afd0edb2b0aa98f (diff)
downloadgcc-5936c7e7ac81a226d30c1cfdaae397ed009258df.zip
gcc-5936c7e7ac81a226d30c1cfdaae397ed009258df.tar.gz
gcc-5936c7e7ac81a226d30c1cfdaae397ed009258df.tar.bz2
extend.texi (Function Attributes): Document "near" and "far" for 68HC11 and 68HC12.
* doc/extend.texi (Function Attributes): Document "near" and "far" for 68HC11 and 68HC12. From-SVN: r66104
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/doc/extend.texi24
2 files changed, 29 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index bc26bb5..39efa64 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2003-04-26 Stephane Carrez <stcarrez@nerim.fr>
+
+ * doc/extend.texi (Function Attributes): Document "near" and "far"
+ for 68HC11 and 68HC12.
+
2003-04-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* expr.c (store_field): When making temporary for store, don't
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 0290419..d88dc1a 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -2537,6 +2537,30 @@ compiler will generate @code{seth/add3} instructions to load their addresses),
and may not be reachable with the @code{bl} instruction (the compiler will
generate the much slower @code{seth/add3/jl} instruction sequence).
+@item far
+@cindex functions which handle memory bank switching
+On 68HC11 and 68HC12 the @code{far} attribute causes the compiler to
+use a calling convention that takes care of switching memory banks when
+entering and leaving a function. This calling convention is also the
+default when using the @option{-mlong-calls} option.
+
+On 68HC12 the compiler will use the @code{call} and @code{rtc} instructions
+to call and return from a function.
+
+On 68HC11 the compiler will generate a sequence of instructions
+to invoke a board-specific routine to switch the memory bank and call the
+real function. The board-specific routine simulates a @code{call}.
+At the end of a function, it will jump to a board-specific routine
+instead of using @code{rts}. The board-specific return routine simulates
+the @code{rtc}.
+
+@item near
+@cindex functions which do not handle memory bank switching on 68HC11/68HC12
+On 68HC11 and 68HC12 the @code{near} attribute causes the compiler to
+use the normal calling convention based on @code{jsr} and @code{rts}.
+This attribute can be used to cancel the effect of the @option{-mlong-calls}
+option.
+
@end table
You can specify multiple attributes in a declaration by separating them