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]

core changes for mep port


I'm working on readying the Toshiba Media Processor (mep-elf) port for
contribution to GCC 4.x, but we added some core changes needed to
support it.  The changes are listed below; I'd like some feedback
about these before I go too far with them.  Are these concepts
acceptable for inclusion in gcc?

Coprocessor types - the MeP chip has optional coprocessors, each with
their own register sets.  They need their own internal types (mostly
to keep track of which unit to use), which we've created by prefixing
the existing types with COP (i.e. COPSImode, COPDFmode, etc).  This
affects the generators, some MI files, etc.  The types don't exist
unless the target calls for them.

The CPU supports two operation modes - core and vliw.  To properly
manage inlining, we need target hooks for when function A can inline
function B (both functions' attributes need to be inspected), and for
calls that are semantically disallowed (i.e. functions can't call
other-mode static inline functions).  The core and vliw modes have
different instructions, and it's expected that users of this port will
make heavy use of intrinsics and asms, so even tree-level inlining
needs to be managed.

The number of registers available to GCC varies with the coprocessor
choice, via pragmas in a sysroot-wide header file.  Thus, we need
hooks that let us modify (or at least re-calculate) gcc's internal
tables (i.e. call init_reg_sets_1 et all, during pragma handling).
Also, we need access to reg_class_subclasses[], which was hidden a
while back.

We added a validate_replace_rtx_subexp() which is like
validate_replace_rtx() but only does the replacement on a
sub-expression of the insn.  There's a chip-specific optimization that
uses this, we didn't want to have to recompute it ourselves.


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