Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mom1U-0003su-FQ for qemu-devel@nongnu.org; Fri, 18 Sep 2009 18:33:48 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mom1P-0003kt-7Y for qemu-devel@nongnu.org; Fri, 18 Sep 2009 18:33:47 -0400 Received: from [199.232.76.173] (port=38474 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mom1P-0003kh-3j for qemu-devel@nongnu.org; Fri, 18 Sep 2009 18:33:43 -0400 Received: from va3ehsobe003.messaging.microsoft.com ([216.32.180.13]:57623 helo=VA3EHSOBE003.bigfish.com) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_MD5:16) (Exim 4.60) (envelope-from ) id 1Mom1O-0003Ao-QG for qemu-devel@nongnu.org; Fri, 18 Sep 2009 18:33:42 -0400 Received: from mail66-va3 (localhost.localdomain [127.0.0.1]) by mail66-va3-R.bigfish.com (Postfix) with ESMTP id 541EF3080A8 for ; Fri, 18 Sep 2009 22:33:41 +0000 (UTC) Received: from ausb3extmailp02.amd.com (ausb3extmailp02.amd.com [163.181.251.22]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail66-va3.bigfish.com (Postfix) with ESMTP id CF60D6B8056 for ; Fri, 18 Sep 2009 22:33:39 +0000 (UTC) Received: from ausb3twp02.amd.com ([163.181.250.38]) by ausb3extmailp02.amd.com (Switch-3.2.7/Switch-3.2.7) with ESMTP id n8IMXag5031017 for ; Fri, 18 Sep 2009 17:33:39 -0500 Received: from sausexbh2.amd.com (SAUSEXBH2.amd.com [163.181.22.102]) by ausb3twp02.amd.com (Tumbleweed MailGate 3.7.0) with ESMTP id 223E4C8538 for ; Fri, 18 Sep 2009 17:33:34 -0500 (CDT) Received: from localhost.localdomain (hagen.osrc.amd.com [165.204.15.42]) by mail.osrc.amd.com (Postfix) with ESMTP id 9AFAB49C113 for ; Fri, 18 Sep 2009 23:33:23 +0100 (BST) From: Andre Przywara Date: Sat, 19 Sep 2009 00:30:45 +0200 Message-ID: <1253313049-25874-1-git-send-email-andre.przywara@amd.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH 0/4] TCG: add some instructions List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hi, this patch series adds some instructions to the x86 TCG emulator. They are all AMD originated, although RDTSCP is also implemented in recent Intel CPUs. They are: Patch 1: lzcnt (count leading zero bits in a word) Patch 2: lock mov cr0 = mov cr8 (access to TPR in 32-bit mode) Patch 3: extrq, insertq, movntss, movntsd (SSE4a instructions) Patch 4: rdtscp (read TSC plus aux MSR) This adds a new field to CPUX86State and thus bumps the SAVE_VERSION for the CPU. I am not very experienced in TCG, but I have written tests to check the functionality of the implementation. Those tests use inline assembly to trigger the opcodes and check their results with "golden" precalculated values. The tests showed the same results in linux-user and on the native hardware. Please review! Regards, Andre.