Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754884AbZKSJu0 (ORCPT ); Thu, 19 Nov 2009 04:50:26 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753004AbZKSJuZ (ORCPT ); Thu, 19 Nov 2009 04:50:25 -0500 Received: from mail-pw0-f42.google.com ([209.85.160.42]:64965 "EHLO mail-pw0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752029AbZKSJuY (ORCPT ); Thu, 19 Nov 2009 04:50:24 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=kOvqH6QKHbZwU+r7SqRDT5RLmRx9BHg3dfg5CruXTLX0iNwoFN3dCU3+inpe+Foaxw nTLrJbr6gckEr6cMdGabxE5FFuMFs1q7IzTtMFtaM9dd1SxQo6MOXepym9NHTn5Uf68L N/U9vTZfJwWKQ1cwPB5F0IsP4hrXG59G8UEVg= MIME-Version: 1.0 Date: Thu, 19 Nov 2009 17:50:30 +0800 Message-ID: Subject: How to move two valuables to x86 CPU register ebx, ecx by using AT&A inline asm. From: Johnny Hung To: kernelnewbies@nl.linux.org, linux-kernel@vger.kernel.org, linux-embedded@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 766 Lines: 25 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/