public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Nigel Stephens <nigel@algor.co.uk>
To: egcs@cygnus.com
Subject: Re: front end interface
Date: Mon, 18 Aug 1997 16:34:56 -0000	[thread overview]
Message-ID: <199708181534.QAA12459@oval.algor.co.uk> (raw)
Message-ID: <19970818163456.RKzaRkYUHcn1nKyPz4aE3FIjCJJ6QqgGLBWUXk215Ww@z> (raw)
In-Reply-To: 199708181203.IAA16149@scrubbing-bubbles.MIT.EDU

John Carr (jfc@MIT.EDU) writes:
 > > If I understand this correctly, you're depending on memcpy() being
 > > named 'memcpy' ?!
 > > 
 > > This leads into trouble with the current openVMS ports (vax and
 > > alpha), where most library functions are '#define'd with a DECC$ in
 > > front (and others have a __asm() appended to their declaration). So
 > > the compiler doesn't see memcpy but DECC$MEMCPY.
 > 
 > memcpy is recognized by the C front end, as are some of the other
 > string and math functions.

Perhaps a better way to do this in general would be to extend the
__attribute__ mechanism to allow a header file to tell the compiler
more about the behaviour of functions.  For example, since the
"malloc" test is used to tell the "alias" pass that pointers returned
by these functions won't alias to other pointers, we could perhaps
have:

	void * malloc (size_t) __attribute__ ((noalias));

This might then be useful for other functions with similar properties
to malloc(), realloc(), etc.

A similar trick would work for setjmp:

	int setjmp (jmp_buf) __attribute__ ((returns-twice));

As for the builtin use of memcpy() for structure copies etc,
presumably the name of the byte-copy function should be configurable
in the target's header file rather than hardwired into optabs.c.


-- 
________________________________________________________________________
Nigel Stephens, Algorithmics Ltd, 3 Drayton Park, London N5 1NU. England
mailto:nigel@algor.co.uk                          http://www.algor.co.uk
phone:+44 171 700 3301	   mobile:+44 976 686470    fax:+44 171 700 3400

             reply	other threads:[~1997-08-18 16:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-08-18 16:34 Dave Love [this message]
1997-08-18 16:34 ` Nigel Stephens
1997-08-18 16:35 ` bootstrapping problems with native compiler Jeffrey A Law
1997-08-18 16:52 ` front end interface Dave Love
1997-08-18 17:16 ` bootstrapping problems with native compiler Dave Love
1997-08-18 19:57 Jim Wilson
1997-08-18 20:47 double alignment patch for x86 meissner
1997-08-18 22:40 ` bootstrapping problems with native compiler Dave Love
1997-08-18 22:40 meissner
1997-08-18 23:07 Doug Evans
1997-08-18 23:56 Jim Wilson
1997-08-19  8:50 Reload patch to improve 386 code Jakub Jelinek
1997-08-19  9:23 ` bootstrapping problems with native compiler Dave Love
1997-08-19  9:47 ` Jason Merrill

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=199708181534.QAA12459@oval.algor.co.uk \
    --to=nigel@algor.co.uk \
    --cc=egcs@cygnus.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).