Date: Wed, 24 Feb 2010 22:26:24 -0800 From: Patrick Mahan <mahan@mahan.org> To: "C. Jayachandran" <c.jayachandran@gmail.com> Cc: freebsd-mips@freebsd.org Subject: Re: Writing MIPS assembler instructions in C Message-ID: <19077.1267079184@mahan.org> In-Reply-To: <98a59be81002242126k5bbf5167p7cba4917c13d1256@mail.gmail.com> References: <17060.1267061906@mahan.org> <eaa228be1002241807q2613ccecy9773155e68ccda62@mail.gmail.com> <201002250236.o1P2a2oX024250@ns.mahan.org> <98a59be81002242126k5bbf5167p7cba4917c13d1256@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
>> Now my problem is I still need to force the value pointed to "addr" into >> a specific register because there is a jalr to a function else where >> that I only have binary access too and it expects it's a value in >> that register. =C2=A0Can I coerce this? > >I may be missing something here, but have you tried : > >__asm__ __volatile__( > "ld $8, 0(%0)\n\t" > "jalr $8\n" > : : "r"(addr) : "$8"); >} > >Or is there a reason this will not work? > This is the equivalent of "ld t0, 0(a0)", yes? No I tried that method as well, but without success. (or so it seemed to me). Thanks, Patrick.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19077.1267079184>