This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: undocumented attributes


 > 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]