Changeset 8565a42 in mainline for uspace/lib/math/arch/amd64/src/cos.S
- Timestamp:
- 2018-03-02T20:34:50Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a1a81f69, d5e5fd1
- Parents:
- 3061bc1 (diff), 34e1206 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:34:50)
- git-committer:
- GitHub <noreply@…> (2018-03-02 20:34:50)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/math/arch/amd64/src/cos.S
r3061bc1 r8565a42 35 35 pushq %rbp 36 36 movq %rsp, %rbp 37 37 38 38 # compute cosine (using red zone) 39 39 40 40 movsd %xmm0, -8(%rbp) 41 41 fldl -8(%rbp) 42 42 43 43 fcos 44 44 45 45 # detect if source operand is out of range 46 46 47 47 fnstsw %ax 48 48 andw $X87_STATUS_WORD_C2_MASK, %ax 49 49 jnz fix_range 50 50 51 51 fstpl -8(%rbp) 52 52 movsd -8(%rbp), %xmm0 53 53 54 54 leave 55 55 retq 56 56 57 57 # argument reduction 58 58 59 59 fix_range: 60 60 fldpi 61 61 fadd %st(0) 62 62 fxch %st(1) 63 63 64 64 reduce: 65 65 fprem1 … … 67 67 andw $X87_STATUS_WORD_C2_MASK, %ax 68 68 jnz reduce 69 69 70 70 fstp %st(1) 71 71 fcos 72 72 73 73 fstpl -8(%rbp) 74 74 movsd -8(%rbp), %xmm0 75 75 76 76 leave 77 77 retq
Note:
See TracChangeset
for help on using the changeset viewer.