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


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/ia64
Files:
2 added
23 moved

Legend:

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

    r24a2517 rc621f4aa  
    2727#
    2828
    29 ## Toolchain configuration
    30 #
    31 
    32 TARGET = amd64-linux-gnu
    33 CLANG_ARCH = x86_64
    34 TOOLCHAIN_DIR = $(CROSS_PREFIX)/amd64/bin
    35 
    36 ARCH_SOURCES += arch/$(UARCH)/src/syscall.S \
     29ARCH_SOURCES = \
     30        arch/$(UARCH)/src/entry.s \
     31        arch/$(UARCH)/src/thread_entry.s \
     32        arch/$(UARCH)/src/syscall.S \
    3733        arch/$(UARCH)/src/fibril.S \
    3834        arch/$(UARCH)/src/tls.c \
     35        arch/$(UARCH)/src/ddi.c \
    3936        arch/$(UARCH)/src/stacktrace.c \
    4037        arch/$(UARCH)/src/stacktrace_asm.S
    4138
    42 GCC_CFLAGS += -fno-omit-frame-pointer
    43 LFLAGS += -N
    44 
    45 ENDIANESS = LE
    46 
    47 BFD_NAME = elf64-x86-64
    48 BFD_ARCH = i386:x86-64
     39.PRECIOUS: arch/$(UARCH)/src/entry.o
  • uspace/lib/c/arch/ia64/_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/ia64/include/atomic.h

    r24a2517 rc621f4aa  
    4242static inline void atomic_inc(atomic_t *val)
    4343{
    44         long v;
     44        atomic_count_t v;
    4545       
    4646        asm volatile (
     
    5353static inline void atomic_dec(atomic_t *val)
    5454{
    55         long v;
     55        atomic_count_t v;
    5656       
    5757        asm volatile (
     
    6262}
    6363
    64 static inline long atomic_preinc(atomic_t *val)
     64static inline atomic_count_t atomic_preinc(atomic_t *val)
    6565{
    66         long v;
     66        atomic_count_t v;
    6767       
    6868        asm volatile (
     
    7575}
    7676
    77 static inline long atomic_predec(atomic_t *val)
     77static inline atomic_count_t atomic_predec(atomic_t *val)
    7878{
    79         long v;
     79        atomic_count_t v;
    8080       
    8181        asm volatile (
     
    8888}
    8989
    90 static inline long atomic_postinc(atomic_t *val)
     90static inline atomic_count_t atomic_postinc(atomic_t *val)
    9191{
    92         long v;
     92        atomic_count_t v;
    9393       
    9494        asm volatile (
     
    101101}
    102102
    103 static inline long atomic_postdec(atomic_t *val)
     103static inline atomic_count_t atomic_postdec(atomic_t *val)
    104104{
    105         long v;
     105        atomic_count_t v;
    106106       
    107107        asm volatile (
  • uspace/lib/c/arch/ia64/include/ddi.h

    r24a2517 rc621f4aa  
    3939#include <libarch/types.h>
    4040
    41 #define IO_SPACE_BOUNDARY       (64 * 1024)
     41#define IO_SPACE_BOUNDARY       ((void *) (64 * 1024))
    4242
    4343uint64_t get_ia64_iospace_address(void);
  • uspace/lib/c/arch/ia64/include/faddr.h

    r24a2517 rc621f4aa  
    2727 */
    2828
    29 /** @addtogroup libcia64       
     29/** @addtogroup libcia64
    3030 * @{
    3131 */
     
    3838#include <libarch/types.h>
    3939
    40 /** 
     40/**
    4141 *
    4242 * Calculate absolute address of function
    4343 * referenced by fptr pointer.
    4444 *
    45  * @param f Function pointer.
     45 * @param fptr Function pointer.
    4646 *
    4747 */
    48 #define FADDR(f)         (*((uintptr_t *)(f)));
     48#define FADDR(fptr)  (((fncptr_t *) (fptr))->fnc)
    4949
    5050#endif
  • uspace/lib/c/arch/ia64/include/fibril.h

    r24a2517 rc621f4aa  
    106106        uint64_t pr;
    107107
    108         __r128 f2 __attribute__ ((aligned(16)));
    109         __r128 f3;
    110         __r128 f4;
    111         __r128 f5;
     108        uint128_t f2 __attribute__ ((aligned(16)));
     109        uint128_t f3;
     110        uint128_t f4;
     111        uint128_t f5;
    112112
    113         __r128 f16;
    114         __r128 f17;
    115         __r128 f18;
    116         __r128 f19;
    117         __r128 f20;
    118         __r128 f21;
    119         __r128 f22;
    120         __r128 f23;
    121         __r128 f24;
    122         __r128 f25;
    123         __r128 f26;
    124         __r128 f27;
    125         __r128 f28;
    126         __r128 f29;
    127         __r128 f30;
    128         __r128 f31;
     113        uint128_t f16;
     114        uint128_t f17;
     115        uint128_t f18;
     116        uint128_t f19;
     117        uint128_t f20;
     118        uint128_t f21;
     119        uint128_t f22;
     120        uint128_t f23;
     121        uint128_t f24;
     122        uint128_t f25;
     123        uint128_t f26;
     124        uint128_t f27;
     125        uint128_t f28;
     126        uint128_t f29;
     127        uint128_t f30;
     128        uint128_t f31;
    129129
    130130} context_t;
  • uspace/lib/c/arch/ia64/include/types.h

    r24a2517 rc621f4aa  
    2727 */
    2828
    29 /** @addtogroup libcia64       
     29/** @addtogroup libcia64
    3030 * @{
    3131 */
     
    3838#define __64_BITS__
    3939
    40 typedef unsigned long long sysarg_t;
     40#include <libarch/common.h>
    4141
    42 typedef char int8_t;
    43 typedef short int int16_t;
    44 typedef int int32_t;
    45 typedef long int int64_t;
     42#define SIZE_MIN  UINT64_MIN
     43#define SIZE_MAX  UINT64_MAX
    4644
    47 typedef unsigned char uint8_t;
    48 typedef unsigned short int uint16_t;
    49 typedef unsigned int uint32_t;
    50 typedef unsigned long int uint64_t;
     45#define SSIZE_MIN  INT64_MIN
     46#define SSIZE_MAX  INT64_MAX
     47
     48typedef struct {
     49        uint64_t lo;
     50        int64_t hi;
     51} int128_t;
     52
     53typedef struct {
     54        uint64_t lo;
     55        uint64_t hi;
     56} uint128_t;
     57
     58typedef uint64_t sysarg_t;
    5159
    5260typedef int64_t ssize_t;
     
    5462
    5563typedef uint64_t uintptr_t;
     64typedef uint64_t atomic_count_t;
     65typedef int64_t atomic_signed_t;
    5666
    57 typedef unsigned char __r8;                     /* Reserve byte */
    58 typedef unsigned short __r16;
    59 typedef unsigned int __r32;
    60 typedef unsigned long __r64;
    61 
    62 typedef struct __r128{
    63         __r64 lo;
    64         __r64 hi;
    65 } __r128;
     67typedef struct {
     68        uintptr_t fnc;
     69        uintptr_t gp;
     70} __attribute__((may_alias)) fncptr_t;
    6671
    6772#endif
  • uspace/lib/c/arch/ia64/src/entry.s

    r24a2517 rc621f4aa  
    3939__entry:
    4040        alloc loc0 = ar.pfs, 0, 1, 2, 0
    41         movl r1 = _gp
     41        movl gp = _gp
    4242
    4343        # Pass PCB pointer as the first argument to __main
  • uspace/lib/c/arch/ia64/src/thread_entry.s

    r24a2517 rc621f4aa  
    3737        alloc loc0 = ar.pfs, 0, 1, 1, 0
    3838
    39         movl r1 = _gp
     39        movl gp = _gp
    4040       
    4141        #
Note: See TracChangeset for help on using the changeset viewer.