Changeset 2467b41 in mainline for uspace/lib/softint/generic/shift.c


Ignore:
Timestamp:
2018-01-17T16:58:41Z (6 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
17c14273
Parents:
33b8d024
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-17 16:58:14)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-17 16:58:41)
Message:

Temporarily revert libsoftint changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/softint/generic/shift.c

    r33b8d024 r2467b41  
    3434 */
    3535
    36 #include <alias.h>
    3736#include <shift.h>
    3837#include <lltype.h>
    3938
    40 long long __ashlti3 (long long val, int shift)
     39long long __ashldi3 (long long val, int shift)
    4140{
    4241        union lltype ll;
     
    6665}
    6766
    68 long long __ashrti3 (long long val, int shift)
     67long long __ashrdi3 (long long val, int shift)
    6968{
    7069        union lltype ll;
     
    9695}
    9796
    98 long long __lshrti3 (long long val, int shift)
     97long long __lshrdi3 (long long val, int shift)
    9998{
    10099        union lltype ll;
     
    126125long long __aeabi_llsl(long long val, int shift)
    127126{
    128         return __ashlti3(val, shift);
     127        return __ashldi3(val, shift);
    129128}
    130129
    131130long long __aeabi_llsr(long long val, int shift)
    132131{
    133         return __lshrti3(val, shift);
     132        return __lshrdi3(val, shift);
    134133}
    135 
    136 #if LONG_MAX == LLONG_MAX
    137 long ALIAS(__ashl, i3);
    138 long ALIAS(__ashr, i3);
    139 long ALIAS(__lshr, i3);
    140 #else
    141 
    142 long __ashldi3(long val, int shift)
    143 {
    144         return ((int) val) << shift;
    145 }
    146 
    147 long __ashrdi3(long val, int shift)
    148 {
    149         return ((int) val) >> shift;
    150 }
    151 
    152 long __lshrdi3(long val, int shift)
    153 {
    154         return ((unsigned int) val) >> shift;
    155 }
    156 
    157 #endif
    158134
    159135/** @}
Note: See TracChangeset for help on using the changeset viewer.