History

Runtime lib functions

Yesterday I felt the urge to change a few things in TinyCC. This is the first and biggest change of all of them. - use __aeabi_*divmod functions in ARM EABI to make binaries depend solely on standardized library functions - refactor ARM floating point <-> integer conversion a bit - rename long long->float and shift library functions to correspond to the names used by GCC - compile more tokens conditionally to reduce the size of TinyCC The intention is primarily to allow users of the ARM target to use libgcc (which is usually available as a shared library) instead of libtcc1 (which can't be compiled for ARM due to lack of an inline assembler). Changing the EABI target to use the divmod functions in theory allows to use it without libtcc1 on any (not necessarily GCC based) ARM EABI system. Daniel

Daniel Glöckner committed 18 years ago

Commit 12265da1 parent 2c657f64 files · +140 −94Browse files

Unified · Split

4 files
  1. arm-gen.c +75 −41
  2. libtcc1.c +6 −6
  3. tcc.c +26 −17
  4. tcctok.h +33 −30
arm-gen.c+75−41
@@ -110,6 +110,13 @@ static int regmask(int r) { · 109 unmodified lines
110#define REG_LRET TREG_R1 /* second word return register (for long long) */110#define REG_LRET TREG_R1 /* second word return register (for long long) */
111#define REG_FRET TREG_F0 /* float return register */111#define REG_FRET TREG_F0 /* float return register */
112 112
113#ifdef TCC_ARM_EABI
114#define TOK___divdi3 TOK___aeabi_ldivmod
115#define TOK___moddi3 TOK___aeabi_ldivmod
116#define TOK___udivdi3 TOK___aeabi_uldivmod
117#define TOK___umoddi3 TOK___aeabi_uldivmod
118#endif
119
113/* defined if function parameters must be evaluated in reverse order */120/* defined if function parameters must be evaluated in reverse order */
114#define INVERT_FUNC_PARAMS121#define INVERT_FUNC_PARAMS
115 122
@@ -119,6 +126,11 @@ static int regmask(int r) { · 3 unmodified lines
119 126
120#if defined(TCC_ARM_EABI) && defined(TCC_ARM_VFP)127#if defined(TCC_ARM_EABI) && defined(TCC_ARM_VFP)
121static CType float_type, double_type, func_float_type, func_double_type;128static CType float_type, double_type, func_float_type, func_double_type;
129#define func_ldouble_type func_double_type
130#else
131#define func_float_type func_old_type
132#define func_double_type func_old_type
133#define func_ldouble_type func_old_type
122#endif134#endif
123 135
124/* pointer size, in bytes */136/* pointer size, in bytes */
@@ -1083,6 +1095,7 @@ void gen_opi(int op) · 958 unmodified lines
1083{1095{
1084 int c, func = 0;1096 int c, func = 0;
1085 unsigned long opc = 0,r,fr;1097 unsigned long opc = 0,r,fr;
1098 unsigned short retreg = REG_IRET;
1086 1099
1087 c=0;1100 c=0;
1088 switch(op) {1101 switch(op) {
@@ -1151,11 +1164,21 @@ void gen_opi(int op) · 62 unmodified lines
1151 c=3;1164 c=3;
1152 break;1165 break;
1153 case '%':1166 case '%':
1167#ifdef TCC_ARM_EABI
1168 func=TOK___aeabi_idivmod;
1169 retreg=REG_LRET;
1170#else
1154 func=TOK___modsi3;1171 func=TOK___modsi3;
1172#endif
1155 c=3;1173 c=3;
1156 break;1174 break;
1157 case TOK_UMOD:1175 case TOK_UMOD:
1176#ifdef TCC_ARM_EABI
1177 func=TOK___aeabi_uidivmod;
1178 retreg=REG_LRET;
1179#else
1158 func=TOK___umodsi3;1180 func=TOK___umodsi3;
1181#endif
1159 c=3;1182 c=3;
1160 break;1183 break;
1161 case TOK_UMULL:1184 case TOK_UMULL:
@@ -1230,7 +1253,7 @@ done: · 68 unmodified lines
1230 vrott(3);1253 vrott(3);
1231 gfunc_call(2);1254 gfunc_call(2);
1232 vpushi(0);1255 vpushi(0);
1233 vtop->r = REG_IRET;1256 vtop->r = retreg;
1234 break;1257 break;
1235 default:1258 default:
1236 error("gen_opi %i unimplemented!",op);1259 error("gen_opi %i unimplemented!",op);
@@ -1547,11 +1570,14 @@ void gen_opf(int op) · 310 unmodified lines
1547 1570
1548/* convert integers to fp 't' type. Must handle 'int', 'unsigned int'1571/* convert integers to fp 't' type. Must handle 'int', 'unsigned int'
1549 and 'long long' cases. */1572 and 'long long' cases. */
1550void gen_cvt_itof(int t)1573void gen_cvt_itof1(int t)
1551{1574{
1552 int r,r2,bt;1575 int r,r2,bt;
1553 bt=vtop->type.t & VT_BTYPE;1576 bt=vtop->type.t & VT_BTYPE;
1554 if(bt == VT_INT || bt == VT_SHORT || bt == VT_BYTE) {1577 if(bt == VT_INT || bt == VT_SHORT || bt == VT_BYTE) {
1578#ifndef TCC_ARM_VFP
1579 unsigned int dsize=0;
1580#endif
1555 r=intr(gv(RC_INT));1581 r=intr(gv(RC_INT));
1556#ifdef TCC_ARM_VFP1582#ifdef TCC_ARM_VFP
1557 r2=vfpr(vtop->r=get_reg(RC_FLOAT));1583 r2=vfpr(vtop->r=get_reg(RC_FLOAT));
@@ -1562,10 +1588,12 @@ void gen_cvt_itof(int t) · 4 unmodified lines
1562 o(0xEEB80A40|r2|T2CPR(t)); /* fYitoX*/1588 o(0xEEB80A40|r2|T2CPR(t)); /* fYitoX*/
1563#else1589#else
1564 r2=fpr(vtop->r=get_reg(RC_FLOAT));1590 r2=fpr(vtop->r=get_reg(RC_FLOAT));
1565 o(0xEE000190|(r2<<16)|(r<<12));1591 if((t & VT_BTYPE) != VT_FLOAT)
1592 dsize=0x80; /* flts -> fltd */
1593 o(0xEE000110|dsize|(r2<<16)|(r<<12)); /* flts */
1566 if((vtop->type.t & (VT_UNSIGNED|VT_BTYPE)) == (VT_UNSIGNED|VT_INT)) {1594 if((vtop->type.t & (VT_UNSIGNED|VT_BTYPE)) == (VT_UNSIGNED|VT_INT)) {
1567 unsigned int off=0;1595 unsigned int off=0;
1568 o(0xE3500000|(r<<12));1596 o(0xE3500000|(r<<12)); /* cmp */
1569 r=fpr(get_reg(RC_FLOAT));1597 r=fpr(get_reg(RC_FLOAT));
1570 if(last_itod_magic) {1598 if(last_itod_magic) {
1571 off=ind+8-last_itod_magic;1599 off=ind+8-last_itod_magic;
@@ -1573,44 +1601,50 @@ void gen_cvt_itof(int t) · 1 unmodified line
1573 if(off>255)1601 if(off>255)
1574 off=0;1602 off=0;
1575 }1603 }
1576 o(0xBD1F8100|(r<<12)|off);1604 o(0xBD1F0100|(r<<12)|off); /* ldflts */
1577 if(!off) {1605 if(!off) {
1578 o(0xEA000001);1606 o(0xEA000000); /* b */
1579 last_itod_magic=ind;1607 last_itod_magic=ind;
1580 o(0x41F00000);1608 o(0x4F800000); /* 4294967296.0f */
1581 o(0);
1582 }1609 }
1583 o(0xBE000180|(r2<<16)|(r2<<12)|r);1610 o(0xBE000100|dsize|(r2<<16)|(r2<<12)|r); /* adflt */
1584 }1611 }
1585#endif1612#endif
1586 return;1613 return;
1587 } else if(bt == VT_LLONG) {1614 } else if(bt == VT_LLONG) {
1588 int func;1615 int func;
1589 CType *func_type = &func_old_type;1616 CType *func_type = 0;
1590#ifdef TCC_ARM_VFP
1591#ifdef TCC_ARM_EABI
1592 func_type = &func_double_type;
1593#endif
1594 if((t & VT_BTYPE) == VT_FLOAT) {1617 if((t & VT_BTYPE) == VT_FLOAT) {
1595#ifdef TCC_ARM_EABI
1596 func_type = &func_float_type;1618 func_type = &func_float_type;
1597#endif
1598 if(vtop->type.t & VT_UNSIGNED)1619 if(vtop->type.t & VT_UNSIGNED)
1599 func=TOK___ulltof;1620 func=TOK___floatundisf;
1600 else1621 else
1601 func=TOK___slltof;1622 func=TOK___floatdisf;
1602 } else1623#if LDOUBLE_SIZE != 8
1624 } else if((t & VT_BTYPE) == VT_LDOUBLE) {
1625 func_type = &func_ldouble_type;
1626 if(vtop->type.t & VT_UNSIGNED)
1627 func=TOK___floatundixf;
1628 else
1629 func=TOK___floatdixf;
1630 } else if((t & VT_BTYPE) == VT_DOUBLE) {
1631#else
1632 } else if((t & VT_BTYPE) == VT_DOUBLE || (t & VT_BTYPE) == VT_LDOUBLE) {
1603#endif1633#endif
1604 if(vtop->type.t & VT_UNSIGNED)1634 func_type = &func_double_type;
1605 func=TOK___ulltold;1635 if(vtop->type.t & VT_UNSIGNED)
1606 else1636 func=TOK___floatundidf;
1607 func=TOK___slltold;1637 else
1608 vpush_global_sym(func_type, func);1638 func=TOK___floatdidf;
1609 vswap();1639 }
1610 gfunc_call(1);1640 if(func_type) {
1611 vpushi(0);1641 vpush_global_sym(func_type, func);
1612 vtop->r=TREG_F0;1642 vswap();
1613 return;1643 gfunc_call(1);
1644 vpushi(0);
1645 vtop->r=TREG_F0;
1646 return;
1647 }
1614 }1648 }
1615 error("unimplemented gen_cvt_itof %x!",vtop->type.t);1649 error("unimplemented gen_cvt_itof %x!",vtop->type.t);
1616}1650}
@@ -1634,33 +1668,33 @@ void gen_cvt_ftoi(int t) · 17 unmodified lines
1634 if(u) {1668 if(u) {
1635 if(r2 == VT_FLOAT)1669 if(r2 == VT_FLOAT)
1636 func=TOK___fixunssfsi;1670 func=TOK___fixunssfsi;
1637 else if(r2 == VT_DOUBLE)1671#if LDOUBLE_SIZE != 8
1638 func=TOK___fixunsdfsi;
1639 else if(r2 == VT_LDOUBLE)1672 else if(r2 == VT_LDOUBLE)
1640#if LDOUBLE_SIZE == 8
1641 func=TOK___fixunsdfsi;
1642#else
1643 func=TOK___fixunsxfsi;1673 func=TOK___fixunsxfsi;
1674 else if(r2 == VT_DOUBLE)
1675#else
1676 else if(r2 == VT_LDOUBLE || r2 == VT_DOUBLE)
1644#endif1677#endif
1678 func=TOK___fixunsdfsi;
1645 } else {1679 } else {
1646 r=fpr(gv(RC_FLOAT));1680 r=fpr(gv(RC_FLOAT));
1647 r2=intr(vtop->r=get_reg(RC_INT));1681 r2=intr(vtop->r=get_reg(RC_INT));
1648 o(0xEE100170|(r2<<12)|r);1682 o(0xEE100170|(r2<<12)|r);
1649 return;1683 return;
1650 }1684 }
1651#endif1685#endif
1652 } else if(t == VT_LLONG) { // unsigned handled in gen_cvt_ftoi11686 } else if(t == VT_LLONG) { // unsigned handled in gen_cvt_ftoi1
1653 if(r2 == VT_FLOAT)1687 if(r2 == VT_FLOAT)
1654 func=TOK___fixsfdi;1688 func=TOK___fixsfdi;
1655 else if(r2 == VT_DOUBLE)1689#if LDOUBLE_SIZE != 8
1656 func=TOK___fixdfdi;
1657 else if(r2 == VT_LDOUBLE)1690 else if(r2 == VT_LDOUBLE)
1658#if LDOUBLE_SIZE == 8
1659 func=TOK___fixdfdi;
1660#else
1661 func=TOK___fixxfdi;1691 func=TOK___fixxfdi;
1692 else if(r2 == VT_DOUBLE)
1693#else
1694 else if(r2 == VT_LDOUBLE || r2 == VT_DOUBLE)
1662#endif1695#endif
1663 }1696 func=TOK___fixdfdi;
1697 }
1664 if(func) {1698 if(func) {
1665 vpush_global_sym(&func_old_type, func);1699 vpush_global_sym(&func_old_type, func);
1666 vswap();1700 vswap();
libtcc1.c+6−6
@@ -419,7 +419,7 @@ unsigned long long __umoddi3(unsigned long long u, unsigned long long v) · 418 unmodified lines
419}419}
420 420
421/* XXX: fix tcc's code generator to do this instead */421/* XXX: fix tcc's code generator to do this instead */
422long long __sardi3(long long a, int b)422long long __ashrdi3(long long a, int b)
423{423{
424#ifdef __TINYC__424#ifdef __TINYC__
425 DWunion u;425 DWunion u;
@@ -438,7 +438,7 @@ long long __sardi3(long long a, int b) · 12 unmodified lines
438}438}
439 439
440/* XXX: fix tcc's code generator to do this instead */440/* XXX: fix tcc's code generator to do this instead */
441unsigned long long __shrdi3(unsigned long long a, int b)441unsigned long long __lshrdi3(unsigned long long a, int b)
442{442{
443#ifdef __TINYC__443#ifdef __TINYC__
444 DWunion u;444 DWunion u;
@@ -457,7 +457,7 @@ unsigned long long __shrdi3(unsigned long long a, int b) · 12 unmodified lines
457}457}
458 458
459/* XXX: fix tcc's code generator to do this instead */459/* XXX: fix tcc's code generator to do this instead */
460long long __shldi3(long long a, int b)460long long __ashldi3(long long a, int b)
461{461{
462#ifdef __TINYC__462#ifdef __TINYC__
463 DWunion u;463 DWunion u;
@@ -483,7 +483,7 @@ unsigned short __tcc_int_fpu_control = 0x137f | 0x0c00; · 19 unmodified lines
483#endif483#endif
484 484
485/* XXX: fix tcc's code generator to do this instead */485/* XXX: fix tcc's code generator to do this instead */
486float __ulltof(unsigned long long a)486float __floatundisf(unsigned long long a)
487{487{
488 DWunion uu; 488 DWunion uu;
489 XFtype r;489 XFtype r;
@@ -498,7 +498,7 @@ float __ulltof(unsigned long long a) · 8 unmodified lines
498 }498 }
499}499}
500 500
501double __ulltod(unsigned long long a)501double __floatundidf(unsigned long long a)
502{502{
503 DWunion uu; 503 DWunion uu;
504 XFtype r;504 XFtype r;
@@ -513,7 +513,7 @@ double __ulltod(unsigned long long a) · 8 unmodified lines
513 }513 }
514}514}
515 515
516long double __ulltold(unsigned long long a)516long double __floatundixf(unsigned long long a)
517{517{
518 DWunion uu; 518 DWunion uu;
519 XFtype r;519 XFtype r;
tcc.c+26−17
@@ -5261,6 +5261,8 @@ void gen_opl(int op) · 5260 unmodified lines
5261{5261{
5262 int t, a, b, op1, c, i;5262 int t, a, b, op1, c, i;
5263 int func;5263 int func;
5264 unsigned short reg_iret = REG_IRET;
5265 unsigned short reg_lret = REG_LRET;
5264 SValue tmp;5266 SValue tmp;
5265 5267
5266 switch(op) {5268 switch(op) {
@@ -5273,17 +5275,22 @@ void gen_opl(int op) · 6 unmodified lines
5273 goto gen_func;5275 goto gen_func;
5274 case '%':5276 case '%':
5275 func = TOK___moddi3;5277 func = TOK___moddi3;
5276 goto gen_func;5278 goto gen_mod_func;
5277 case TOK_UMOD:5279 case TOK_UMOD:
5278 func = TOK___umoddi3;5280 func = TOK___umoddi3;
5281 gen_mod_func:
5282#ifdef TCC_ARM_EABI
5283 reg_iret = TREG_R2;
5284 reg_lret = TREG_R3;
5285#endif
5279 gen_func:5286 gen_func:
5280 /* call generic long long function */5287 /* call generic long long function */
5281 vpush_global_sym(&func_old_type, func);5288 vpush_global_sym(&func_old_type, func);
5282 vrott(3);5289 vrott(3);
5283 gfunc_call(2);5290 gfunc_call(2);
5284 vpushi(0);5291 vpushi(0);
5285 vtop->r = REG_IRET;5292 vtop->r = reg_iret;
5286 vtop->r2 = REG_LRET;5293 vtop->r2 = reg_lret;
5287 break;5294 break;
5288 case '^':5295 case '^':
5289 case '&':5296 case '&':
@@ -5407,13 +5414,13 @@ void gen_opl(int op) · 117 unmodified lines
5407 /* XXX: should provide a faster fallback on x86 ? */5414 /* XXX: should provide a faster fallback on x86 ? */
5408 switch(op) {5415 switch(op) {
5409 case TOK_SAR:5416 case TOK_SAR:
5410 func = TOK___sardi3;5417 func = TOK___ashrdi3;
5411 goto gen_func;5418 goto gen_func;
5412 case TOK_SHR:5419 case TOK_SHR:
5413 func = TOK___shrdi3;5420 func = TOK___lshrdi3;
5414 goto gen_func;5421 goto gen_func;
5415 case TOK_SHL:5422 case TOK_SHL:
5416 func = TOK___shldi3;5423 func = TOK___ashldi3;
5417 goto gen_func;5424 goto gen_func;
5418 }5425 }
5419 }5426 }
@@ -5878,6 +5885,7 @@ void gen_op(int op) · 458 unmodified lines
5878 }5885 }
5879}5886}
5880 5887
5888#ifndef TCC_TARGET_ARM
5881/* generic itof for unsigned long long case */5889/* generic itof for unsigned long long case */
5882void gen_cvt_itof1(int t)5890void gen_cvt_itof1(int t)
5883{5891{
@@ -5885,11 +5893,13 @@ void gen_cvt_itof1(int t) · 1 unmodified line
5885 (VT_LLONG | VT_UNSIGNED)) {5893 (VT_LLONG | VT_UNSIGNED)) {
5886 5894
5887 if (t == VT_FLOAT)5895 if (t == VT_FLOAT)
5888 vpush_global_sym(&func_old_type, TOK___ulltof);5896 vpush_global_sym(&func_old_type, TOK___floatundisf);
5889 else if (t == VT_DOUBLE)5897#if LDOUBLE_SIZE != 8
5890 vpush_global_sym(&func_old_type, TOK___ulltod);5898 else if (t == VT_LDOUBLE)
5899 vpush_global_sym(&func_old_type, TOK___floatundixf);
5900#endif
5891 else5901 else
5892 vpush_global_sym(&func_old_type, TOK___ulltold);5902 vpush_global_sym(&func_old_type, TOK___floatundidf);
5893 vrott(2);5903 vrott(2);
5894 gfunc_call(1);5904 gfunc_call(1);
5895 vpushi(0);5905 vpushi(0);
@@ -5898,6 +5908,7 @@ void gen_cvt_itof1(int t) · 2 unmodified lines
5898 gen_cvt_itof(t);5908 gen_cvt_itof(t);
5899 }5909 }
5900}5910}
5911#endif
5901 5912
5902/* generic ftoi for unsigned long long case */5913/* generic ftoi for unsigned long long case */
5903void gen_cvt_ftoi1(int t)5914void gen_cvt_ftoi1(int t)
@@ -5909,10 +5920,12 @@ void gen_cvt_ftoi1(int t) · 5 unmodified lines
5909 st = vtop->type.t & VT_BTYPE;5920 st = vtop->type.t & VT_BTYPE;
5910 if (st == VT_FLOAT)5921 if (st == VT_FLOAT)
5911 vpush_global_sym(&func_old_type, TOK___fixunssfdi);5922 vpush_global_sym(&func_old_type, TOK___fixunssfdi);
5912 else if (st == VT_DOUBLE)5923#if LDOUBLE_SIZE != 8
5913 vpush_global_sym(&func_old_type, TOK___fixunsdfdi);5924 else if (st == VT_LDOUBLE)
5914 else
5915 vpush_global_sym(&func_old_type, TOK___fixunsxfdi);5925 vpush_global_sym(&func_old_type, TOK___fixunsxfdi);
5926#endif
5927 else
5928 vpush_global_sym(&func_old_type, TOK___fixunsdfdi);
5916 vrott(2);5929 vrott(2);
5917 gfunc_call(1);5930 gfunc_call(1);
5918 vpushi(0);5931 vpushi(0);
@@ -6020,11 +6033,7 @@ static void gen_cast(CType *type) · 101 unmodified lines
6020 }6033 }
6021 } else {6034 } else {
6022 do_itof:6035 do_itof:
6023#if !defined(TCC_TARGET_ARM)
6024 gen_cvt_itof1(dbt);6036 gen_cvt_itof1(dbt);
6025#else
6026 gen_cvt_itof(dbt);
6027#endif
6028 }6037 }
6029 } else if (sf) {6038 } else if (sf) {
6030 /* convert fp to int */6039 /* convert fp to int */
tcctok.h+33−30
@@ -126,41 +126,42 @@ · 125 unmodified lines
126 DEF(TOK_memcpy4, "__aeabi_memcpy4")126 DEF(TOK_memcpy4, "__aeabi_memcpy4")
127 DEF(TOK_memcpy8, "__aeabi_memcpy8")127 DEF(TOK_memcpy8, "__aeabi_memcpy8")
128 DEF(TOK_memset, "__aeabi_memset")128 DEF(TOK_memset, "__aeabi_memset")
129 DEF(TOK___aeabi_ldivmod, "__aeabi_ldivmod")
130 DEF(TOK___aeabi_uldivmod, "__aeabi_uldivmod")
129#else131#else
130 DEF(TOK_memcpy, "memcpy")132 DEF(TOK_memcpy, "memcpy")
131 DEF(TOK_memset, "memset")133 DEF(TOK_memset, "memset")
132#endif
133 DEF(TOK___divdi3, "__divdi3")134 DEF(TOK___divdi3, "__divdi3")
134 DEF(TOK___moddi3, "__moddi3")135 DEF(TOK___moddi3, "__moddi3")
135 DEF(TOK___udivdi3, "__udivdi3")136 DEF(TOK___udivdi3, "__udivdi3")
136 DEF(TOK___umoddi3, "__umoddi3")137 DEF(TOK___umoddi3, "__umoddi3")
138#endif
137#if defined(TCC_TARGET_ARM)139#if defined(TCC_TARGET_ARM)
138 DEF(TOK___modsi3, "__modsi3")
139 DEF(TOK___umodsi3, "__umodsi3")
140#ifdef TCC_ARM_EABI140#ifdef TCC_ARM_EABI
141 DEF(TOK___aeabi_idivmod, "__aeabi_idivmod")
142 DEF(TOK___aeabi_uidivmod, "__aeabi_uidivmod")
141 DEF(TOK___divsi3, "__aeabi_idiv")143 DEF(TOK___divsi3, "__aeabi_idiv")
142 DEF(TOK___udivsi3, "__aeabi_uidiv")144 DEF(TOK___udivsi3, "__aeabi_uidiv")
143 DEF(TOK___sardi3, "__aeabi_lasr")145 DEF(TOK___floatdisf, "__aeabi_l2f")
144 DEF(TOK___shrdi3, "__aeabi_llsr")146 DEF(TOK___floatdidf, "__aeabi_l2d")
145 DEF(TOK___shldi3, "__aeabi_llsl")
146 DEF(TOK___slltof, "__aeabi_l2f")
147 DEF(TOK___slltold, "__aeabi_l2d")
148 DEF(TOK___fixsfdi, "__aeabi_f2lz")147 DEF(TOK___fixsfdi, "__aeabi_f2lz")
149 DEF(TOK___fixdfdi, "__aeabi_d2lz")148 DEF(TOK___fixdfdi, "__aeabi_d2lz")
150 DEF(TOK___fixxfdi, "__aeabi_d2lz")
151#else149#else
150 DEF(TOK___modsi3, "__modsi3")
151 DEF(TOK___umodsi3, "__umodsi3")
152 DEF(TOK___divsi3, "__divsi3")152 DEF(TOK___divsi3, "__divsi3")
153 DEF(TOK___udivsi3, "__udivsi3")153 DEF(TOK___udivsi3, "__udivsi3")
154 DEF(TOK___sardi3, "__ashrdi3")154 DEF(TOK___floatdisf, "__floatdisf")
155 DEF(TOK___shrdi3, "__lshrdi3")155 DEF(TOK___floatdidf, "__floatdidf")
156 DEF(TOK___shldi3, "__ashldi3")156#ifndef TCC_ARM_VFP
157 DEF(TOK___slltold, "__slltold")157 DEF(TOK___floatdixf, "__floatdixf")
158 DEF(TOK___fixunssfsi, "__fixunssfsi")158 DEF(TOK___fixunssfsi, "__fixunssfsi")
159 DEF(TOK___fixunsdfsi, "__fixunsdfsi")159 DEF(TOK___fixunsdfsi, "__fixunsdfsi")
160 DEF(TOK___fixunsxfsi, "__fixunsxfsi")160 DEF(TOK___fixunsxfsi, "__fixunsxfsi")
161 DEF(TOK___fixxfdi, "__fixxfdi")
162#endif
161 DEF(TOK___fixsfdi, "__fixsfdi")163 DEF(TOK___fixsfdi, "__fixsfdi")
162 DEF(TOK___fixdfdi, "__fixdfdi")164 DEF(TOK___fixdfdi, "__fixdfdi")
163 DEF(TOK___fixxfdi, "__fixxfdi")
164#endif165#endif
165#elif defined(TCC_TARGET_C67)166#elif defined(TCC_TARGET_C67)
166 DEF(TOK__divi, "_divi")167 DEF(TOK__divi, "_divi")
@@ -169,33 +170,35 @@ · 2 unmodified lines
169 DEF(TOK__divd, "_divd")170 DEF(TOK__divd, "_divd")
170 DEF(TOK__remi, "_remi")171 DEF(TOK__remi, "_remi")
171 DEF(TOK__remu, "_remu")172 DEF(TOK__remu, "_remu")
172 DEF(TOK___sardi3, "__sardi3")
173 DEF(TOK___shrdi3, "__shrdi3")
174 DEF(TOK___shldi3, "__shldi3")
175#else
176 /* XXX: same names on i386 ? */
177 DEF(TOK___sardi3, "__sardi3")
178 DEF(TOK___shrdi3, "__shrdi3")
179 DEF(TOK___shldi3, "__shldi3")
180#endif173#endif
174#ifdef TCC_TARGET_I386
181 DEF(TOK___tcc_int_fpu_control, "__tcc_int_fpu_control")175 DEF(TOK___tcc_int_fpu_control, "__tcc_int_fpu_control")
182 DEF(TOK___tcc_fpu_control, "__tcc_fpu_control")176 DEF(TOK___tcc_fpu_control, "__tcc_fpu_control")
177#endif
183#ifdef TCC_ARM_EABI178#ifdef TCC_ARM_EABI
184 DEF(TOK___ulltof, "__aeabi_ul2f")179 DEF(TOK___ashrdi3, "__aeabi_lasr")
185 DEF(TOK___ulltod, "__aeabi_ul2d")180 DEF(TOK___lshrdi3, "__aeabi_llsr")
186 DEF(TOK___ulltold, "__aeabi_ul2d")181 DEF(TOK___ashldi3, "__aeabi_llsl")
182 DEF(TOK___floatundisf, "__aeabi_ul2f")
183 DEF(TOK___floatundidf, "__aeabi_ul2d")
187 DEF(TOK___fixunssfdi, "__aeabi_f2ulz")184 DEF(TOK___fixunssfdi, "__aeabi_f2ulz")
188 DEF(TOK___fixunsdfdi, "__aeabi_d2ulz")185 DEF(TOK___fixunsdfdi, "__aeabi_d2ulz")
189 DEF(TOK___fixunsxfdi, "__aeabi_d2ulz")
190#else186#else
191 DEF(TOK___ulltof, "__ulltof")187 DEF(TOK___ashrdi3, "__ashrdi3")
192 DEF(TOK___ulltod, "__ulltod")188 DEF(TOK___lshrdi3, "__lshrdi3")
193 DEF(TOK___ulltold, "__ulltold")189 DEF(TOK___ashldi3, "__ashldi3")
190 DEF(TOK___floatundisf, "__floatundisf")
191 DEF(TOK___floatundidf, "__floatundidf")
192#ifndef TCC_ARM_VFP
193 DEF(TOK___floatundixf, "__floatundixf")
194 DEF(TOK___fixunsxfdi, "__fixunsxfdi")
195#endif
194 DEF(TOK___fixunssfdi, "__fixunssfdi")196 DEF(TOK___fixunssfdi, "__fixunssfdi")
195 DEF(TOK___fixunsdfdi, "__fixunsdfdi")197 DEF(TOK___fixunsdfdi, "__fixunsdfdi")
196 DEF(TOK___fixunsxfdi, "__fixunsxfdi")
197#endif198#endif
199#ifdef TCC_TARGET_PE
198 DEF(TOK___chkstk, "__chkstk")200 DEF(TOK___chkstk, "__chkstk")
201#endif
199 202
200/* bound checking symbols */203/* bound checking symbols */
201#ifdef CONFIG_TCC_BCHECK204#ifdef CONFIG_TCC_BCHECK

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t