Messages in this thread | | | Date | Mon, 27 Mar 2000 23:59:06 -0500 (EST) | From | Doug Ledford <> | Subject | Re: KNI in userspace- kernel patch? |
| |
On Mon, 27 Mar 2000, Oliver Xymoron wrote:
> On Mon, 27 Mar 2000, David Konerding wrote: > > > But the following code just gives a segfault. Am I missing something from my > > KNI code? > > > > int a=5; > > int test2() { > > __asm__("movq 0x00(%0), %%mm0\n\t" > > "movq 0x08(%0), %%mm1\n\t" > > "movq 0x10(%0), %%mm2\n\t" > > "movq 0x18(%0), %%mm3\n\t" > > :: "r" (a)); > > } > > Uh, you seem to be treating "a" as a pointer, so you're dereferencing > something in small-offset-from-null-pointer-land.
Not to mention that the above is all mmx based code, not KNI based code, and should run on any processor with mmx registers. This should work better as a test:
unsigner char a[64]; int test2() { __asm__("movups 0x00(%0), %%xmm0\n\t" "movups 0x10(%0), %%xmm1\n\t" "movups 0x20(%0), %%xmm2\n\t" "movups 0x30(%0), %%xmm3\n\t" :: "r" (&a[0]));
-- Doug Ledford <dledford@redhat.com> Opinions expressed are my own, but they should be everybody's.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |