Home | History | Annotate | Download | only in amd64

Lines Matching refs:code

2 /* Test Valgrind's ability to spot writes to code which has been
18 WRONG output (if you fail to spot code-writes to code[0 .. 4]) is
50 // code on the heap therefore
51 static UChar* code;
53 /* Make `code' be movabsq $dest, %rax ; pushq %rax ; ret */
60 code[0] = 0x48;
61 code[1] = 0xB8;
62 code[2] = (dest & 0xFF);
63 code[3] = ((dest >> 8) & 0xFF);
64 code[4] = ((dest >> 16) & 0xFF);
65 code[5] = ((dest >> 24) & 0xFF);
66 code[6] = ((dest >> 32) & 0xFF);
67 code[7] = ((dest >> 40) & 0xFF);
68 code[8] = ((dest >> 48) & 0xFF);
69 code[9] = ((dest >> 56) & 0xFF);
72 code[10] = 0x50;
75 code[11] = 0xC3;
78 /* Calling aa gets eventually to the function residing in code[0..].
82 shouldn't if main calls code[] directly. */
84 // force an indirect branch to code[0], so vex can't chase it
89 void cc ( int x ) { dd(x, (void(*)(int)) &code[0]); }
103 code = mmap(NULL, 20, PROT_READ|PROT_WRITE|PROT_EXEC,
105 assert(code != MAP_FAILED);
114 munmap(code, 20);