Changeset 85f2064 in mainline for uspace/lib/c


Ignore:
Timestamp:
2012-04-12T14:21:46Z (13 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bb8f69d
Parents:
751cabc (diff), d11a181 (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

Location:
uspace/lib/c
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/arch/arm32/Makefile.common

    r751cabc r85f2064  
    2828#
    2929
    30 GCC_CFLAGS += -ffixed-r9 -mtp=soft -mapcs-frame -fno-omit-frame-pointer
     30GCC_CFLAGS += -ffixed-r9 -mtp=soft -fno-omit-frame-pointer -march=armv4
    3131
    3232ENDIANESS = LE
  • uspace/lib/c/arch/arm32/src/eabi.S

    r751cabc r85f2064  
    11#
    2 # Copyright (c) 2007 Pavel Jancik
     2# Copyright (c) 2012 Martin Decky
    33# All rights reserved.
    44#
     
    3131.global __aeabi_read_tp
    3232
     33.global __aeabi_idiv
     34.global __aeabi_uidiv
     35
     36.global __aeabi_idivmod
     37.global __aeabi_uidivmod
     38
     39.global __aeabi_ldivmod
     40.global __aeabi_uldivmod
     41
    3342__aeabi_read_tp:
    3443        mov r0, r9
    3544        mov pc, lr
     45
     46__aeabi_idiv:
     47        push {lr}
     48        bl __divsi3
     49        pop {lr}
     50        mov pc, lr
     51
     52__aeabi_uidiv:
     53        push {lr}
     54        bl __udivsi3
     55        pop {lr}
     56        mov pc, lr
     57
     58__aeabi_idivmod:
     59        push {lr}
     60        sub sp, sp, #12
     61        add r2, sp, #4
     62        bl __udivmodsi3
     63        ldr r1, [sp, #4]
     64        add sp, sp, #12
     65        pop {lr}
     66        mov pc, lr
     67
     68__aeabi_uidivmod:
     69        push {lr}
     70        sub sp, sp, #12
     71        add r2, sp, #4
     72        bl __udivmodsi3
     73        ldr r1, [sp, #4]
     74        add sp, sp, #12
     75        pop {lr}
     76        mov pc, lr
     77
     78__aeabi_ldivmod:
     79        push {lr}
     80        sub sp, sp, #24
     81        push {sp}
     82        bl __divmoddi3
     83        add sp, sp, #4
     84        pop {r2, r3}
     85        add sp, sp, #16
     86        pop {lr}
     87        mov pc, lr
     88
     89__aeabi_uldivmod:
     90        push {lr}
     91        sub sp, sp, #24
     92        push {sp}
     93        bl __udivmoddi3
     94        add sp, sp, #4
     95        pop {r2, r3}
     96        add sp, sp, #16
     97        pop {lr}
     98        mov pc, lr
  • uspace/lib/c/generic/str.c

    r751cabc r85f2064  
    4646#include <mem.h>
    4747#include <str.h>
     48
     49/** Check the condition if wchar_t is signed */
     50#ifdef WCHAR_IS_UNSIGNED
     51        #define WCHAR_SIGNED_CHECK(cond)  (true)
     52#else
     53        #define WCHAR_SIGNED_CHECK(cond)  (cond)
     54#endif
    4855
    4956/** Byte mask consisting of lowest @n bits (out of 8) */
     
    399406bool ascii_check(wchar_t ch)
    400407{
    401         if ((ch >= 0) && (ch <= 127))
     408        if (WCHAR_SIGNED_CHECK(ch >= 0) && (ch <= 127))
    402409                return true;
    403410       
     
    412419bool chr_check(wchar_t ch)
    413420{
    414         if ((ch >= 0) && (ch <= 1114111))
     421        if (WCHAR_SIGNED_CHECK(ch >= 0) && (ch <= 1114111))
    415422                return true;
    416423       
     
    513520 * @param count Size of the destination buffer (must be > 0).
    514521 * @param src   Source string.
     522 *
    515523 */
    516524void str_cpy(char *dest, size_t size, const char *src)
     
    545553 * @param src   Source string.
    546554 * @param n     Maximum number of bytes to read from @a src.
     555 *
    547556 */
    548557void str_ncpy(char *dest, size_t size, const char *src, size_t n)
Note: See TracChangeset for help on using the changeset viewer.