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 18 #define A0 r0 19 #define A0L r0l 20 #define A0H r0h 21 22 #define A1 r1 23 #define A1L r1l 24 #define A1H r1h 25 26 #define A2 r2 27 #define A2L r2l 28 #define A2H r2h 29 30 #define A3 r3 31 #define A3L r3l 32 #define A3H r3h 33 34 #define S0 r4 35 #define S0L r4l 36 #define S0H r4h 37 38 #define S1 r5 39 #define S1L r5l 40 #define S1H r5h 41 42 #define S2 r6 43 #define S2L r6l 44 #define S2H r6h 45 46 #ifdef __H8300__ 47 48 #define MOVP mov.w /* pointers are 16 bits */ 49 #define ADDP add.w 50 #define CMPP cmp.w 51 #define PUSHP push 52 #define POPP pop 53 54 #define A0P r0 55 #define A1P r1 56 #define A2P r2 57 #define A3P r3 58 #define S0P r4 59 #define S1P r5 60 #define S2P r6 61 62 #endif /* __H8300__ */ 63 64 #ifdef __H8300H__ 65 66 #ifdef __NORMAL_MODE__ 67 68 #define MOVP mov.w /* pointers are 16 bits */ 69 #define ADDP add.w 70 #define CMPP cmp.w 71 #define PUSHP push 72 #define POPP pop 73 74 #define A0P r0 75 #define A1P r1 76 #define A2P r2 77 #define A3P r3 78 #define S0P r4 79 #define S1P r5 80 #define S2P r6 81 82 #else /* !__NORMAL_MODE__ */ 83 84 #define MOVP mov.l /* pointers are 32 bits */ 85 #define ADDP add.l 86 #define CMPP cmp.l 87 #define PUSHP push.l 88 #define POPP pop.l 89 90 #define A0P er0 91 #define A1P er1 92 #define A2P er2 93 #define A3P er3 94 #define S0P er4 95 #define S1P er5 96 #define S2P er6 97 98 #endif /* !__NORMAL_MODE__ */ 99 100 #define A0E e0 101 #define A1E e1 102 #define A2E e2 103 #define A3E e3 104 105 #endif /* __H8300H__ */ 106 107 #if defined (__H8300S__) || defined (__H8300SX__) 108 109 #ifdef __NORMAL_MODE__ 110 111 #define MOVP mov.w /* pointers are 16 bits */ 112 #define ADDP add.w 113 #define CMPP cmp.w 114 #define PUSHP push 115 #define POPP pop 116 117 #define A0P r0 118 #define A1P r1 119 #define A2P r2 120 #define A3P r3 121 #define S0P r4 122 #define S1P r5 123 #define S2P r6 124 125 #else /* !__NORMAL_MODE__ */ 126 127 #define MOVP mov.l /* pointers are 32 bits */ 128 #define ADDP add.l 129 #define CMPP cmp.l 130 #define PUSHP push.l 131 #define POPP pop.l 132 133 #define A0P er0 134 #define A1P er1 135 #define A2P er2 136 #define A3P er3 137 #define S0P er4 138 #define S1P er5 139 #define S2P er6 140 141 #endif /* !__NORMAL_MODE__ */ 142 143 #define A0E e0 144 #define A1E e1 145 #define A2E e2 146 #define A3E e3 147 148 149 #ifdef __NORMAL_MODE__ 150 #define LEN(X) X 151 #else 152 #define LEN(X) e##X 153 #endif 154 #endif /* __H8300S__ */ 155