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 10:23:00 -0000 [thread overview]
Message-ID: <3B9CF095.44779970@tid.es> (raw)
In-Reply-To: <200109101656.f8AGuIc30836@sheesh.cambridge.redhat.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1741 bytes --]
Bart Veer wrote:
> The compiler has no idea what code or data will end up where in
> memory, that is the responsibility of the linker. Theoretically it
> would be possible for the compiler to always issue a long call, and
> then have the linker turn this into a short call if possible. Or have
> the compiler always issue a short call, with the linker turning this
> into a long call if necessary. However if the compiler does not know
> exactly what instructions are going to end up in the final executable
> then that is going to mess up any effort at optimisation. For example,
> IIRC a long call requires an intermediate register so the compiler
> would have to ensure that for every call operation there is a spare
> register available. That is a big overhead for a problem that only
> affects some code on some targets.
Well, I think that the attributes are a good compromise solution. Nowadays it
is very common to have MMUs that virtualize the memory space, and make long calls
unnecessary (but I don't have one ... and even MMU equiped micros must run
non-virtualized programs at least at boot-time)
> Arguably the underlying problem is that code generation is done by the
> compiler rather than by the linker, and the former has insufficient
> knowledge unless assisted by e.g. explicit attributes in the source
> code. However this division of labour between compiler and linker is
> not going to change any time soon.
Anyway, we are extending on a non-eCos question, so thank you for your answer,
but let's stop boring the others with this talk... of course I'm available
through private email.
--
Rafael RodrÃguez Velilla rrv@tid.es
Telefónica I+D http://www.tid.es
Telf: +34 - 91 337 4270
prev parent reply other threads:[~2001-09-10 10:23 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
2001-09-10 9:56 ` Bart Veer
2001-09-10 10:23 ` Rafael RodrÃguez Velilla [this message]
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=3B9CF095.44779970@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).