| @@ -14,6 +14,7 @@ using disvm::debug::log_level_t; · 13 unmodified lines |
| 14 | | 14 | |
| 15 | using disvm::runtime::dereference_nil; | 15 | using disvm::runtime::dereference_nil; |
| 16 | using disvm::runtime::intrinsic_type_desc; | 16 | using disvm::runtime::intrinsic_type_desc; |
| | 17 | using disvm::runtime::out_of_range_memory; |
| 17 | using disvm::runtime::real_t; | 18 | using disvm::runtime::real_t; |
| 18 | using disvm::runtime::vm_alloc_t; | 19 | using disvm::runtime::vm_alloc_t; |
| 19 | using disvm::runtime::vm_array_t; | 20 | using disvm::runtime::vm_array_t; |
| @@ -119,6 +120,8 @@ void · 99 unmodified lines |
| 119 | Math_FPstatus(vm_registers_t &r, vm_t &vm) | 120 | Math_FPstatus(vm_registers_t &r, vm_t &vm) |
| 120 | { | 121 | { |
| 121 | auto &fp = r.stack.peek_frame()->base<F_Math_FPstatus>(); | 122 | auto &fp = r.stack.peek_frame()->base<F_Math_FPstatus>(); |
| | 123 | |
| | 124 | // [PAL] Properly implement floating point control |
| 122 | throw vm_system_exception{ "Function not implemented" }; | 125 | throw vm_system_exception{ "Function not implemented" }; |
| 123 | } | 126 | } |
| 124 | | 127 | |
| @@ -290,7 +293,28 @@ void · 165 unmodified lines |
| 290 | Math_export_int(vm_registers_t &r, vm_t &vm) | 293 | Math_export_int(vm_registers_t &r, vm_t &vm) |
| 291 | { | 294 | { |
| 292 | auto &fp = r.stack.peek_frame()->base<F_Math_export_int>(); | 295 | auto &fp = r.stack.peek_frame()->base<F_Math_export_int>(); |
| 293 | throw vm_system_exception{ "Function not implemented" }; | 296 | |
| | 297 | auto buffer = vm_alloc_t::from_allocation<vm_array_t>(fp.b); |
| | 298 | assert(buffer->get_element_type()->is_equal(intrinsic_type_desc::type<byte_t>().get())); |
| | 299 | |
| | 300 | auto values = vm_alloc_t::from_allocation<vm_array_t>(fp.x); |
| | 301 | assert(values->get_element_type()->is_equal(intrinsic_type_desc::type<word_t>().get())); |
| | 302 | const auto values_len = values->get_length(); |
| | 303 | |
| | 304 | if (buffer->get_length() != (sizeof(word_t) * values_len)) |
| | 305 | throw vm_user_exception{ "Invalid buffer size based on conversion" }; |
| | 306 | |
| | 307 | // Insert as big endian |
| | 308 | for (int i = 0; i < values_len; ++i) |
| | 309 | { |
| | 310 | auto x = values->at<word_t>(i); |
| | 311 | |
| | 312 | auto base = reinterpret_cast<byte_t *>(buffer->at(i * sizeof(x))); |
| | 313 | base[0] = static_cast<byte_t>(x >> 24); |
| | 314 | base[1] = static_cast<byte_t>(x >> 16); |
| | 315 | base[2] = static_cast<byte_t>(x >> 8); |
| | 316 | base[3] = static_cast<byte_t>(x); |
| | 317 | } |
| 294 | } | 318 | } |
| 295 | | 319 | |
| 296 | void | 320 | void |
| @@ -305,7 +329,7 @@ Math_export_real(vm_registers_t &r, vm_t &vm) · 8 unmodified lines |
| 305 | assert(values->get_element_type()->is_equal(intrinsic_type_desc::type<real_t>().get())); | 329 | assert(values->get_element_type()->is_equal(intrinsic_type_desc::type<real_t>().get())); |
| 306 | const auto values_len = values->get_length(); | 330 | const auto values_len = values->get_length(); |
| 307 | | 331 | |
| 308 | if (buffer->get_length() != (8 * values_len)) | 332 | if (buffer->get_length() != (sizeof(real_t) * values_len)) |
| 309 | throw vm_user_exception{ "Invalid buffer size based on conversion" }; | 333 | throw vm_user_exception{ "Invalid buffer size based on conversion" }; |
| 310 | | 334 | |
| 311 | // Insert as big endian | 335 | // Insert as big endian |
| @@ -332,7 +356,32 @@ void · 20 unmodified lines |
| 332 | Math_export_real32(vm_registers_t &r, vm_t &vm) | 356 | Math_export_real32(vm_registers_t &r, vm_t &vm) |
| 333 | { | 357 | { |
| 334 | auto &fp = r.stack.peek_frame()->base<F_Math_export_real32>(); | 358 | auto &fp = r.stack.peek_frame()->base<F_Math_export_real32>(); |
| 335 | throw vm_system_exception{ "Function not implemented" }; | 359 | |
| | 360 | auto buffer = vm_alloc_t::from_allocation<vm_array_t>(fp.b); |
| | 361 | assert(buffer->get_element_type()->is_equal(intrinsic_type_desc::type<byte_t>().get())); |
| | 362 | |
| | 363 | auto values = vm_alloc_t::from_allocation<vm_array_t>(fp.x); |
| | 364 | assert(values->get_element_type()->is_equal(intrinsic_type_desc::type<real_t>().get())); |
| | 365 | const auto values_len = values->get_length(); |
| | 366 | |
| | 367 | if (buffer->get_length() != (sizeof(float) * values_len)) |
| | 368 | throw vm_user_exception{ "Invalid buffer size based on conversion" }; |
| | 369 | |
| | 370 | // Insert as big endian |
| | 371 | for (int i = 0; i < values_len; ++i) |
| | 372 | { |
| | 373 | auto x_r = values->at<real_t>(i); |
| | 374 | auto x = static_cast<float>(x_r); |
| | 375 | uint32_t t; |
| | 376 | std::memcpy(&t, &x, sizeof(x)); |
| | 377 | static_assert(sizeof(t) == sizeof(x), "Short-real should be 32-bits"); |
| | 378 | |
| | 379 | auto base = reinterpret_cast<byte_t *>(buffer->at(i * sizeof(x))); |
| | 380 | base[0] = static_cast<byte_t>(t >> 24); |
| | 381 | base[1] = static_cast<byte_t>(t >> 16); |
| | 382 | base[2] = static_cast<byte_t>(t >> 8); |
| | 383 | base[3] = static_cast<byte_t>(t); |
| | 384 | } |
| 336 | } | 385 | } |
| 337 | | 386 | |
| 338 | void | 387 | void |
| @@ -384,17 +433,79 @@ Math_fmod(vm_registers_t &r, vm_t &vm) · 45 unmodified lines |
| 384 | *fp.ret = std::fmod(fp.x, fp.y); | 433 | *fp.ret = std::fmod(fp.x, fp.y); |
| 385 | } | 434 | } |
| 386 | | 435 | |
| | 436 | // Forward declaration |
| | 437 | extern "C" int dgemm_( |
| | 438 | char *transa, char *transb, |
| | 439 | int *m, int *n, int *k, |
| | 440 | double *alpha, |
| | 441 | double *a, int *lda, |
| | 442 | double *b, int *ldb, |
| | 443 | double *beta, |
| | 444 | double *c, int *ldc, |
| | 445 | int a_len, int b_len, int c_len); |
| | 446 | |
| 387 | void | 447 | void |
| 388 | Math_gemm(vm_registers_t &r, vm_t &vm) | 448 | Math_gemm(vm_registers_t &r, vm_t &vm) |
| 389 | { | 449 | { |
| 390 | auto &fp = r.stack.peek_frame()->base<F_Math_gemm>(); | 450 | auto &fp = r.stack.peek_frame()->base<F_Math_gemm>(); |
| 391 | throw vm_system_exception{ "Function not implemented" }; | 451 | |
| | 452 | char t_a[2] = {}; |
| | 453 | t_a[0] = static_cast<char>(fp.transa); |
| | 454 | |
| | 455 | char t_b[2] = {}; |
| | 456 | t_b[0] = static_cast<char>(fp.transb); |
| | 457 | |
| | 458 | auto m = fp.m; |
| | 459 | auto n = fp.n; |
| | 460 | auto k = fp.k; |
| | 461 | |
| | 462 | auto alpha = fp.alpha; |
| | 463 | auto beta = fp.beta; |
| | 464 | |
| | 465 | auto lda = fp.lda; |
| | 466 | auto a_v = vm_alloc_t::from_allocation<vm_array_t>(fp.a); |
| | 467 | if (a_v == nullptr) |
| | 468 | throw dereference_nil{ "gemm - a" }; |
| | 469 | |
| | 470 | auto ldb = fp.ldb; |
| | 471 | auto b_v = vm_alloc_t::from_allocation<vm_array_t>(fp.b); |
| | 472 | if (b_v == nullptr) |
| | 473 | throw dereference_nil{ "gemm - b" }; |
| | 474 | |
| | 475 | auto ldc = fp.ldc; |
| | 476 | auto c_v = vm_alloc_t::from_allocation<vm_array_t>(fp.c); |
| | 477 | if (c_v == nullptr) |
| | 478 | throw dereference_nil{ "gemm - c" }; |
| | 479 | |
| | 480 | assert(a_v->get_element_type()->is_equal(intrinsic_type_desc::type<real_t>().get())); |
| | 481 | assert(b_v->get_element_type()->is_equal(intrinsic_type_desc::type<real_t>().get())); |
| | 482 | assert(c_v->get_element_type()->is_equal(intrinsic_type_desc::type<real_t>().get())); |
| | 483 | |
| | 484 | const auto a_len = a_v->get_length(); |
| | 485 | const auto b_len = b_v->get_length(); |
| | 486 | const auto c_len = c_v->get_length(); |
| | 487 | |
| | 488 | // Call BLAS version of function |
| | 489 | const auto result = dgemm_( |
| | 490 | t_a, t_b, |
| | 491 | &m, &n, &k, |
| | 492 | &alpha, |
| | 493 | reinterpret_cast<double *>(a_v->at(0)), &lda, |
| | 494 | reinterpret_cast<double *>(b_v->at(0)), &ldb, |
| | 495 | &beta, |
| | 496 | reinterpret_cast<double *>(c_v->at(0)), &ldc, |
| | 497 | a_len, b_len, c_len); |
| | 498 | |
| | 499 | if (result != 0) |
| | 500 | throw vm_user_exception{ "gemm invalid argument" }; |
| 392 | } | 501 | } |
| 393 | | 502 | |
| 394 | void | 503 | void |
| 395 | Math_getFPcontrol(vm_registers_t &r, vm_t &vm) | 504 | Math_getFPcontrol(vm_registers_t &r, vm_t &vm) |
| 396 | { | 505 | { |
| 397 | auto &fp = r.stack.peek_frame()->base<F_Math_getFPcontrol>(); | 506 | auto &fp = r.stack.peek_frame()->base<F_Math_getFPcontrol>(); |
| | 507 | |
| | 508 | // [PAL] Properly implement floating point control |
| 398 | throw vm_system_exception{ "Function not implemented" }; | 509 | throw vm_system_exception{ "Function not implemented" }; |
| 399 | } | 510 | } |
| 400 | | 511 | |
| @@ -402,6 +513,8 @@ void · 1 unmodified line |
| 402 | Math_getFPstatus(vm_registers_t &r, vm_t &vm) | 513 | Math_getFPstatus(vm_registers_t &r, vm_t &vm) |
| 403 | { | 514 | { |
| 404 | auto &fp = r.stack.peek_frame()->base<F_Math_getFPstatus>(); | 515 | auto &fp = r.stack.peek_frame()->base<F_Math_getFPstatus>(); |
| | 516 | |
| | 517 | // [PAL] Properly implement floating point control |
| 405 | throw vm_system_exception{ "Function not implemented" }; | 518 | throw vm_system_exception{ "Function not implemented" }; |
| 406 | } | 519 | } |
| 407 | | 520 | |
| @@ -416,7 +529,34 @@ void · 8 unmodified lines |
| 416 | Math_iamax(vm_registers_t &r, vm_t &vm) | 529 | Math_iamax(vm_registers_t &r, vm_t &vm) |
| 417 | { | 530 | { |
| 418 | auto &fp = r.stack.peek_frame()->base<F_Math_iamax>(); | 531 | auto &fp = r.stack.peek_frame()->base<F_Math_iamax>(); |
| 419 | throw vm_system_exception{ "Function not implemented" }; | 532 | |
| | 533 | // [SPEC] According to the Inferno implementation (libmath/blas.c), 0 is returned |
| | 534 | // if the array is empty. This means there is no indication the supplied array was |
| | 535 | // empty or the first index was max. The spec does not describe this condition, |
| | 536 | // therefore this implementation will indicate with -1. |
| | 537 | *fp.ret = -1; |
| | 538 | |
| | 539 | auto result = vm_alloc_t::from_allocation<vm_array_t>(fp.x); |
| | 540 | assert(result->get_element_type()->is_equal(intrinsic_type_desc::type<real_t>().get())); |
| | 541 | if (result->get_length() <= 0) |
| | 542 | return; |
| | 543 | |
| | 544 | auto r_raw = reinterpret_cast<real_t *>(result->at(0)); |
| | 545 | |
| | 546 | auto max_idx = 0; |
| | 547 | auto r_len = result->get_length(); |
| | 548 | auto curr_max = std::fabs(r_raw[max_idx]); |
| | 549 | for (auto i = word_t{ 1 }; i < r_len; ++i) |
| | 550 | { |
| | 551 | auto t = std::fabs(r_raw[i]); |
| | 552 | if (curr_max < t) |
| | 553 | { |
| | 554 | max_idx = i; |
| | 555 | curr_max = t; |
| | 556 | } |
| | 557 | } |
| | 558 | |
| | 559 | *fp.ret = max_idx; |
| 420 | } | 560 | } |
| 421 | | 561 | |
| 422 | void | 562 | void |
| @@ -430,7 +570,27 @@ void · 7 unmodified lines |
| 430 | Math_import_int(vm_registers_t &r, vm_t &vm) | 570 | Math_import_int(vm_registers_t &r, vm_t &vm) |
| 431 | { | 571 | { |
| 432 | auto &fp = r.stack.peek_frame()->base<F_Math_import_int>(); | 572 | auto &fp = r.stack.peek_frame()->base<F_Math_import_int>(); |
| 433 | throw vm_system_exception{ "Function not implemented" }; | 573 | |
| | 574 | auto buffer = vm_alloc_t::from_allocation<vm_array_t>(fp.b); |
| | 575 | assert(buffer->get_element_type()->is_equal(intrinsic_type_desc::type<byte_t>().get())); |
| | 576 | |
| | 577 | auto result = vm_alloc_t::from_allocation<vm_array_t>(fp.x); |
| | 578 | assert(result->get_element_type()->is_equal(intrinsic_type_desc::type<word_t>().get())); |
| | 579 | const auto result_len = result->get_length(); |
| | 580 | |
| | 581 | if (buffer->get_length() != (sizeof(word_t) * result_len)) |
| | 582 | throw vm_user_exception{ "Invalid buffer size based on conversion" }; |
| | 583 | |
| | 584 | // Process as big endian |
| | 585 | for (int i = 0; i < result_len; ++i) |
| | 586 | { |
| | 587 | uint32_t t = buffer->at<byte_t>(0); |
| | 588 | for (int j = 1; j < sizeof(word_t); ++j) |
| | 589 | t = (t << 8) | buffer->at<byte_t>(j); |
| | 590 | |
| | 591 | auto x = static_cast<word_t>(t); |
| | 592 | result->at<word_t>(i) = x; |
| | 593 | } |
| 434 | } | 594 | } |
| 435 | | 595 | |
| 436 | void | 596 | void |
| @@ -445,14 +605,14 @@ Math_import_real(vm_registers_t &r, vm_t &vm) · 8 unmodified lines |
| 445 | assert(result->get_element_type()->is_equal(intrinsic_type_desc::type<real_t>().get())); | 605 | assert(result->get_element_type()->is_equal(intrinsic_type_desc::type<real_t>().get())); |
| 446 | const auto result_len = result->get_length(); | 606 | const auto result_len = result->get_length(); |
| 447 | | 607 | |
| 448 | if (buffer->get_length() != (8 * result_len)) | 608 | if (buffer->get_length() != (sizeof(real_t) * result_len)) |
| 449 | throw vm_user_exception{ "Invalid buffer size based on conversion" }; | 609 | throw vm_user_exception{ "Invalid buffer size based on conversion" }; |
| 450 | | 610 | |
| 451 | // Process as big endian | 611 | // Process as big endian |
| 452 | for (int i = 0; i < result_len; ++i) | 612 | for (int i = 0; i < result_len; ++i) |
| 453 | { | 613 | { |
| 454 | uint64_t t = buffer->at<byte_t>(0); | 614 | uint64_t t = buffer->at<byte_t>(0); |
| 455 | for (int j = 1; j < 8; ++j) | 615 | for (int j = 1; j < sizeof(real_t); ++j) |
| 456 | t = (t << 8) | buffer->at<byte_t>(j); | 616 | t = (t << 8) | buffer->at<byte_t>(j); |
| 457 | | 617 | |
| 458 | real_t x; | 618 | real_t x; |
| @@ -467,7 +627,31 @@ void · 8 unmodified lines |
| 467 | Math_import_real32(vm_registers_t &r, vm_t &vm) | 627 | Math_import_real32(vm_registers_t &r, vm_t &vm) |
| 468 | { | 628 | { |
| 469 | auto &fp = r.stack.peek_frame()->base<F_Math_import_real32>(); | 629 | auto &fp = r.stack.peek_frame()->base<F_Math_import_real32>(); |
| 470 | throw vm_system_exception{ "Function not implemented" }; | 630 | |
| | 631 | auto buffer = vm_alloc_t::from_allocation<vm_array_t>(fp.b); |
| | 632 | assert(buffer->get_element_type()->is_equal(intrinsic_type_desc::type<byte_t>().get())); |
| | 633 | |
| | 634 | auto result = vm_alloc_t::from_allocation<vm_array_t>(fp.x); |
| | 635 | assert(result->get_element_type()->is_equal(intrinsic_type_desc::type<real_t>().get())); |
| | 636 | const auto result_len = result->get_length(); |
| | 637 | |
| | 638 | if (buffer->get_length() != (sizeof(float) * result_len)) |
| | 639 | throw vm_user_exception{ "Invalid buffer size based on conversion" }; |
| | 640 | |
| | 641 | // Process as big endian |
| | 642 | for (int i = 0; i < result_len; ++i) |
| | 643 | { |
| | 644 | uint32_t t = buffer->at<byte_t>(0); |
| | 645 | for (int j = 1; j < sizeof(float); ++j) |
| | 646 | t = (t << 8) | buffer->at<byte_t>(j); |
| | 647 | |
| | 648 | float x_f; |
| | 649 | std::memcpy(&x_f, &t, sizeof(t)); |
| | 650 | static_assert(sizeof(t) == sizeof(x_f), "Short-real should be 32-bits"); |
| | 651 | |
| | 652 | auto x = real_t{ x_f }; |
| | 653 | result->at<real_t>(i) = x; |
| | 654 | } |
| 471 | } | 655 | } |
| 472 | | 656 | |
| 473 | void | 657 | void |
| @@ -481,6 +665,8 @@ void · 7 unmodified lines |
| 481 | Math_j0(vm_registers_t &r, vm_t &vm) | 665 | Math_j0(vm_registers_t &r, vm_t &vm) |
| 482 | { | 666 | { |
| 483 | auto &fp = r.stack.peek_frame()->base<F_Math_j0>(); | 667 | auto &fp = r.stack.peek_frame()->base<F_Math_j0>(); |
| | 668 | |
| | 669 | // [PAL] Consume platform API |
| 484 | throw vm_system_exception{ "Function not implemented" }; | 670 | throw vm_system_exception{ "Function not implemented" }; |
| 485 | } | 671 | } |
| 486 | | 672 | |
| @@ -488,6 +674,8 @@ void · 1 unmodified line |
| 488 | Math_j1(vm_registers_t &r, vm_t &vm) | 674 | Math_j1(vm_registers_t &r, vm_t &vm) |
| 489 | { | 675 | { |
| 490 | auto &fp = r.stack.peek_frame()->base<F_Math_j1>(); | 676 | auto &fp = r.stack.peek_frame()->base<F_Math_j1>(); |
| | 677 | |
| | 678 | // [PAL] Consume platform API |
| 491 | throw vm_system_exception{ "Function not implemented" }; | 679 | throw vm_system_exception{ "Function not implemented" }; |
| 492 | } | 680 | } |
| 493 | | 681 | |
| @@ -495,6 +683,8 @@ void · 1 unmodified line |
| 495 | Math_jn(vm_registers_t &r, vm_t &vm) | 683 | Math_jn(vm_registers_t &r, vm_t &vm) |
| 496 | { | 684 | { |
| 497 | auto &fp = r.stack.peek_frame()->base<F_Math_jn>(); | 685 | auto &fp = r.stack.peek_frame()->base<F_Math_jn>(); |
| | 686 | |
| | 687 | // [PAL] Consume platform API |
| 498 | throw vm_system_exception{ "Function not implemented" }; | 688 | throw vm_system_exception{ "Function not implemented" }; |
| 499 | } | 689 | } |
| 500 | | 690 | |
| @@ -530,7 +720,13 @@ void · 29 unmodified lines |
| 530 | Math_modf(vm_registers_t &r, vm_t &vm) | 720 | Math_modf(vm_registers_t &r, vm_t &vm) |
| 531 | { | 721 | { |
| 532 | auto &fp = r.stack.peek_frame()->base<F_Math_modf>(); | 722 | auto &fp = r.stack.peek_frame()->base<F_Math_modf>(); |
| 533 | throw vm_system_exception{ "Function not implemented" }; | 723 | |
| | 724 | real_t integral_out; |
| | 725 | const auto fractional_part = std::modf(fp.x, &integral_out); |
| | 726 | const auto integral_part = static_cast<word_t>(integral_out); |
| | 727 | |
| | 728 | fp.ret->t0 = integral_part; |
| | 729 | fp.ret->t1 = fractional_part; |
| 534 | } | 730 | } |
| 535 | | 731 | |
| 536 | void | 732 | void |
| @@ -565,9 +761,7 @@ Math_norm1(vm_registers_t &r, vm_t &vm) · 28 unmodified lines |
| 565 | void | 761 | void |
| 566 | Math_norm2(vm_registers_t &r, vm_t &vm) | 762 | Math_norm2(vm_registers_t &r, vm_t &vm) |
| 567 | { | 763 | { |
| 568 | // [SPEC] This function is defined as: norm2(x) = sqrt(dot(x, x)) | 764 | // Defined as: norm2(x) = sqrt(dot(x, x)) |
| 569 | // The Inferno implementation (libmath/blas.c) doesn't appear to take | | |
| 570 | // the square root of the resulting dot product. | | |
| 571 | auto &fp = r.stack.peek_frame()->base<F_Math_norm2>(); | 765 | auto &fp = r.stack.peek_frame()->base<F_Math_norm2>(); |
| 572 | | 766 | |
| 573 | auto xs = vm_alloc_t::from_allocation<vm_array_t>(fp.x); | 767 | auto xs = vm_alloc_t::from_allocation<vm_array_t>(fp.x); |
| @@ -600,7 +794,7 @@ void · 26 unmodified lines |
| 600 | Math_pow10(vm_registers_t &r, vm_t &vm) | 794 | Math_pow10(vm_registers_t &r, vm_t &vm) |
| 601 | { | 795 | { |
| 602 | auto &fp = r.stack.peek_frame()->base<F_Math_pow10>(); | 796 | auto &fp = r.stack.peek_frame()->base<F_Math_pow10>(); |
| 603 | throw vm_system_exception{ "Function not implemented" }; | 797 | *fp.ret = std::pow(10., static_cast<real_t>(fp.p)); |
| 604 | } | 798 | } |
| 605 | | 799 | |
| 606 | void | 800 | void |
| @@ -646,7 +840,7 @@ void · 39 unmodified lines |
| 646 | Math_scalbn(vm_registers_t &r, vm_t &vm) | 840 | Math_scalbn(vm_registers_t &r, vm_t &vm) |
| 647 | { | 841 | { |
| 648 | auto &fp = r.stack.peek_frame()->base<F_Math_scalbn>(); | 842 | auto &fp = r.stack.peek_frame()->base<F_Math_scalbn>(); |
| 649 | throw vm_system_exception{ "Function not implemented" }; | 843 | *fp.ret = std::scalbln(fp.x, fp.n); |
| 650 | } | 844 | } |
| 651 | | 845 | |
| 652 | void | 846 | void |
| @@ -723,6 +917,8 @@ void · 70 unmodified lines |
| 723 | Math_y0(vm_registers_t &r, vm_t &vm) | 917 | Math_y0(vm_registers_t &r, vm_t &vm) |
| 724 | { | 918 | { |
| 725 | auto &fp = r.stack.peek_frame()->base<F_Math_y0>(); | 919 | auto &fp = r.stack.peek_frame()->base<F_Math_y0>(); |
| | 920 | |
| | 921 | // [PAL] Consume platform API |
| 726 | throw vm_system_exception{ "Function not implemented" }; | 922 | throw vm_system_exception{ "Function not implemented" }; |
| 727 | } | 923 | } |
| 728 | | 924 | |
| @@ -730,6 +926,8 @@ void · 1 unmodified line |
| 730 | Math_y1(vm_registers_t &r, vm_t &vm) | 926 | Math_y1(vm_registers_t &r, vm_t &vm) |
| 731 | { | 927 | { |
| 732 | auto &fp = r.stack.peek_frame()->base<F_Math_y1>(); | 928 | auto &fp = r.stack.peek_frame()->base<F_Math_y1>(); |
| | 929 | |
| | 930 | // [PAL] Consume platform API |
| 733 | throw vm_system_exception{ "Function not implemented" }; | 931 | throw vm_system_exception{ "Function not implemented" }; |
| 734 | } | 932 | } |
| 735 | | 933 | |
| @@ -737,5 +935,7 @@ void · 1 unmodified line |
| 737 | Math_yn(vm_registers_t &r, vm_t &vm) | 935 | Math_yn(vm_registers_t &r, vm_t &vm) |
| 738 | { | 936 | { |
| 739 | auto &fp = r.stack.peek_frame()->base<F_Math_yn>(); | 937 | auto &fp = r.stack.peek_frame()->base<F_Math_yn>(); |
| | 938 | |
| | 939 | // [PAL] Consume platform API |
| 740 | throw vm_system_exception{ "Function not implemented" }; | 940 | throw vm_system_exception{ "Function not implemented" }; |
| 741 | } | 941 | } |