[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <cb9ecdfa0911190150w4edbacdfp24a7069c618193f4@mail.gmail.com>
Date: Thu, 19 Nov 2009 17:50:30 +0800
From: Johnny Hung <johnny.hacking@...il.com>
To: kernelnewbies@...linux.org, linux-kernel@...r.kernel.org,
linux-embedded@...r.kernel.org
Subject: How to move two valuables to x86 CPU register ebx, ecx by using AT&A
inline asm.
Hi All:
I want to move two local valuables to x86 arch CPU ebx, ecx
register and do outb cpu instruction by using AT&A inline asm in
kernel driver. The following code was I wrote but gcc report syntax
error:
==
unsigned int val = 10;
unsigned int tmp = 5;
....
__asm__ volatile ("movl %0, %%ebx"
"movl %1, %%ecx"
"outb $0x27, $0xb2"
:
:"r"(val), "r"(tmp)
:"%ebx", "%ecx"
);
Does anyone can point me out. Any reply is appreciated.
BRs, H. Johnny
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists