1 /* 2 Copyright (c) 1990 The Regents of the University of California. 3 All rights reserved. 4 5 Redistribution and use in source and binary forms are permitted 6 provided that the above copyright notice and this paragraph are 7 duplicated in all such forms and that any documentation, 8 and/or other materials related to such 9 distribution and use acknowledge that the software was developed 10 by the University of California, Berkeley. The name of the 11 University may not be used to endorse or promote products derived 12 from this software without specific prior written permission. 13 THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 14 IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 15 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 16 */ 17 #ifdef __STDC__ 18 # define _C_LABEL(x) _ ## x 19 #else 20 # define _C_LABEL(x) _/**/x 21 #endif 22 #define _ASM_LABEL(x) x 23 24 #if __SH5__ 25 # if __SH5__ == 32 && __SHMEDIA__ 26 # define TEXT .section .text..SHmedia32, "ax" 27 # else 28 # define TEXT .text 29 # endif 30 31 # define _ENTRY(name) \ 32 TEXT; .balign 8; .globl name; name: 33 #else 34 #define _ENTRY(name) \ 35 .text; .align 2; .globl name; name: 36 #endif /* __SH5__ */ 37 38 #define ENTRY(name) \ 39 _ENTRY(_C_LABEL(name)) 40 41 #if (defined (__sh2__) || defined (__SH2E__) || defined (__sh3__) || defined (__SH3E__) \ 42 || defined (__SH4_SINGLE__) || defined (__SH4__)) \ 43 || defined (__SH4_SINGLE_ONLY__) || defined (__SH5__) || defined (__SH2A__) 44 #define DELAYED_BRANCHES 45 #define SL(branch, dest, in_slot, in_slot_arg2) \ 46 branch##.s dest; in_slot, in_slot_arg2 47 #else 48 #define SL(branch, dest, in_slot, in_slot_arg2) \ 49 in_slot, in_slot_arg2; branch dest 50 #endif 51 52 #ifdef __LITTLE_ENDIAN__ 53 #define SHHI shlld 54 #define SHLO shlrd 55 #else 56 #define SHHI shlrd 57 #define SHLO shlld 58 #endif 59