public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Rafael Rodríguez Velilla <rrv@tid.es>
To: ecos <ecos-discuss@sources.redhat.com>
Subject: Re: [ECOS] Compiling individual sources
Date: Mon, 10 Sep 2001 08:43:00 -0000	[thread overview]
Message-ID: <3B9CD901.B0E9A2DE@tid.es> (raw)
In-Reply-To: <200109101524.f8AFOm429420@sheesh.cambridge.redhat.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2689 bytes --]

Bart Veer wrote:

> >>>>> "Rafael" == Rafael =?iso-8859-1?Q?Rodr=EDguez?= Velilla <Rafael> writes:
>
>     Rafael>   I want to compile individual files with -mlong-calls.
>     Rafael> Can I use the cdl script to distinguish which files must
>     Rafael> be compiled with this switch?
>
>     Rafael>   Maybe, the only way to customice individual files is
>     Rafael> using the make command. I'd want to put some of the eCos'
>     Rafael> functions in internal memory , but it will have problems
>     Rafael> to call the rest of the system if I don't use long-calls.
>
> Some eCos packages will allow you to manipulate the compiler flags on
> a per-package basis, but that is as fine-grained as things get right
> now. There is no support for manipulating compiler flags on a per-file
> basis.
>
> However, I suspect that you will want to use -mlong-calls for all
> files, not just for some of them. For example if you want to put a
> function like memcpy() into internal memory then either all modules
> that invoke memcpy() need to be compiled with -mlong-calls, or
> alternatively you need to give the memcpy() function the long-call
> attribute in a header file used by all code that calls memcpy(). It is
> not enough to compile just memcpy.c with -mlong-calls, that would not
> affect any calls to memcpy(). Obviously using -mlong-calls throughout
> will involve extra overhead for the system as a whole, which may
> outweigh the benefits of having some functions in internal memory.

  It is true that maybe in a well designed system the overweith of mlong-calls
would make the benefit minimal, but my system accesses a word in the external
memory after 8 cycles (it acesses it byte by byte with a wait state between
bytes), but the internal memory gets the instruction in just one cycle... surely
I will speed a lot my system  moving some functionality into the internal memory.

  About compiling it all with mlong-calls... I'm trying to avoid it, so if I can
put some critical functions into internal memory while leaving the rest compiled
without mlong-calls Ican improve the performance, leaving almost all the internal
memory to the programmer of applications.
  For example, I'm moving the IRQ mechanisms (part of vector.S) into the internal
memory, it has no api for external calls and only needs adding a pair of
pointers, but I expect that the performance will be boosted a lot. I'm also
moving the stacks into internal memory (that is almost inmediate).

  It is a pity that gcc can't decide when does it need a long-call and when not.


> Bart

--
Rafael Rodríguez Velilla        rrv@tid.es
Telefónica I+D          http://www.tid.es
Telf: +34 - 91 337 4270



  reply	other threads:[~2001-09-10  8:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-10  7:08 Rafael Rodríguez Velilla
2001-09-10  8:24 ` Bart Veer
2001-09-10  8:43   ` Rafael Rodríguez Velilla [this message]
2001-09-10  9:56     ` Bart Veer
2001-09-10 10:23       ` Rafael Rodríguez Velilla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3B9CD901.B0E9A2DE@tid.es \
    --to=rrv@tid.es \
    --cc=ecos-discuss@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).