repository: /home/avi/kvm
branch: master
commit f9cabd65037d687a329817517ac675b1ac6a0149
Author: Avi Kivity <[EMAIL PROTECTED]>
Date:   Thu Dec 6 19:50:29 2007 +0200

    kvm: testsuite: add mov %cr8 test
    
    Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>

diff --git a/user/test/x86/emulator.c b/user/test/x86/emulator.c
index 626e02b..d3fb999 100644
--- a/user/test/x86/emulator.c
+++ b/user/test/x86/emulator.c
@@ -92,6 +92,17 @@ void test_cmps(void *mem)
 
 }
 
+void test_cr8(void)
+{
+       unsigned long src, dst;
+
+       dst = 777;
+       src = 3;
+       asm volatile("mov %[src], %%cr8; mov %%cr8, %[dst]"
+                    : [dst]"+r"(dst), [src]"+r"(src));
+       report("mov %cr8", dst == 3 && src == 3);
+}
+
 void test_push(void *mem)
 {
        unsigned long tmp;
@@ -139,6 +150,8 @@ int main()
 
        test_push(mem);
 
+       test_cr8();
+
        printf("\nSUMMARY: %d tests, %d failures\n", tests, fails);
        return fails ? 1 : 0;
 }

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
kvm-commits mailing list
kvm-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-commits

Reply via email to