From 99bf728c7c15ee27cd860763c12d2c8eac4181a3 Mon Sep 17 00:00:00 2001 From: compudj Date: Wed, 13 Aug 2008 16:58:44 +0000 Subject: [PATCH] update test git-svn-id: http://ltt.polymtl.ca/svn@3013 04897980-b3bd-0310-b5e0-8ef037075253 --- trunk/tests/kernel/test-nop-speed.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/trunk/tests/kernel/test-nop-speed.c b/trunk/tests/kernel/test-nop-speed.c index f75af525..2749e5f4 100644 --- a/trunk/tests/kernel/test-nop-speed.c +++ b/trunk/tests/kernel/test-nop-speed.c @@ -11,11 +11,16 @@ #define NR_TESTS 20000 +int var, var2; + struct proc_dir_entry *pentry = NULL; void empty(void) { asm volatile (""); + var += 50; + var /= 10; + var *= var2; } void twobytesjump(void) @@ -23,26 +28,41 @@ void twobytesjump(void) asm volatile ("jmp 1f\n\t" ".byte 0x00, 0x00, 0x00\n\t" "1:\n\t"); + var += 50; + var /= 10; + var *= var2; } void fivebytesjump(void) { asm (".byte 0xe9, 0x00, 0x00, 0x00, 0x00\n\t"); + var += 50; + var /= 10; + var *= var2; } void threetwonops(void) { asm (".byte 0x66,0x66,0x90,0x66,0x90\n\t"); + var += 50; + var /= 10; + var *= var2; } void fivebytesnop(void) { asm (".byte 0x66,0x66,0x66,0x66,0x90\n\t"); + var += 50; + var /= 10; + var *= var2; } void fivebytespsixnop(void) { asm (".byte 0x0f,0x1f,0x44,0x00,0\n\t"); + var += 50; + var /= 10; + var *= var2; } void perform_test(const char *name, void (*callback)(void)) -- 2.34.1