1#include "pthread_impl.h" 2 3void __unmapself_sh_mmu(void *, size_t); 4void __unmapself_sh_nommu(void *, size_t); 5 6#if !defined(__SH3__) && !defined(__SH4__) 7#define __unmapself __unmapself_sh_nommu 8#include "dynlink.h" 9#undef CRTJMP 10#define CRTJMP(pc,sp) __asm__ __volatile__( \ 11 "mov.l @%0+,r0 ; mov.l @%0,r12 ; jmp @r0 ; mov %1,r15" \ 12 : : "r"(pc), "r"(sp) : "r0", "memory" ) 13#include "../__unmapself.c" 14#undef __unmapself 15extern __attribute__((__visibility__("hidden"))) unsigned __sh_nommu; 16#else 17#define __sh_nommu 0 18#endif 19 20void __unmapself(void *base, size_t size) 21{ 22 if (__sh_nommu) __unmapself_sh_nommu(base, size); 23 else __unmapself_sh_mmu(base, size); 24} 25