float-int-conversion.awl 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. ORGANIZATION_BLOCK OB 1
  2. BEGIN
  3. // Truncating or rounding an infinite float shall not crash the core.
  4. // This used to trigger a Python OverflowError exception.
  5. __STWRST
  6. L DW#16#7F800000
  7. TRUNC
  8. __ASSERT== STW, W#16#0030
  9. __ASSERT== __ACCU 1, DW#16#7F800000
  10. __STWRST
  11. L DW#16#FF800000
  12. TRUNC
  13. __ASSERT== STW, W#16#0030
  14. __ASSERT== __ACCU 1, DW#16#FF800000
  15. __STWRST
  16. L DW#16#7F800000
  17. RND
  18. __ASSERT== STW, W#16#0030
  19. __ASSERT== __ACCU 1, DW#16#7F800000
  20. __STWRST
  21. L DW#16#FF800000
  22. RND
  23. __ASSERT== STW, W#16#0030
  24. __ASSERT== __ACCU 1, DW#16#FF800000
  25. __STWRST
  26. L DW#16#7F800000
  27. RND+
  28. __ASSERT== STW, W#16#0030
  29. __ASSERT== __ACCU 1, DW#16#7F800000
  30. __STWRST
  31. L DW#16#FF800000
  32. RND+
  33. __ASSERT== STW, W#16#0030
  34. __ASSERT== __ACCU 1, DW#16#FF800000
  35. __STWRST
  36. L DW#16#7F800000
  37. RND-
  38. __ASSERT== STW, W#16#0030
  39. __ASSERT== __ACCU 1, DW#16#7F800000
  40. __STWRST
  41. L DW#16#FF800000
  42. RND-
  43. __ASSERT== STW, W#16#0030
  44. __ASSERT== __ACCU 1, DW#16#FF800000
  45. CALL SFC 46 // STOP CPU
  46. END_ORGANIZATION_BLOCK