Merge commit 'origin/master'
[bpt/guile.git] / libguile / vm-i-scheme.c
1 /* Copyright (C) 2001, 2009 Free Software Foundation, Inc.
2 *
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Lesser General Public License
5 * as published by the Free Software Foundation; either version 3 of
6 * the License, or (at your option) any later version.
7 *
8 * This library is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
16 * 02110-1301 USA
17 */
18
19 /* This file is included in vm_engine.c */
20
21 \f
22 /*
23 * Predicates
24 */
25
26 #define ARGS1(a1) SCM a1 = sp[0];
27 #define ARGS2(a1,a2) SCM a1 = sp[-1], a2 = sp[0]; sp--; NULLSTACK (1);
28 #define ARGS3(a1,a2,a3) SCM a1 = sp[-2], a2 = sp[-1], a3 = sp[0]; sp -= 2; NULLSTACK (2);
29
30 #define RETURN(x) do { *sp = x; NEXT; } while (0)
31
32 VM_DEFINE_FUNCTION (100, not, "not", 1)
33 {
34 ARGS1 (x);
35 RETURN (SCM_BOOL (SCM_FALSEP (x)));
36 }
37
38 VM_DEFINE_FUNCTION (101, not_not, "not-not", 1)
39 {
40 ARGS1 (x);
41 RETURN (SCM_BOOL (!SCM_FALSEP (x)));
42 }
43
44 VM_DEFINE_FUNCTION (102, eq, "eq?", 2)
45 {
46 ARGS2 (x, y);
47 RETURN (SCM_BOOL (SCM_EQ_P (x, y)));
48 }
49
50 VM_DEFINE_FUNCTION (103, not_eq, "not-eq?", 2)
51 {
52 ARGS2 (x, y);
53 RETURN (SCM_BOOL (!SCM_EQ_P (x, y)));
54 }
55
56 VM_DEFINE_FUNCTION (104, nullp, "null?", 1)
57 {
58 ARGS1 (x);
59 RETURN (SCM_BOOL (SCM_NULLP (x)));
60 }
61
62 VM_DEFINE_FUNCTION (105, not_nullp, "not-null?", 1)
63 {
64 ARGS1 (x);
65 RETURN (SCM_BOOL (!SCM_NULLP (x)));
66 }
67
68 VM_DEFINE_FUNCTION (106, eqv, "eqv?", 2)
69 {
70 ARGS2 (x, y);
71 if (SCM_EQ_P (x, y))
72 RETURN (SCM_BOOL_T);
73 if (SCM_IMP (x) || SCM_IMP (y))
74 RETURN (SCM_BOOL_F);
75 SYNC_REGISTER ();
76 RETURN (scm_eqv_p (x, y));
77 }
78
79 VM_DEFINE_FUNCTION (107, equal, "equal?", 2)
80 {
81 ARGS2 (x, y);
82 if (SCM_EQ_P (x, y))
83 RETURN (SCM_BOOL_T);
84 if (SCM_IMP (x) || SCM_IMP (y))
85 RETURN (SCM_BOOL_F);
86 SYNC_REGISTER ();
87 RETURN (scm_equal_p (x, y));
88 }
89
90 VM_DEFINE_FUNCTION (108, pairp, "pair?", 1)
91 {
92 ARGS1 (x);
93 RETURN (SCM_BOOL (SCM_CONSP (x)));
94 }
95
96 VM_DEFINE_FUNCTION (109, listp, "list?", 1)
97 {
98 ARGS1 (x);
99 RETURN (SCM_BOOL (scm_ilength (x) >= 0));
100 }
101
102 \f
103 /*
104 * Basic data
105 */
106
107 VM_DEFINE_FUNCTION (110, cons, "cons", 2)
108 {
109 ARGS2 (x, y);
110 CONS (x, x, y);
111 RETURN (x);
112 }
113
114 #define VM_VALIDATE_CONS(x) \
115 if (SCM_UNLIKELY (!scm_is_pair (x))) \
116 { finish_args = x; \
117 goto vm_error_not_a_pair; \
118 }
119
120 VM_DEFINE_FUNCTION (111, car, "car", 1)
121 {
122 ARGS1 (x);
123 VM_VALIDATE_CONS (x);
124 RETURN (SCM_CAR (x));
125 }
126
127 VM_DEFINE_FUNCTION (112, cdr, "cdr", 1)
128 {
129 ARGS1 (x);
130 VM_VALIDATE_CONS (x);
131 RETURN (SCM_CDR (x));
132 }
133
134 VM_DEFINE_INSTRUCTION (113, set_car, "set-car!", 0, 2, 0)
135 {
136 SCM x, y;
137 POP (y);
138 POP (x);
139 VM_VALIDATE_CONS (x);
140 SCM_SETCAR (x, y);
141 NEXT;
142 }
143
144 VM_DEFINE_INSTRUCTION (114, set_cdr, "set-cdr!", 0, 2, 0)
145 {
146 SCM x, y;
147 POP (y);
148 POP (x);
149 VM_VALIDATE_CONS (x);
150 SCM_SETCDR (x, y);
151 NEXT;
152 }
153
154 \f
155 /*
156 * Numeric relational tests
157 */
158
159 #undef REL
160 #define REL(crel,srel) \
161 { \
162 ARGS2 (x, y); \
163 if (SCM_I_INUMP (x) && SCM_I_INUMP (y)) \
164 RETURN (SCM_BOOL (SCM_I_INUM (x) crel SCM_I_INUM (y))); \
165 SYNC_REGISTER (); \
166 RETURN (srel (x, y)); \
167 }
168
169 VM_DEFINE_FUNCTION (115, ee, "ee?", 2)
170 {
171 REL (==, scm_num_eq_p);
172 }
173
174 VM_DEFINE_FUNCTION (116, lt, "lt?", 2)
175 {
176 REL (<, scm_less_p);
177 }
178
179 VM_DEFINE_FUNCTION (117, le, "le?", 2)
180 {
181 REL (<=, scm_leq_p);
182 }
183
184 VM_DEFINE_FUNCTION (118, gt, "gt?", 2)
185 {
186 REL (>, scm_gr_p);
187 }
188
189 VM_DEFINE_FUNCTION (119, ge, "ge?", 2)
190 {
191 REL (>=, scm_geq_p);
192 }
193
194 \f
195 /*
196 * Numeric functions
197 */
198
199 #undef FUNC2
200 #define FUNC2(CFUNC,SFUNC) \
201 { \
202 ARGS2 (x, y); \
203 if (SCM_I_INUMP (x) && SCM_I_INUMP (y)) \
204 { \
205 scm_t_int64 n = SCM_I_INUM (x) CFUNC SCM_I_INUM (y);\
206 if (SCM_FIXABLE (n)) \
207 RETURN (SCM_I_MAKINUM (n)); \
208 } \
209 SYNC_REGISTER (); \
210 RETURN (SFUNC (x, y)); \
211 }
212
213 VM_DEFINE_FUNCTION (120, add, "add", 2)
214 {
215 FUNC2 (+, scm_sum);
216 }
217
218 VM_DEFINE_FUNCTION (167, add1, "add1", 1)
219 {
220 ARGS1 (x);
221 if (SCM_I_INUMP (x))
222 {
223 scm_t_int64 n = SCM_I_INUM (x) + 1;
224 if (SCM_FIXABLE (n))
225 RETURN (SCM_I_MAKINUM (n));
226 }
227 SYNC_REGISTER ();
228 RETURN (scm_sum (x, SCM_I_MAKINUM (1)));
229 }
230
231 VM_DEFINE_FUNCTION (121, sub, "sub", 2)
232 {
233 FUNC2 (-, scm_difference);
234 }
235
236 VM_DEFINE_FUNCTION (168, sub1, "sub1", 1)
237 {
238 ARGS1 (x);
239 if (SCM_I_INUMP (x))
240 {
241 scm_t_int64 n = SCM_I_INUM (x) - 1;
242 if (SCM_FIXABLE (n))
243 RETURN (SCM_I_MAKINUM (n));
244 }
245 SYNC_REGISTER ();
246 RETURN (scm_difference (x, SCM_I_MAKINUM (1)));
247 }
248
249 VM_DEFINE_FUNCTION (122, mul, "mul", 2)
250 {
251 ARGS2 (x, y);
252 SYNC_REGISTER ();
253 RETURN (scm_product (x, y));
254 }
255
256 VM_DEFINE_FUNCTION (123, div, "div", 2)
257 {
258 ARGS2 (x, y);
259 SYNC_REGISTER ();
260 RETURN (scm_divide (x, y));
261 }
262
263 VM_DEFINE_FUNCTION (124, quo, "quo", 2)
264 {
265 ARGS2 (x, y);
266 SYNC_REGISTER ();
267 RETURN (scm_quotient (x, y));
268 }
269
270 VM_DEFINE_FUNCTION (125, rem, "rem", 2)
271 {
272 ARGS2 (x, y);
273 SYNC_REGISTER ();
274 RETURN (scm_remainder (x, y));
275 }
276
277 VM_DEFINE_FUNCTION (126, mod, "mod", 2)
278 {
279 ARGS2 (x, y);
280 SYNC_REGISTER ();
281 RETURN (scm_modulo (x, y));
282 }
283
284 \f
285 /*
286 * GOOPS support
287 */
288 VM_DEFINE_FUNCTION (127, slot_ref, "slot-ref", 2)
289 {
290 size_t slot;
291 ARGS2 (instance, idx);
292 slot = SCM_I_INUM (idx);
293 RETURN (SCM_PACK (SCM_STRUCT_DATA (instance) [slot]));
294 }
295
296 VM_DEFINE_INSTRUCTION (128, slot_set, "slot-set", 0, 3, 0)
297 {
298 SCM instance, idx, val;
299 size_t slot;
300 POP (val);
301 POP (idx);
302 POP (instance);
303 slot = SCM_I_INUM (idx);
304 SCM_STRUCT_DATA (instance) [slot] = SCM_UNPACK (val);
305 NEXT;
306 }
307
308 VM_DEFINE_FUNCTION (129, vector_ref, "vector-ref", 2)
309 {
310 long i = 0;
311 ARGS2 (vect, idx);
312 if (SCM_LIKELY (SCM_I_IS_VECTOR (vect)
313 && SCM_I_INUMP (idx)
314 && ((i = SCM_I_INUM (idx)) >= 0)
315 && i < SCM_I_VECTOR_LENGTH (vect)))
316 RETURN (SCM_I_VECTOR_ELTS (vect)[i]);
317 else
318 {
319 SYNC_REGISTER ();
320 RETURN (scm_vector_ref (vect, idx));
321 }
322 }
323
324 VM_DEFINE_INSTRUCTION (130, vector_set, "vector-set", 0, 3, 0)
325 {
326 long i = 0;
327 SCM vect, idx, val;
328 POP (val); POP (idx); POP (vect);
329 if (SCM_LIKELY (SCM_I_IS_VECTOR (vect)
330 && SCM_I_INUMP (idx)
331 && ((i = SCM_I_INUM (idx)) >= 0)
332 && i < SCM_I_VECTOR_LENGTH (vect)))
333 SCM_I_VECTOR_WELTS (vect)[i] = val;
334 else
335 {
336 SYNC_REGISTER ();
337 scm_vector_set_x (vect, idx, val);
338 }
339 NEXT;
340 }
341
342 #define VM_VALIDATE_BYTEVECTOR(x) \
343 if (SCM_UNLIKELY (!SCM_BYTEVECTOR_P (x))) \
344 { finish_args = x; \
345 goto vm_error_not_a_bytevector; \
346 }
347
348 #define BV_REF_WITH_ENDIANNESS(stem, fn_stem) \
349 { \
350 SCM endianness; \
351 POP (endianness); \
352 if (scm_is_eq (endianness, scm_i_native_endianness)) \
353 goto VM_LABEL (bv_##stem##_native_ref); \
354 { \
355 ARGS2 (bv, idx); \
356 RETURN (scm_bytevector_##fn_stem##_ref (bv, idx, endianness)); \
357 } \
358 }
359
360 VM_DEFINE_FUNCTION (131, bv_u16_ref, "bv-u16-ref", 3)
361 BV_REF_WITH_ENDIANNESS (u16, u16)
362 VM_DEFINE_FUNCTION (132, bv_s16_ref, "bv-s16-ref", 3)
363 BV_REF_WITH_ENDIANNESS (s16, s16)
364 VM_DEFINE_FUNCTION (133, bv_u32_ref, "bv-u32-ref", 3)
365 BV_REF_WITH_ENDIANNESS (u32, u32)
366 VM_DEFINE_FUNCTION (134, bv_s32_ref, "bv-s32-ref", 3)
367 BV_REF_WITH_ENDIANNESS (s32, s32)
368 VM_DEFINE_FUNCTION (135, bv_u64_ref, "bv-u64-ref", 3)
369 BV_REF_WITH_ENDIANNESS (u64, u64)
370 VM_DEFINE_FUNCTION (136, bv_s64_ref, "bv-s64-ref", 3)
371 BV_REF_WITH_ENDIANNESS (s64, s64)
372 VM_DEFINE_FUNCTION (137, bv_f32_ref, "bv-f32-ref", 3)
373 BV_REF_WITH_ENDIANNESS (f32, ieee_single)
374 VM_DEFINE_FUNCTION (138, bv_f64_ref, "bv-f64-ref", 3)
375 BV_REF_WITH_ENDIANNESS (f64, ieee_double)
376
377 #undef BV_REF_WITH_ENDIANNESS
378
379 #define BV_FIXABLE_INT_REF(stem, fn_stem, type, size) \
380 { \
381 long i = 0; \
382 ARGS2 (bv, idx); \
383 VM_VALIDATE_BYTEVECTOR (bv); \
384 if (SCM_LIKELY (SCM_I_INUMP (idx) \
385 && ((i = SCM_I_INUM (idx)) >= 0) \
386 && (i + size <= SCM_BYTEVECTOR_LENGTH (bv)) \
387 && (i % size == 0))) \
388 RETURN (SCM_I_MAKINUM (*(scm_t_##type*) \
389 (SCM_BYTEVECTOR_CONTENTS (bv) + i))); \
390 else \
391 RETURN (scm_bytevector_##fn_stem##_ref (bv, idx)); \
392 }
393
394 #define BV_INT_REF(stem, type, size) \
395 { \
396 long i = 0; \
397 ARGS2 (bv, idx); \
398 VM_VALIDATE_BYTEVECTOR (bv); \
399 if (SCM_LIKELY (SCM_I_INUMP (idx) \
400 && ((i = SCM_I_INUM (idx)) >= 0) \
401 && (i + size <= SCM_BYTEVECTOR_LENGTH (bv)) \
402 && (i % size == 0))) \
403 { scm_t_##type x = (*(scm_t_##type*)(SCM_BYTEVECTOR_CONTENTS (bv) + i)); \
404 if (SCM_FIXABLE (x)) \
405 RETURN (SCM_I_MAKINUM (x)); \
406 else \
407 RETURN (scm_from_##type (x)); \
408 } \
409 else \
410 RETURN (scm_bytevector_##stem##_native_ref (bv, idx)); \
411 }
412
413 #define BV_FLOAT_REF(stem, fn_stem, type, size) \
414 { \
415 long i = 0; \
416 ARGS2 (bv, idx); \
417 VM_VALIDATE_BYTEVECTOR (bv); \
418 if (SCM_LIKELY (SCM_I_INUMP (idx) \
419 && ((i = SCM_I_INUM (idx)) >= 0) \
420 && (i + size <= SCM_BYTEVECTOR_LENGTH (bv)) \
421 && (i % size == 0))) \
422 RETURN (scm_from_double ((*(type*)(SCM_BYTEVECTOR_CONTENTS (bv) + i)))); \
423 else \
424 RETURN (scm_bytevector_##fn_stem##_native_ref (bv, idx)); \
425 }
426
427 VM_DEFINE_FUNCTION (139, bv_u8_ref, "bv-u8-ref", 2)
428 BV_FIXABLE_INT_REF (u8, u8, uint8, 1)
429 VM_DEFINE_FUNCTION (140, bv_s8_ref, "bv-s8-ref", 2)
430 BV_FIXABLE_INT_REF (s8, s8, int8, 1)
431 VM_DEFINE_FUNCTION (141, bv_u16_native_ref, "bv-u16-native-ref", 2)
432 BV_FIXABLE_INT_REF (u16, u16_native, uint16, 2)
433 VM_DEFINE_FUNCTION (142, bv_s16_native_ref, "bv-s16-native-ref", 2)
434 BV_FIXABLE_INT_REF (s16, s16_native, int16, 2)
435 VM_DEFINE_FUNCTION (143, bv_u32_native_ref, "bv-u32-native-ref", 2)
436 /* FIXME: u32 is always a fixnum on 64-bit builds */
437 BV_INT_REF (u32, uint32, 4)
438 VM_DEFINE_FUNCTION (144, bv_s32_native_ref, "bv-s32-native-ref", 2)
439 BV_INT_REF (s32, int32, 4)
440 VM_DEFINE_FUNCTION (145, bv_u64_native_ref, "bv-u64-native-ref", 2)
441 BV_INT_REF (u64, uint64, 8)
442 VM_DEFINE_FUNCTION (146, bv_s64_native_ref, "bv-s64-native-ref", 2)
443 BV_INT_REF (s64, int64, 8)
444 VM_DEFINE_FUNCTION (147, bv_f32_native_ref, "bv-f32-native-ref", 2)
445 BV_FLOAT_REF (f32, ieee_single, float, 4)
446 VM_DEFINE_FUNCTION (148, bv_f64_native_ref, "bv-f64-native-ref", 2)
447 BV_FLOAT_REF (f64, ieee_double, double, 8)
448
449 #undef BV_FIXABLE_INT_REF
450 #undef BV_INT_REF
451 #undef BV_FLOAT_REF
452
453
454
455 #define BV_SET_WITH_ENDIANNESS(stem, fn_stem) \
456 { \
457 SCM endianness; \
458 POP (endianness); \
459 if (scm_is_eq (endianness, scm_i_native_endianness)) \
460 goto VM_LABEL (bv_##stem##_native_set); \
461 { \
462 SCM bv, idx, val; POP (val); POP (idx); POP (bv); \
463 scm_bytevector_##fn_stem##_set_x (bv, idx, val, endianness); \
464 NEXT; \
465 } \
466 }
467
468 VM_DEFINE_INSTRUCTION (149, bv_u16_set, "bv-u16-set", 0, 4, 0)
469 BV_SET_WITH_ENDIANNESS (u16, u16)
470 VM_DEFINE_INSTRUCTION (150, bv_s16_set, "bv-s16-set", 0, 4, 0)
471 BV_SET_WITH_ENDIANNESS (s16, s16)
472 VM_DEFINE_INSTRUCTION (151, bv_u32_set, "bv-u32-set", 0, 4, 0)
473 BV_SET_WITH_ENDIANNESS (u32, u32)
474 VM_DEFINE_INSTRUCTION (152, bv_s32_set, "bv-s32-set", 0, 4, 0)
475 BV_SET_WITH_ENDIANNESS (s32, s32)
476 VM_DEFINE_INSTRUCTION (153, bv_u64_set, "bv-u64-set", 0, 4, 0)
477 BV_SET_WITH_ENDIANNESS (u64, u64)
478 VM_DEFINE_INSTRUCTION (154, bv_s64_set, "bv-s64-set", 0, 4, 0)
479 BV_SET_WITH_ENDIANNESS (s64, s64)
480 VM_DEFINE_INSTRUCTION (155, bv_f32_set, "bv-f32-set", 0, 4, 0)
481 BV_SET_WITH_ENDIANNESS (f32, ieee_single)
482 VM_DEFINE_INSTRUCTION (156, bv_f64_set, "bv-f64-set", 0, 4, 0)
483 BV_SET_WITH_ENDIANNESS (f64, ieee_double)
484
485 #undef BV_SET_WITH_ENDIANNESS
486
487 #define BV_FIXABLE_INT_SET(stem, fn_stem, type, min, max, size) \
488 { \
489 long i = 0, j = 0; \
490 SCM bv, idx, val; POP (val); POP (idx); POP (bv); \
491 VM_VALIDATE_BYTEVECTOR (bv); \
492 if (SCM_LIKELY (SCM_I_INUMP (idx) \
493 && ((i = SCM_I_INUM (idx)) >= 0) \
494 && (i + size <= SCM_BYTEVECTOR_LENGTH (bv)) \
495 && (i % size == 0) \
496 && (SCM_I_INUMP (val)) \
497 && ((j = SCM_I_INUM (val)) >= min) \
498 && (j <= max))) \
499 *(scm_t_##type*) (SCM_BYTEVECTOR_CONTENTS (bv) + i) = (scm_t_##type)j; \
500 else \
501 scm_bytevector_##fn_stem##_set_x (bv, idx, val); \
502 NEXT; \
503 }
504
505 #define BV_INT_SET(stem, type, size) \
506 { \
507 long i = 0; \
508 SCM bv, idx, val; POP (val); POP (idx); POP (bv); \
509 VM_VALIDATE_BYTEVECTOR (bv); \
510 if (SCM_LIKELY (SCM_I_INUMP (idx) \
511 && ((i = SCM_I_INUM (idx)) >= 0) \
512 && (i + size <= SCM_BYTEVECTOR_LENGTH (bv)) \
513 && (i % size == 0))) \
514 *(scm_t_##type*) (SCM_BYTEVECTOR_CONTENTS (bv) + i) = scm_to_##type (val); \
515 else \
516 scm_bytevector_##stem##_native_set_x (bv, idx, val); \
517 NEXT; \
518 }
519
520 #define BV_FLOAT_SET(stem, fn_stem, type, size) \
521 { \
522 long i = 0; \
523 SCM bv, idx, val; POP (val); POP (idx); POP (bv); \
524 VM_VALIDATE_BYTEVECTOR (bv); \
525 if (SCM_LIKELY (SCM_I_INUMP (idx) \
526 && ((i = SCM_I_INUM (idx)) >= 0) \
527 && (i + size <= SCM_BYTEVECTOR_LENGTH (bv)) \
528 && (i % size == 0))) \
529 *(type*) (SCM_BYTEVECTOR_CONTENTS (bv) + i) = scm_to_double (val); \
530 else \
531 scm_bytevector_##fn_stem##_native_set_x (bv, idx, val); \
532 NEXT; \
533 }
534
535 VM_DEFINE_INSTRUCTION (157, bv_u8_set, "bv-u8-set", 0, 3, 0)
536 BV_FIXABLE_INT_SET (u8, u8, uint8, 0, SCM_T_UINT8_MAX, 1)
537 VM_DEFINE_INSTRUCTION (158, bv_s8_set, "bv-s8-set", 0, 3, 0)
538 BV_FIXABLE_INT_SET (s8, s8, int8, SCM_T_INT8_MIN, SCM_T_INT8_MAX, 1)
539 VM_DEFINE_INSTRUCTION (159, bv_u16_native_set, "bv-u16-native-set", 0, 3, 0)
540 BV_FIXABLE_INT_SET (u16, u16_native, uint16, 0, SCM_T_UINT16_MAX, 2)
541 VM_DEFINE_INSTRUCTION (160, bv_s16_native_set, "bv-s16-native-set", 0, 3, 0)
542 BV_FIXABLE_INT_SET (s16, s16_native, int16, SCM_T_INT16_MIN, SCM_T_INT16_MAX, 2)
543 VM_DEFINE_INSTRUCTION (161, bv_u32_native_set, "bv-u32-native-set", 0, 3, 0)
544 /* FIXME: u32 is always a fixnum on 64-bit builds */
545 BV_INT_SET (u32, uint32, 4)
546 VM_DEFINE_INSTRUCTION (162, bv_s32_native_set, "bv-s32-native-set", 0, 3, 0)
547 BV_INT_SET (s32, int32, 4)
548 VM_DEFINE_INSTRUCTION (163, bv_u64_native_set, "bv-u64-native-set", 0, 3, 0)
549 BV_INT_SET (u64, uint64, 8)
550 VM_DEFINE_INSTRUCTION (164, bv_s64_native_set, "bv-s64-native-set", 0, 3, 0)
551 BV_INT_SET (s64, int64, 8)
552 VM_DEFINE_INSTRUCTION (165, bv_f32_native_set, "bv-f32-native-set", 0, 3, 0)
553 BV_FLOAT_SET (f32, ieee_single, float, 4)
554 VM_DEFINE_INSTRUCTION (166, bv_f64_native_set, "bv-f64-native-set", 0, 3, 0)
555 BV_FLOAT_SET (f64, ieee_double, double, 8)
556
557 #undef BV_FIXABLE_INT_SET
558 #undef BV_INT_SET
559 #undef BV_FLOAT_SET
560
561 /*
562 (defun renumber-ops ()
563 "start from top of buffer and renumber 'VM_DEFINE_FOO (\n' sequences"
564 (interactive "")
565 (save-excursion
566 (let ((counter 99)) (goto-char (point-min))
567 (while (re-search-forward "^VM_DEFINE_[^ ]+ (\\([^,]+\\)," (point-max) t)
568 (replace-match
569 (number-to-string (setq counter (1+ counter)))
570 t t nil 1)))))
571 */
572
573 /*
574 Local Variables:
575 c-file-style: "gnu"
576 End:
577 */