projects
/
platform
/
upstream
/
js.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Imported Upstream version 1.0.0
[platform/upstream/js.git]
/
js
/
src
/
lirasm
/
tests
/
hardfloat
/
i2d.in
1
; This test assumes that d2i and 32-bit integer arithmetic works properly.
2
3
; Start with 0x80000000
4
i1 = immi -2147483648
5
d1 = i2d i1
6
o1 = d2i d1
7
8
; Test with -1
9
c2 = immi 2147483647
10
i2 = addi o1 c2
11
d2 = i2d i2
12
o2 = d2i d2
13
14
; Test with 2147483647
15
i3 = subi o2 i1
16
d3 = i2d i3
17
o3 = d2i d3
18
19
; Test with 0
20
i4 = subi o3 c2
21
d4 = i2d i4
22
o4 = d2i d4
23
24
reti o4