aboutsummaryrefslogtreecommitdiffstats
path: root/tools/tests
diff options
context:
space:
mode:
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2006-01-05 12:19:12 +0100
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2006-01-05 12:19:12 +0100
commit7d947ac220c8b227ab97c5997c0c010e609b3cc6 (patch)
treef4dcbc686af20afe8c0ff1c3f2f9674db44c49c5 /tools/tests
parentdc88367fa15eb83d2372210b5fe1fb6c0c771946 (diff)
downloadxen-7d947ac220c8b227ab97c5997c0c010e609b3cc6.tar.gz
xen-7d947ac220c8b227ab97c5997c0c010e609b3cc6.tar.bz2
xen-7d947ac220c8b227ab97c5997c0c010e609b3cc6.zip
Fix up x86 emulator header docs and ensure callers use
the X86EMUL_MODE enumeration. Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'tools/tests')
-rw-r--r--tools/tests/test_x86_emulator.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/tools/tests/test_x86_emulator.c b/tools/tests/test_x86_emulator.c
index f1c1a51583..46c98d1b1e 100644
--- a/tools/tests/test_x86_emulator.c
+++ b/tools/tests/test_x86_emulator.c
@@ -92,7 +92,7 @@ int main(int argc, char **argv)
regs.ecx = 0x12345678;
cr2 = (unsigned long)&res;
res = 0x7FFFFFFF;
- rc = x86_emulate_memop(&regs, cr2, &emulops, 4);
+ rc = x86_emulate_memop(&regs, cr2, &emulops, X86EMUL_MODE_PROT32);
if ( (rc != 0) ||
(res != 0x92345677) ||
(regs.eflags != 0xa94) ||
@@ -110,7 +110,7 @@ int main(int argc, char **argv)
regs.ecx = 0x12345678UL;
#endif
cr2 = (unsigned long)&res;
- rc = x86_emulate_memop(&regs, cr2, &emulops, 4);
+ rc = x86_emulate_memop(&regs, cr2, &emulops, X86EMUL_MODE_PROT32);
if ( (rc != 0) ||
(res != 0x92345677) ||
(regs.ecx != 0x8000000FUL) ||
@@ -125,7 +125,7 @@ int main(int argc, char **argv)
regs.eax = 0x92345677UL;
regs.ecx = 0xAA;
cr2 = (unsigned long)&res;
- rc = x86_emulate_memop(&regs, cr2, &emulops, 4);
+ rc = x86_emulate_memop(&regs, cr2, &emulops, X86EMUL_MODE_PROT32);
if ( (rc != 0) ||
(res != 0x923456AA) ||
(regs.eflags != 0x244) ||
@@ -141,7 +141,7 @@ int main(int argc, char **argv)
regs.eax = 0xAABBCC77UL;
regs.ecx = 0xFF;
cr2 = (unsigned long)&res;
- rc = x86_emulate_memop(&regs, cr2, &emulops, 4);
+ rc = x86_emulate_memop(&regs, cr2, &emulops, X86EMUL_MODE_PROT32);
if ( (rc != 0) ||
(res != 0x923456AA) ||
((regs.eflags&0x240) != 0x200) ||
@@ -157,7 +157,7 @@ int main(int argc, char **argv)
regs.eip = (unsigned long)&instr[0];
regs.ecx = 0x12345678;
cr2 = (unsigned long)&res;
- rc = x86_emulate_memop(&regs, cr2, &emulops, 4);
+ rc = x86_emulate_memop(&regs, cr2, &emulops, X86EMUL_MODE_PROT32);
if ( (rc != 0) ||
(res != 0x12345678) ||
(regs.eflags != 0x200) ||
@@ -174,7 +174,7 @@ int main(int argc, char **argv)
regs.eax = 0x923456AAUL;
regs.ecx = 0xDDEEFF00L;
cr2 = (unsigned long)&res;
- rc = x86_emulate_memop(&regs, cr2, &emulops, 4);
+ rc = x86_emulate_memop(&regs, cr2, &emulops, X86EMUL_MODE_PROT32);
if ( (rc != 0) ||
(res != 0xDDEEFF00) ||
(regs.eflags != 0x244) ||
@@ -193,7 +193,7 @@ int main(int argc, char **argv)
regs.edi = (unsigned long)&res + 2;
regs.error_code = 0; /* read fault */
cr2 = regs.esi;
- rc = x86_emulate_memop(&regs, cr2, &emulops, 4);
+ rc = x86_emulate_memop(&regs, cr2, &emulops, X86EMUL_MODE_PROT32);
if ( (rc != 0) ||
(res != 0x44554455) ||
(regs.eflags != 0x200) ||
@@ -211,7 +211,7 @@ int main(int argc, char **argv)
regs.eip = (unsigned long)&instr[0];
regs.edi = (unsigned long)&res;
cr2 = regs.edi;
- rc = x86_emulate_memop(&regs, cr2, &emulops, 4);
+ rc = x86_emulate_memop(&regs, cr2, &emulops, X86EMUL_MODE_PROT32);
if ( (rc != 0) ||
(res != 0x2233445D) ||
((regs.eflags&0x201) != 0x201) ||
@@ -229,7 +229,7 @@ int main(int argc, char **argv)
regs.eip = (unsigned long)&instr[0];
regs.edi = (unsigned long)cmpxchg8b_res;
cr2 = regs.edi;
- rc = x86_emulate_memop(&regs, cr2, &emulops, 4);
+ rc = x86_emulate_memop(&regs, cr2, &emulops, X86EMUL_MODE_PROT32);
if ( (rc != 0) ||
(cmpxchg8b_res[0] != 0x9999AAAA) ||
(cmpxchg8b_res[1] != 0xCCCCFFFF) ||
@@ -243,7 +243,7 @@ int main(int argc, char **argv)
regs.eip = (unsigned long)&instr[0];
regs.edi = (unsigned long)cmpxchg8b_res;
cr2 = regs.edi;
- rc = x86_emulate_memop(&regs, cr2, &emulops, 4);
+ rc = x86_emulate_memop(&regs, cr2, &emulops, X86EMUL_MODE_PROT32);
if ( (rc != 0) ||
(cmpxchg8b_res[0] != 0x9999AAAA) ||
(cmpxchg8b_res[1] != 0xCCCCFFFF) ||
@@ -260,7 +260,7 @@ int main(int argc, char **argv)
regs.ecx = 0x12345678;
cr2 = (unsigned long)&res;
res = 0x82;
- rc = x86_emulate_memop(&regs, cr2, &emulops, 4);
+ rc = x86_emulate_memop(&regs, cr2, &emulops, X86EMUL_MODE_PROT32);
if ( (rc != 0) ||
(res != 0x82) ||
(regs.ecx != 0xFFFFFF82) ||
@@ -275,7 +275,7 @@ int main(int argc, char **argv)
regs.ecx = 0x12345678;
cr2 = (unsigned long)&res;
res = 0x1234aa82;
- rc = x86_emulate_memop(&regs, cr2, &emulops, 4);
+ rc = x86_emulate_memop(&regs, cr2, &emulops, X86EMUL_MODE_PROT32);
if ( (rc != 0) ||
(res != 0x1234aa82) ||
(regs.ecx != 0xaa82) ||