Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(333)

Side by Side Diff: fusl/src/fenv/sh/fenv.s

Issue 1573973002: Add a "fork" of musl as //fusl. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fusl/src/fenv/sh-nofpu/fenv.sub ('k') | fusl/src/fenv/sheb-nofpu/fenv.sub » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 .global fegetround
2 .type fegetround, @function
3 fegetround:
4 sts fpscr, r0
5 rts
6 and #3, r0
7
8 .global __fesetround
9 .type __fesetround, @function
10 __fesetround:
11 sts fpscr, r0
12 or r4, r0
13 lds r0, fpscr
14 rts
15 mov #0, r0
16
17 .global fetestexcept
18 .type fetestexcept, @function
19 fetestexcept:
20 sts fpscr, r0
21 and r4, r0
22 rts
23 and #0x7c, r0
24
25 .global feclearexcept
26 .type feclearexcept, @function
27 feclearexcept:
28 mov r4, r0
29 and #0x7c, r0
30 not r0, r4
31 sts fpscr, r0
32 and r4, r0
33 lds r0, fpscr
34 rts
35 mov #0, r0
36
37 .global feraiseexcept
38 .type feraiseexcept, @function
39 feraiseexcept:
40 mov r4, r0
41 and #0x7c, r0
42 sts fpscr, r4
43 or r4, r0
44 lds r0, fpscr
45 rts
46 mov #0, r0
47
48 .global fegetenv
49 .type fegetenv, @function
50 fegetenv:
51 sts fpscr, r0
52 mov.l r0, @r4
53 rts
54 mov #0, r0
55
56 .global fesetenv
57 .type fesetenv, @function
58 fesetenv:
59 mov r4, r0
60 cmp/eq #-1, r0
61 bf 1f
62
63 ! the default environment is complicated by the fact that we need to
64 ! preserve the current precision bit, which we do not know a priori
65 sts fpscr, r0
66 mov #8, r1
67 swap.w r1, r1
68 bra 2f
69 and r1, r0
70
71 1: mov.l @r4, r0 ! non-default environment
72 2: lds r0, fpscr
73 rts
74 mov #0, r0
OLDNEW
« no previous file with comments | « fusl/src/fenv/sh-nofpu/fenv.sub ('k') | fusl/src/fenv/sheb-nofpu/fenv.sub » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698