Date: Fri, 21 Oct 2011 00:13:20 -0700 From: Juli Mallett <jmallett@FreeBSD.org> To: Rohit J <mipsjunkie@gmail.com> Cc: freebsd-mips <freebsd-mips@freebsd.org> Subject: Re: Assembler complains about use of $at after ".set noat" on sd instr Message-ID: <CACVs6=8F=QfEKtr5%2BsNrC3cn%2BK6fA%2BOKsHEu7fixLqsO3dUnuA@mail.gmail.com> In-Reply-To: <CAPJ9Q0U%2BJ9U46XuAAi0p7X0wkDazRRN5aUKgpFYU7bPCEj_H5A@mail.gmail.com> References: <CAPJ9Q0U%2BJ9U46XuAAi0p7X0wkDazRRN5aUKgpFYU7bPCEj_H5A@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Oct 20, 2011 at 23:38, Rohit J <mipsjunkie@gmail.com> wrote: > Hi FreeBSD MIPS Gurus, > > Am just starting on MIPS assembly in FreeBSD. > > The code that I have was building just fine. > Then I added an line to a .S file @line# 513 > > =C2=A0 =C2=A0 sd =C2=A0k0, mpl(sp) > > which on make gives an error that says : > > =C2=A0Assembler messages: > octeon_asm.S:440: Error: illegal operands `ld T3,8($7)' > octeon_asm.S:513: Error: Macro used $at after ".set noat" > > The .S file has a noat directive > =C2=A0.set noat > > Silly Questions > 1. =C2=A0 =C2=A0 =C2=A0Why does sd instruction (store double word) end up= using at ? > I checked the particular manual (Cavium Octeon H/w reference Manual) > and didn=E2=80=99t find anything about sd instr using register at. Probably you are using a symbol/macro that is not locally defined, and so assembler assumes it's an external data reference, and tries to turn sd into a series of instructions using the assembler temporary to load a linker-resolved address into a register to be used in the sd instruction. Try running just the C preprocessor and looking at the resulting assembly to see what's not being resolved properly. > 2. =C2=A0 =C2=A0 =C2=A0Why does it complain about ld instr so far up in t= he file away from > the place > new code was inserted? Can you send the source inline? I suspect you're missing an include or something. Did you change that line? Are you compiling it as it's built on stock FreeBSD, or are you, say, copying the file from the kernel and then trying to build it in userland?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACVs6=8F=QfEKtr5%2BsNrC3cn%2BK6fA%2BOKsHEu7fixLqsO3dUnuA>