From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,90a548dee96a610c X-Google-Attributes: gid111c93,public X-Google-ArrivalTime: 2003-02-02 12:52:02 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!newsfeed.r-kom.de!netnews.web.de!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.com!t-online.de!news.t-online.com!not-for-mail From: Falk Hueffner Newsgroups: comp.os.linux.alpha Subject: Re: Confusing assebmler Date: 02 Feb 2003 21:51:45 +0100 Organization: T-Online Sender: falk@juist Message-ID: <873cn6xv6m.fsf@student.uni-tuebingen.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.t-online.com 1044219106 06 3817 -nbdER7SWA7u9 030202 20:51:46 X-Complaints-To: abuse@t-online.com X-Sender: 520046482682-0001@t-dialin.net X-Face: "iUeUu$b*W_"w?tV83Y3*r:`rh&dRv}$YnZ3,LVeCZSYVuf[Gpo*5%_=/\_!gc_,SS}[~xZ wY77I-M)xHIx:2f56g%/`SOw"Dx%4Xq0&f\Tj~>|QR|vGlU}TBYhiG(K:2 writes: > I'm having problems with Alpha assembler. > When I'm trying to move longwords to some register, gas warns it. > > eg. > addq $16,0xffff,$16 > > Warning: operand out of range (65535 not between 0 and 255) > > How should I move/add/etc long/quad words to registers ? > It seems that only words can be moved. You need to put the constant into a register first. With lda, you can generate constants between -32768 and 32767. So in this case, you also need ldah. ldah r1, x(r0) does r1 = r0 + 65536 * x. So to emit 0xffff, you need ldah $1, 1($31) lda $1, -1($1) Or you can use the "ldiq" pseudo-op, which will generate multiple instruction sequences itself: ldiq $1, 0xffff If you want to add 0xffff to $16, you can do ldah $16, 1($16) lda $16, -1($16) -- Falk