This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: undocumented attributes
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: Massimiliano Cialdi <cialdi at firenze dot net>
- Cc: gcc at gnu dot org, gcc at gcc dot gnu dot org, kazu at cs dot umass dot edu
- Date: 27 Feb 2003 12:30:24 -0800
- Subject: Re: undocumented attributes
- References: <20030227092233.00000c84.cialdi@firenze.net>
> Where can I find documentation about some attribute for h8300 like:
> saveall
> monitor
> os_task
These attributes are not documented, so you will have to look at the
source, particularly config/h8300/h8300.c.
Most of these attribute/pragmas were added for compatability with
existing h8300 compilers.
Saveall is a pragma, not an attribute. It will cause gcc to generate
prologue/epilogue code to save and restore all the registers on
function entry/exit.
Using the os_task attribute will cause GCC to emit a naked prologue
and epilogue for the given function. That is, no saves/restores of
registers, or frame information. This is analogous to the "naked"
attribute on the Arm.
I'm not sure about this one, but according to the source, the monitor
attribute works as the interrupt attribute, except that the prologue
must mask interrupts. If you want to look at the exact instruction
sequence generated when the monitor attribute is used, look at
config/h8300/h8300.md and look for the pattern named
"monitor_prologue".
These pragmas and attributes should really be documented. You can
submit a patch, or file a PR. I believe the current maintainer is
Kazu Hirata, though I don't see anyone listed as maintainer in the
MAINTAINERS file.
Aldy