Ignore:
Timestamp:
Jan 21, 2018, 12:10:09 AM (6 years ago)
Author:
coas-nagasima
Message:

prototoolに関連するプロジェクトをnewlibからmuslを使うよう変更・更新
ntshellをnewlibの下位の実装から、muslのsyscallの実装に変更・更新
以下のOSSをアップデート
・mruby-1.3.0
・musl-1.1.18
・onigmo-6.1.3
・tcc-0.9.27
以下のOSSを追加
・openssl-1.1.0e
・curl-7.57.0
・zlib-1.2.11
以下のmrbgemsを追加
・iij/mruby-digest
・iij/mruby-env
・iij/mruby-errno
・iij/mruby-iijson
・iij/mruby-ipaddr
・iij/mruby-mock
・iij/mruby-require
・iij/mruby-tls-openssl

Location:
EcnlProtoTool/trunk/tcc-0.9.27
Files:
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • EcnlProtoTool/trunk/tcc-0.9.27/lib/libtcc1.c

    r321 r331  
    104104union float_long {
    105105    float f;
    106     long l;
     106    unsigned int l;
    107107};
    108108
    109109/* XXX: we don't support several builtin supports for now */
    110 #ifndef __x86_64__
     110#if !defined __x86_64__ && !defined __arm__
    111111
    112112/* XXX: use gcc/tcc intrinsic ? */
    113 #if defined(__i386__)
     113#if defined __i386__
    114114#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
    115115  __asm__ ("subl %5,%1\n\tsbbl %3,%0"                                   \
     
    479479}
    480480
    481 #if defined(__i386__)
    482 /* FPU control word for rounding to nearest mode */
    483 unsigned short __tcc_fpu_control = 0x137f;
    484 /* FPU control word for round to zero mode for int conversion */
    485 unsigned short __tcc_int_fpu_control = 0x137f | 0x0c00;
    486 #endif
    487 
    488481#endif /* !__x86_64__ */
    489482
     
    558551}
    559552
     553long long __fixsfdi (float a1)
     554{
     555    long long ret; int s;
     556    ret = __fixunssfdi((s = a1 >= 0) ? a1 : -a1);
     557    return s ? ret : -ret;
     558}
     559
    560560unsigned long long __fixunsdfdi (double a1)
    561561{
     
    583583}
    584584
     585long long __fixdfdi (double a1)
     586{
     587    long long ret; int s;
     588    ret = __fixunsdfdi((s = a1 >= 0) ? a1 : -a1);
     589    return s ? ret : -ret;
     590}
     591
     592#ifndef __arm__
    585593unsigned long long __fixunsxfdi (long double a1)
    586594{
     
    606614}
    607615
    608 #if defined(__x86_64__) && !defined(_WIN64)
    609 
    610 /* helper functions for stdarg.h */
    611 
    612 #include <stdlib.h>
    613 #ifndef __TINYC__
    614 /* gives "incompatible types for redefinition of __va_arg" below */
    615 #include <stdio.h>
    616 #endif
    617 
    618 enum __va_arg_type {
    619     __va_gen_reg, __va_float_reg, __va_stack
    620 };
    621 
    622 /* GCC compatible definition of va_list. */
    623 struct __va_list_struct {
    624     unsigned int gp_offset;
    625     unsigned int fp_offset;
    626     union {
    627         unsigned int overflow_offset;
    628         char *overflow_arg_area;
    629     };
    630     char *reg_save_area;
    631 };
    632 
    633 void *__va_start(void *fp)
    634 {
    635     struct __va_list_struct *ap =
    636         (struct __va_list_struct *)malloc(sizeof(struct __va_list_struct));
    637     *ap = *(struct __va_list_struct *)((char *)fp - 16);
    638     ap->overflow_arg_area = (char *)fp + ap->overflow_offset;
    639     ap->reg_save_area = (char *)fp - 176 - 16;
    640     return ap;
    641 }
    642 
    643 void *__va_arg(struct __va_list_struct *ap,
    644                enum __va_arg_type arg_type,
    645                int size)
    646 {
    647     size = (size + 7) & ~7;
    648     switch (arg_type) {
    649     case __va_gen_reg:
    650         if (ap->gp_offset < 48) {
    651             ap->gp_offset += 8;
    652             return ap->reg_save_area + ap->gp_offset - 8;
    653         }
    654         size = 8;
    655         goto use_overflow_area;
    656 
    657     case __va_float_reg:
    658         if (ap->fp_offset < 128 + 48) {
    659             ap->fp_offset += 16;
    660             return ap->reg_save_area + ap->fp_offset - 16;
    661         }
    662         size = 8;
    663         goto use_overflow_area;
    664 
    665     case __va_stack:
    666     use_overflow_area:
    667         ap->overflow_arg_area += size;
    668         return ap->overflow_arg_area - size;
    669 
    670     default:
    671 #ifndef __TINYC__
    672         fprintf(stderr, "unknown ABI type for __va_arg\n");
    673 #endif
    674         abort();
    675     }
    676 }
    677 
    678 void *__va_copy(struct __va_list_struct *src)
    679 {
    680     struct __va_list_struct *dest =
    681         (struct __va_list_struct *)malloc(sizeof(struct __va_list_struct));
    682     *dest = *src;
    683     return dest;
    684 }
    685 
    686 void __va_end(struct __va_list_struct *ap)
    687 {
    688     free(ap);
    689 }
    690 
    691 #endif /* __x86_64__ */
     616long long __fixxfdi (long double a1)
     617{
     618    long long ret; int s;
     619    ret = __fixunsxfdi((s = a1 >= 0) ? a1 : -a1);
     620    return s ? ret : -ret;
     621}
     622#endif /* !ARM */
Note: See TracChangeset for help on using the changeset viewer.