Changeset 8e7c9fe in mainline for uspace/lib/math/arch/ia32/src/sin.S
- Timestamp:
- 2014-09-12T03:45:25Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c53b58e
- Parents:
- 3eb0c85 (diff), 105d8d6 (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. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/math/arch/ia32/src/sin.S
r3eb0c85 r8e7c9fe 1 1 # 2 # Copyright (c) 20 09 Jakub Jermar2 # Copyright (c) 2014 Martin Decky 3 3 # All rights reserved. 4 4 # … … 27 27 # 28 28 29 #include <libarch/x87.h> 30 29 31 .text 30 32 31 .set noat 32 .set noreorder 33 .global sin 33 34 34 .global stacktrace_prepare 35 .global stacktrace_fp_get 36 .global stacktrace_pc_get 37 38 stacktrace_prepare: 39 stacktrace_fp_get: 40 stacktrace_pc_get: 41 j $ra 42 xor $v0, $v0 35 sin: 36 # compute sine (no stack frame) 37 38 fldl 4(%esp) 39 fsin 40 41 # detect if source operand is out of range 42 43 fnstsw %ax 44 andw $X87_STATUS_WORD_C2_MASK, %ax 45 jnz fix_range 46 47 ret 48 49 # argument reduction 50 51 fix_range: 52 fldpi 53 fadd %st(0) 54 fxch %st(1) 55 56 reduce: 57 fprem1 58 fnstsw %ax 59 andw $X87_STATUS_WORD_C2_MASK, %ax 60 jnz reduce 61 62 fstpl %st(1) 63 fsin 64 65 ret
Note:
See TracChangeset
for help on using the changeset viewer.