Comment 3 for bug 555127

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

FWIW, the test which is failing seems to allocate a block of memory and then fills it with return instructions. The return instruction for the build architecture is defined at the top of the source file, but there is no return instruction defined for ia64

/* This program assumes that a whole number of return instructions fit into
 * 32 bits, and that 32-bit alignment is sufficient for a branch destination.
 */

#if defined __i386__ || defined __x86_64__ || \
  defined __i386 || defined __x86_64 || \
  defined _M_IX86 || defined _M_AMD64
#define RETURN_INSTR 0xC3C3C3C3 /* ret; ret; ret; ret */

#elif defined __arm__ || defined _M_ARM
#define RETURN_INSTR 0xE12FFF1E /* bx lr */

// PPC has its own style of CPU-id #defines. There is no Windows for
// PPC as far as I know, so no _M_ variant.
#elif defined _ARCH_PPC || defined _ARCH_PWR || defined _ARCH_PWR2
#define RETURN_INSTR 0x4E800020 /* blr */

#elif defined __sparc || defined __sparcv9
#define RETURN_INSTR 0x81c3e008 /* retl */

#else
#error "Need return instruction for this architecture"
#endif