This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][MIPS] Add support for code_readable function attribute
- From: Sandra Loosemore <sandra at codesourcery dot com>
- To: Robert Suchanek <Robert dot Suchanek at imgtec dot com>, "Catherine_Moore at mentor dot com" <Catherine_Moore at mentor dot com>, Matthew Fortune <Matthew dot Fortune at imgtec dot com>
- Cc: Simon Dardis <Simon dot Dardis at imgtec dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 24 May 2016 19:45:26 -0600
- Subject: Re: [PATCH][MIPS] Add support for code_readable function attribute
- Authentication-results: sourceware.org; auth=none
- References: <B5E67142681B53468FAF6B7C313565624F4EDC9F at hhmail02 dot hh dot imgtec dot org>
On 05/24/2016 08:25 AM, Robert Suchanek wrote:
[snip]
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index e4d6c1c..dd23c70 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -4441,6 +4441,23 @@ On MIPS targets, you can use the @code{nocompression} function attribute
to locally turn off MIPS16 and microMIPS code generation. This attribute
overrides the @option{-mips16} and @option{-mmicromips} options on the
command line (@pxref{MIPS Options}).
+
+@item code_readable
+@cindex @code{code_readable} function attribute, MIPS
+For MIPS targets that support PC-relative addressing modes, this attribute
+can be used to control how an object is addressed. The attribute takes
+a single optional argument:
The problem here is that we don't tell users that the argument has to be
a string constant in quotes, and not just a token.
How about changing the above text to end with:
"...a single optional argument, which must be one of the following
string constants:"
and then changing this to be @table @code and quoting the @item strings:
+
+@table @samp
+@item no
+The function should not read the instruction stream as data.
+@item yes
+The function can read the instruction stream as data.
+@item pcrel
+The function can read the instruction stream in a pc-relative mode.
+@end table
+
Then it'll be consistent with this:
+If there is no argument supplied, the default of @code{"yes"} applies.
@end table
@node MSP430 Function Attributes
-Sandra