mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 10:05:29 +00:00
to add PPC64 LE support. The other two patches can be found in Bugzillas 334384 and 334834. Note, there are no VEX changes in this patch. PP64 Little Endian test case fixes. This patch adds new LE and BE expect files where needed. In other cases, the test was fixed to run correctly on LE and BE using based on testing to see which platform is being used. Where practical, the test cases have been changed so that the output produced for BE and LE will be identical. The test cases that require a major rewrite to make the output identical for BE and LE simply had an additional expect file added. Signed-off-by: Carl Love <carll@us.ibm.com> git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14240
20 lines
533 B
C
20 lines
533 B
C
#include "tests/sys_mman.h"
|
|
|
|
int main ( void )
|
|
{
|
|
#if defined(__powerpc64__) && _CALL_ELF != 2
|
|
/* on ppc64-linux, a function pointer points to a function
|
|
descriptor, not to the function's entry point. Hence to get
|
|
uniform behaviour on all supported targets - a jump to an
|
|
unmapped page - the following is needed. */
|
|
unsigned long long int p[3];
|
|
p[0] = (unsigned long long int)get_unmapped_page();
|
|
p[1] = 0;
|
|
p[2] = 0;
|
|
#else
|
|
char* p = get_unmapped_page();
|
|
#endif
|
|
return ((int(*)(void)) p) ();
|
|
}
|
|
|