Changeset c621f4aa in mainline for uspace/lib/c/arch/arm32


Ignore:
Timestamp:
2010-07-25T10:11:13Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
377cce8
Parents:
24a2517 (diff), a2da43c (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 with mainline.

Location:
uspace/lib/c/arch/arm32
Files:
1 added
23 moved

Legend:

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

    r24a2517 rc621f4aa  
    2828#
    2929
    30 ## Toolchain configuration
    31 #
    32 
    33 TARGET = arm-linux-gnu
    34 TOOLCHAIN_DIR = $(CROSS_PREFIX)/arm32/bin
    35 
    36 ARCH_SOURCES += arch/$(UARCH)/src/syscall.c \
     30ARCH_SOURCES = \
     31        arch/$(UARCH)/src/entry.s \
     32        arch/$(UARCH)/src/thread_entry.s \
     33        arch/$(UARCH)/src/syscall.c \
    3734        arch/$(UARCH)/src/fibril.S \
    3835        arch/$(UARCH)/src/tls.c \
     
    4138        arch/$(UARCH)/src/stacktrace_asm.S
    4239
    43 GCC_CFLAGS += -ffixed-r9 -mtp=soft -mapcs-frame -fno-omit-frame-pointer
    44 LFLAGS += -N $(SOFTINT_PREFIX)/libsoftint.a
    45 
    46 ENDIANESS = LE
    47 
    48 BFD_NAME = elf32-littlearm
    49 BFD_ARCH = arm
     40.PRECIOUS: arch/$(UARCH)/src/entry.o
  • uspace/lib/c/arch/arm32/_link.ld.in

    r24a2517 rc621f4aa  
    1 STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o)
     1STARTUP(LIBC_PATH/arch/UARCH/src/entry.o)
    22ENTRY(__entry)
    33
  • uspace/lib/c/arch/arm32/include/atomic.h

    r24a2517 rc621f4aa  
    2727 */
    2828
    29 /** @addtogroup libcarm32       
     29/** @addtogroup libcarm32
    3030 * @{
    3131 */
     
    3838
    3939#define LIBC_ARCH_ATOMIC_H_
    40 #define CAS 
     40#define CAS
    4141
    4242#include <atomicdflt.h>
     
    4646extern uintptr_t *ras_page;
    4747
    48 static inline bool cas(atomic_t *val, long ov, long nv)
    49 {
    50         long ret = 0;
    51 
     48static inline bool cas(atomic_t *val, atomic_count_t ov, atomic_count_t nv)
     49{
     50        atomic_count_t ret = 0;
     51       
    5252        /*
    5353         * The following instructions between labels 1 and 2 constitute a
     
    7575                : "memory"
    7676        );
    77 
     77       
    7878        ras_page[0] = 0;
    79         asm volatile ("" ::: "memory");
     79        asm volatile (
     80                "" ::: "memory"
     81        );
    8082        ras_page[1] = 0xffffffff;
    81 
     83       
    8284        return (bool) ret;
    8385}
     
    8991 *
    9092 * @return Value after addition.
    91  */
    92 static inline long atomic_add(atomic_t *val, int i)
    93 {
    94         long ret = 0;
    95 
     93 *
     94 */
     95static inline atomic_count_t atomic_add(atomic_t *val, atomic_count_t i)
     96{
     97        atomic_count_t ret = 0;
     98       
    9699        /*
    97100         * The following instructions between labels 1 and 2 constitute a
     
    115118                : [imm] "r" (i)
    116119        );
    117 
     120       
    118121        ras_page[0] = 0;
    119         asm volatile ("" ::: "memory");
     122        asm volatile (
     123                "" ::: "memory"
     124        );
    120125        ras_page[1] = 0xffffffff;
    121 
     126       
    122127        return ret;
    123128}
     
    127132 *
    128133 * @param val Variable to be incremented.
     134 *
    129135 */
    130136static inline void atomic_inc(atomic_t *val)
     
    137143 *
    138144 * @param val Variable to be decremented.
     145 *
    139146 */
    140147static inline void atomic_dec(atomic_t *val)
     
    148155 * @param val Variable to be incremented.
    149156 * @return    Value after incrementation.
    150  */
    151 static inline long atomic_preinc(atomic_t *val)
     157 *
     158 */
     159static inline atomic_count_t atomic_preinc(atomic_t *val)
    152160{
    153161        return atomic_add(val, 1);
     
    159167 * @param val Variable to be decremented.
    160168 * @return    Value after decrementation.
    161  */
    162 static inline long atomic_predec(atomic_t *val)
     169 *
     170 */
     171static inline atomic_count_t atomic_predec(atomic_t *val)
    163172{
    164173        return atomic_add(val, -1);
     
    170179 * @param val Variable to be incremented.
    171180 * @return    Value before incrementation.
    172  */
    173 static inline long atomic_postinc(atomic_t *val)
     181 *
     182 */
     183static inline atomic_count_t atomic_postinc(atomic_t *val)
    174184{
    175185        return atomic_add(val, 1) - 1;
     
    181191 * @param val Variable to be decremented.
    182192 * @return    Value before decrementation.
    183  */
    184 static inline long atomic_postdec(atomic_t *val)
     193 *
     194 */
     195static inline atomic_count_t atomic_postdec(atomic_t *val)
    185196{
    186197        return atomic_add(val, -1) + 1;
  • uspace/lib/c/arch/arm32/include/types.h

    r24a2517 rc621f4aa  
    2727 */
    2828
    29 /** @addtogroup libcarm32       
     29/** @addtogroup libcarm32
    3030 * @{
    3131 */
    32 /** @file 
     32/** @file
    3333 *  @brief Definitions of basic types like #uintptr_t.
    3434 */
     
    3939#define __32_BITS__
    4040
    41 typedef unsigned int sysarg_t;
     41#include <libarch/common.h>
    4242
    43 typedef char int8_t;
    44 typedef short int int16_t;
    45 typedef long int int32_t;
    46 typedef long long int int64_t;
     43#define SIZE_MIN  UINT32_MIN
     44#define SIZE_MAX  UINT32_MAX
    4745
    48 typedef unsigned char uint8_t;
    49 typedef unsigned short int uint16_t;
    50 typedef unsigned long int uint32_t;
    51 typedef unsigned long long int uint64_t;
     46#define SSIZE_MIN  INT32_MIN
     47#define SSIZE_MAX  INT32_MAX
     48
     49typedef uint32_t sysarg_t;
    5250
    5351typedef int32_t ssize_t;
     
    5553
    5654typedef uint32_t uintptr_t;
     55typedef uint32_t atomic_count_t;
     56typedef int32_t atomic_signed_t;
    5757
    5858#endif
Note: See TracChangeset for help on using the changeset viewer.