Changeset 11793
- Timestamp:
- 04/28/09 20:24:10 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp
r11792 r11793 1154 1154 `(setf (gethash ,opcodes +resolvers+) (symbol-function ',name))))))) 1155 1155 1156 ;; aload 1157 (define-resolver 25 (instruction) 1156 (defun load/store-resolver (instruction inst-index inst-index2 error-text) 1158 1157 (let* ((args (instruction-args instruction)) 1159 1158 (index (car args))) 1160 1159 (declare (type (unsigned-byte 16) index)) 1161 1160 (cond ((<= 0 index 3) 1162 (inst (+ index 42)))1161 (inst (+ index inst-index))) 1163 1162 ((<= 0 index 255) 1164 (inst 25index))1163 (inst inst-index2 index)) 1165 1164 (t 1166 (error "ALOAD unsupported case"))))) 1165 (error error-text))))) 1166 1167 ;; aload 1168 (define-resolver 25 (instruction) 1169 (load/store-resolver instruction 42 25 "ALOAD unsupported case")) 1167 1170 1168 1171 ;; astore 1169 1172 (define-resolver 58 (instruction) 1170 (let* ((args (instruction-args instruction)) 1171 (index (car args))) 1172 (declare (type (unsigned-byte 16) index)) 1173 (cond ((<= 0 index 3) 1174 (inst (+ index 75))) 1175 ((<= 0 index 255) 1176 (inst 58 index)) 1177 (t 1178 (error "ASTORE unsupported case"))))) 1173 (load/store-resolver instruction 75 58 "ASTORE unsupported case")) 1179 1174 1180 1175 ;; iload 1181 1176 (define-resolver 21 (instruction) 1182 (let* ((args (instruction-args instruction)) 1183 (index (car args))) 1184 (declare (type (unsigned-byte 16) index)) 1185 (cond ((<= 0 index 3) 1186 (inst (+ index 26))) 1187 ((<= 0 index 255) 1188 (inst 21 index)) 1189 (t 1190 (error "ILOAD unsupported case"))))) 1177 (load/store-resolver instruction 26 21 "ILOAD unsupported case")) 1191 1178 1192 1179 ;; istore 1193 1180 (define-resolver 54 (instruction) 1194 (let* ((args (instruction-args instruction)) 1195 (index (car args))) 1196 (declare (type (unsigned-byte 16) index)) 1197 (cond ((<= 0 index 3) 1198 (inst (+ index 59))) 1199 ((<= 0 index 255) 1200 (inst 54 index)) 1201 (t 1202 (error "ASTORE unsupported case"))))) 1181 (load/store-resolver instruction 59 54 "ISTORE unsupported case")) 1203 1182 1204 1183 ;; lload 1205 1184 (define-resolver 22 (instruction) 1206 (let* ((args (instruction-args instruction)) 1207 (index (car args))) 1208 (declare (type (unsigned-byte 16) index)) 1209 (cond ((<= 0 index 3) 1210 (inst (+ index 30))) 1211 ((<= 0 index 255) 1212 (inst 22 index)) 1213 (t 1214 (error "LLOAD unsupported case"))))) 1185 (load/store-resolver instruction 30 22 "LLOAD unsupported case")) 1215 1186 1216 1187 ;; lstore 1217 1188 (define-resolver 55 (instruction) 1218 (let* ((args (instruction-args instruction)) 1219 (index (car args))) 1220 (declare (type (unsigned-byte 16) index)) 1221 (cond ((<= 0 index 3) 1222 (inst (+ index 63))) 1223 ((<= 0 index 255) 1224 (inst 55 index)) 1225 (t 1226 (error "ASTORE unsupported case"))))) 1189 (load/store-resolver instruction 63 55 "LSTORE unsupported case")) 1227 1190 1228 1191 ;; getstatic, putstatic
Note: See TracChangeset
for help on using the changeset viewer.