From mboxrd@z Thu Jan 1 00:00:00 1970 Message-Id: <9902140012.AA55792@marc.watson.ibm.com> To: Benjamin Herrenschmidt Cc: Paul Mackerras , Cort Dougan , linuxppc-dev@lists.linuxppc.org In-Reply-To: Message from Benjamin Herrenschmidt of "Sat, 13 Feb 1999 18:50:09 +0100." <19990213185009.020602@mail.mipsys.com> Date: Sat, 13 Feb 1999 19:12:15 -0500 From: David Edelsohn Sender: owner-linuxppc-dev@lists.linuxppc.org List-Id: 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 ]]