From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10656 invoked by alias); 14 Sep 2006 02:23:33 -0000 Received: (qmail 10647 invoked by uid 22791); 14 Sep 2006 02:23:32 -0000 X-Spam-Check-By: sourceware.org Received: from ns.datataker.com.au (HELO datataker.com.au) (203.43.52.195) by sourceware.org (qpsmtpd/0.31) with SMTP; Thu, 14 Sep 2006 02:23:27 +0000 Received: (qmail 7416 invoked by uid 0); 14 Sep 2006 02:25:59 -0000 Received: from unknown (HELO ?192.168.1.23?) (jeff.lasslett@datataker.com.au@192.168.1.23) by 0 with SMTP; 14 Sep 2006 02:25:59 -0000 Message-ID: <4508BD1B.3000403@datataker.com.au> Date: Thu, 14 Sep 2006 02:23:00 -0000 From: Jeff Lasslett User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: binutils@sourceware.org Subject: powerpc assembler: STW and .sdata variables Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2006-09/txt/msg00102.txt.bz2 Hello, The Diab assembler that I am replacing with GNU as supports the following:- stw r3,Trace@sdarx(r13) All it's doing is storing the contents of r3 into the variable 'Trace' which happens to be in the .sdata section. Is there a GNU equivalent to the diab syntax above? 'Trace' is a variable declared in section .sdata. '@sdarx' is described as follows in the Diab assembler manual:- expr@sdarx The 16 bit offset of expr from the SDA base register is calculated. The produced relocation will cause the linker to modify the destination register field in the instruction. If I understand the EABI correctly then r13 should hold the base address of the .sdata section. Do I have to do something like: lis r10,Trace@ha stw r3,Trace@l(r10) Or is there some syntax that makes use of the fact that a register (r13) has the .sdata address in it already? Thanks, Jeff