Files
ftmemsim-valgrind/VEX/switchback/test_hello.c
Julian Seward a808d9da5a A very simple dynamic translator built on Vex, for the purpose of
debugging Vex using the binary-search-switchback technique


git-svn-id: svn://svn.valgrind.org/vex/trunk@889
2005-02-12 13:02:24 +00:00

40 lines
491 B
C

static void bar ( void*(*service)(int,int) )
{
int i;
for (i = 0; i < 100000; i++) ;
service(1, 'h');
service(1, 'e');
service(1, 'l');
service(1, 'l');
service(1, 'o');
service(1, '\n');
}
asm(
"nop\n"
"nop\n"
"nop\n"
"nop\n"
"nop\n"
"nop\n"
"nop\n"
"nop\n"
".align 8\n"
".byte 0x11\n"
".byte 0x22\n"
".byte 0x33\n"
".byte 0x44\n"
".byte 0x55\n"
".byte 0x66\n"
".byte 0x77\n"
".byte 0x88\n"
);
void entry ( void*(*service)(int,int) )
{
bar(service);
service(0,0);
}