Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/dyninst/test1.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,16 @@

unsigned long get_pointer()
{
// Build the value low-byte-first so that its least-significant bytes are
// identical regardless of pointer width. The testsuite runs a 64-bit
// mutator against 32-bit mutatees (BUILD_RTLIB_32); a pointer-sized
// constant produced in the 64-bit mutator is passed to the 32-bit mutatee
// truncated to 32 bits, so mutator and mutatee must agree on the low 32
// bits. The previous high-byte-first shift made them diverge (mutator low
// 32 = 0xa4a5a6a7 vs mutatee 0xa0a1a2a3), failing e.g. test1_2 on i386.
unsigned long val = 0UL;
for(short i = 0; i < (short)(sizeof(void *)); i++) {
val = (val << 8)|((i&0xFF)|0xA0);
val |= (unsigned long)((i & 0xFF) | 0xA0) << (8 * i);
}
return val;
}
Expand Down
6 changes: 6 additions & 0 deletions src/specification/spec-grouped.pl
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,12 @@
mutator('test2_1', ['test2_1.C']).
test_runmode('test2_1', 'createProcess').
test_start_state('test2_1', 'selfstart').
% test1_5 and test1_6 exercise 64-bit integer operations (long long
% compares / >2^32 mul/div) in snippets, which the i386 (32-bit) snippet
% register model cannot represent. Restrict them to the 64-bit ABI.
restricted_amd64_abi('test1_5').
restricted_amd64_abi('test1_6').

restricted_amd64_abi('test2_1').
tests_module('test2_1', 'dyninst').

Expand Down
Loading
Loading