Ignore:
Timestamp:
2014-09-12T03:45:25Z (11 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/amd64/src/trunc.S

    r3eb0c85 r8e7c9fe  
    11#
    2 # Copyright (c) 2006 Jakub Jermar
     2# Copyright (c) 2014 Martin Decky
    33# All rights reserved.
    44#
     
    2727#
    2828
    29 #include <libarch/stack.h>
     29#include <libarch/x87.h>
    3030
    3131.text
    3232
    33 .set noat
    34 .set noreorder
    35 .option pic2
     33.global trunc
    3634
    37 .globl __thread_entry
    38 
    39 ## User-space thread entry point for all but the first threads.
    40 #
    41 #
    42 .ent __thread_entry
    43 __thread_entry:
    44         .frame $sp, ABI_STACK_FRAME, $ra
    45         .cpload $t9
     35trunc:
     36        pushq %rbp
     37        movq %rsp, %rbp
    4638       
    47         #
    48         # v0 contains address of uarg.
    49         #
    50         add $a0, $v0, 0
     39        # store x87 control word in the red zone
    5140       
    52         # Allocate the stack frame.
    53         addiu $sp, -ABI_STACK_FRAME
     41        fnstcw -8(%rbp)
     42        movw -8(%rbp), %ax
    5443       
    55         # Allow PIC code
    56         .cprestore 16
     44        # set rounding control to truncate
     45        # (no masking necessary for this flag)
    5746       
    58         jal __thread_main
    59         nop
     47        orw $X87_CONTROL_WORD_RC_TRUNCATE, %ax
     48        movw %ax, -16(%rbp)
     49        fldcw -16(%rbp)
    6050       
    61         #
    62         # Not reached.
    63         #
    64         addiu $sp, ABI_STACK_FRAME
    65 .end __thread_entry
     51        # truncate
     52       
     53        movsd %xmm0, -16(%rbp)
     54        fldl -16(%rbp)
     55        frndint
     56        fstpl -16(%rbp)
     57        movsd -16(%rbp), %xmm0
     58       
     59        # restore original control word
     60       
     61        fldcw -8(%rbp)
     62       
     63        leave
     64        retq
Note: See TracChangeset for help on using the changeset viewer.