aboutsummaryrefslogtreecommitdiffstats
path: root/tests/tc900_bugs/float-int-conversion.awl
blob: 386e4e72fd3025578cf73fed6f23efad2d8bf236 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
ORGANIZATION_BLOCK OB 1
BEGIN

	// Truncating or rounding an infinite float shall not crash the core.
	// This used to trigger a Python OverflowError exception.

	__STWRST
	L		DW#16#7F800000
	TRUNC
	__ASSERT==	STW,		W#16#0030
	__ASSERT==	__ACCU 1,	DW#16#7F800000
	__STWRST
	L		DW#16#FF800000
	TRUNC
	__ASSERT==	STW,		W#16#0030
	__ASSERT==	__ACCU 1,	DW#16#FF800000


	__STWRST
	L		DW#16#7F800000
	RND
	__ASSERT==	STW,		W#16#0030
	__ASSERT==	__ACCU 1,	DW#16#7F800000
	__STWRST
	L		DW#16#FF800000
	RND
	__ASSERT==	STW,		W#16#0030
	__ASSERT==	__ACCU 1,	DW#16#FF800000


	__STWRST
	L		DW#16#7F800000
	RND+
	__ASSERT==	STW,		W#16#0030
	__ASSERT==	__ACCU 1,	DW#16#7F800000
	__STWRST
	L		DW#16#FF800000
	RND+
	__ASSERT==	STW,		W#16#0030
	__ASSERT==	__ACCU 1,	DW#16#FF800000


	__STWRST
	L		DW#16#7F800000
	RND-
	__ASSERT==	STW,		W#16#0030
	__ASSERT==	__ACCU 1,	DW#16#7F800000
	__STWRST
	L		DW#16#FF800000
	RND-
	__ASSERT==	STW,		W#16#0030
	__ASSERT==	__ACCU 1,	DW#16#FF800000


	CALL SFC 46 // STOP CPU
END_ORGANIZATION_BLOCK
bues.ch cgit interface