linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: David Edelsohn <dje@watson.ibm.com>
To: Benjamin Herrenschmidt <bh40@calva.net>
Cc: Paul Mackerras <paulus@cs.anu.edu.au>,
	Cort Dougan <cort@ladron.cs.nmt.edu>,
	linuxppc-dev@lists.linuxppc.org
Date: Sat, 13 Feb 1999 19:12:15 -0500	[thread overview]
Message-ID: <9902140012.AA55792@marc.watson.ibm.com> (raw)
In-Reply-To: Message from Benjamin Herrenschmidt <bh40@calva.net> of "Sat, 13 Feb 1999 18:50:09 +0100." <19990213185009.020602@mail.mipsys.com>


	Just to make sure, you are not asking how to create XCOFF
TOC-based code using GCC?

	If you know the physical location or can control the physical
location at which the code will be loaded, you simply can instruct the
linker to link the executable based at that location.  Otherwise, you
might need additional -fpic position independent code option.  If you need
data and cannot set the GPR specifying the GOT address yourself, you can
use the GCC SVR4 eABI PPC suppport to calculate it on entry as it does for
embedded systems.  Note that branches generated by GCC already are
position-independent displacements (not "ba" branch absolute instruction).

	Are all of those "sync" instructions necessary in your code?  You
are not touching memory.  The instructions already are serializing.  I
think that you should be able to do something like:

enable:
        mfmsr   r0
        ori     r0,r0,MSR_EE
        mtmsr   r0

disable:
        mfmsr   r0
        andi.   r0,r0,(~MSR_EE)&0xffff
        mtmsr   r0

David

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to  Cc linuxppc-dev  if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to linuxppc-dev-request@lists.linuxppc.org ]]

  reply	other threads:[~1999-02-14  0:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-13 17:50 Benjamin Herrenschmidt
1999-02-14  0:12 ` David Edelsohn [this message]
1999-02-15  9:58 ` your mail Gabriel Paubert
1999-02-15 11:23   ` Benjamin Herrenschmidt
1999-02-15 14:18     ` Gabriel Paubert
1999-02-15 17:42       ` David Edelsohn

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=9902140012.AA55792@marc.watson.ibm.com \
    --to=dje@watson.ibm.com \
    --cc=bh40@calva.net \
    --cc=cort@ladron.cs.nmt.edu \
    --cc=linuxppc-dev@lists.linuxppc.org \
    --cc=paulus@cs.anu.edu.au \
    /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 NNTP newsgroup(s).