Changeset a35b458 in mainline for uspace/lib/math/arch/amd64/src/trunc.S
- Timestamp:
- 2018-03-02T20:10:49Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f1380b7
- Parents:
- 3061bc1
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/math/arch/amd64/src/trunc.S
r3061bc1 ra35b458 35 35 pushq %rbp 36 36 movq %rsp, %rbp 37 37 38 38 # store x87 control word in the red zone 39 39 40 40 fnstcw -8(%rbp) 41 41 movw -8(%rbp), %ax 42 42 43 43 # set rounding control to truncate 44 44 # (no masking necessary for this flag) 45 45 46 46 orw $X87_CONTROL_WORD_RC_TRUNCATE, %ax 47 47 movw %ax, -16(%rbp) 48 48 fldcw -16(%rbp) 49 49 50 50 # truncate 51 51 52 52 movsd %xmm0, -16(%rbp) 53 53 fldl -16(%rbp) … … 55 55 fstpl -16(%rbp) 56 56 movsd -16(%rbp), %xmm0 57 57 58 58 # restore original control word 59 59 60 60 fldcw -8(%rbp) 61 61 62 62 leave 63 63 retq
Note:
See TracChangeset
for help on using the changeset viewer.