Changeset 8e7c9fe in mainline for uspace/lib/math/arch/ia32/src/sin.S


Ignore:
Timestamp:
2014-09-12T03:45:25Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
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.
Message:

merge mainline changes

most usb changes were reverted. blink and usbmass were fixed
known problems:
ehci won't initialize
usbmast asserts on unmount (happens on mainline too)

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/math/arch/ia32/src/sin.S

    r3eb0c85 r8e7c9fe  
    11#
    2 # Copyright (c) 2009 Jakub Jermar
     2# Copyright (c) 2014 Martin Decky
    33# All rights reserved.
    44#
     
    2727#
    2828
     29#include <libarch/x87.h>
     30
    2931.text
    3032
    31 .set noat
    32 .set noreorder
     33.global sin
    3334
    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
     35sin:
     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.