From aab39a094e0f1b69d661999e3298972ef3060aa0 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Wed, 25 Apr 2012 11:44:02 -0700 Subject: Delete everything under sysdeps/unix/sparc/ * sysdeps/unix/sparc/brk.S: Delete. * sysdeps/unix/sparc/dl-brk.S: Delete. * sysdeps/unix/sparc/pipe.S: Delete. * sysdeps/unix/sparc/sysdep.S: Delete. * sysdeps/unix/sparc/sysdep.h: Delete. * sysdeps/unix/sparc/vfork.S: Delete. * sysdeps/sparc/sysdep.h (SPARC_PIC_THUNK, SPARC_PIC_REG, SPARC_PIC_REG_LEAF, ENTRY, END, LOC): Define. * sysdeps/unix/sysv/linux/sparc/sysdep.h (ret, ret_NOERRNO, ret_ERRVAL, r0, r1, MOVE): Define. (JUMPTARGET): Remove. * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h: Don't include sysdeps/unix/sparc/sysdep.h (ENTRY, END): Remove. * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h: Likewise. --- sysdeps/sparc/sysdep.h | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) (limited to 'sysdeps/sparc') diff --git a/sysdeps/sparc/sysdep.h b/sysdeps/sparc/sysdep.h index 8a7546bec9..2702620be6 100644 --- a/sysdeps/sparc/sysdep.h +++ b/sysdeps/sparc/sysdep.h @@ -42,3 +42,53 @@ #define HWCAP_SPARC_IMA 0x00400000 #define HWCAP_SPARC_ASI_CACHE_SPARING \ 0x00800000 + +#ifdef __ASSEMBLER__ + +#define SPARC_PIC_THUNK(reg) \ + .ifndef __sparc_get_pc_thunk.reg; \ + .section .text.__sparc_get_pc_thunk.reg,"axG",@progbits,__sparc_get_pc_thunk.reg,comdat; \ + .align 32; \ + .weak __sparc_get_pc_thunk.reg; \ + .hidden __sparc_get_pc_thunk.reg; \ + .type __sparc_get_pc_thunk.reg, #function; \ +__sparc_get_pc_thunk.reg: \ + jmp %o7 + 8; \ + add %o7, %reg, %##reg; \ + .previous; \ + .endif; + +/* Even when v9 we use a call sequence instead of using "rd %pc" because + RDPC is extremely expensive and incurs a full pipeline flush. */ + +#define SETUP_PIC_REG(reg) \ + SPARC_PIC_THUNK(reg) \ + sethi %hi(_GLOBAL_OFFSET_TABLE_-4), %##reg; \ + call __sparc_get_pc_thunk.reg; \ + or %##reg, %lo(_GLOBAL_OFFSET_TABLE_+4), %##reg; + +#define SETUP_PIC_REG_LEAF(reg, tmp) \ + SPARC_PIC_THUNK(reg) \ + sethi %hi(_GLOBAL_OFFSET_TABLE_-4), %##reg; \ + mov %o7, %##tmp; \ + call __sparc_get_pc_thunk.reg; \ + or %##reg, %lo(_GLOBAL_OFFSET_TABLE_+4), %##reg; \ + mov %##tmp, %o7; + +#undef ENTRY +#define ENTRY(name) \ + .align 4; \ + .global C_SYMBOL_NAME(name); \ + .type name, @function; \ +C_LABEL(name) \ + cfi_startproc; + +#undef END +#define END(name) \ + cfi_endproc; \ + .size name, . - name + +#undef LOC +#define LOC(name) .L##name + +#endif /* __ASSEMBLER__ */ -- cgit v1.2.3-70-g09d2