For some reason there was no point for that anymore.
Unified · Split
| @@ -1363,7 +1363,7 @@ from_stack: · 1362 unmodified lines | ||
| 1363 | 1363 | addr = (n + nf + sn) * 4; |
| 1364 | 1364 | sn += size; |
| 1365 | 1365 | } |
| 1366 | − sym_push(sym->v & ~SYM_FIELD, type, VT_LOCAL | lvalue_type(type->t), | |
| 1366 | + sym_push(sym->v & ~SYM_FIELD, type, VT_LOCAL | VT_LVAL, | |
| 1367 | 1367 | addr + 12); |
| 1368 | 1368 | } |
| 1369 | 1369 | last_itod_magic=0; |
| @@ -446,7 +446,7 @@ static void arm64_load_cmp(int r, SValue *sv); · 445 unmodified lines | ||
| 446 | 446 | ST_FUNC void load(int r, SValue *sv) |
| 447 | 447 | { |
| 448 | 448 | int svtt = sv->type.t; |
| 449 | − int svr = sv->r & ~VT_LVAL_TYPE; | |
| 449 | + int svr = sv->r; | |
| 450 | 450 | int svrv = svr & VT_VALMASK; |
| 451 | 451 | uint64_t svcul = (uint32_t)sv->c.i; |
| 452 | 452 | svcul = svcul >> 31 & 1 ? svcul - ((uint64_t)1 << 32) : svcul; |
| @@ -546,7 +546,7 @@ ST_FUNC void load(int r, SValue *sv) · 93 unmodified lines | ||
| 546 | 546 | ST_FUNC void store(int r, SValue *sv) |
| 547 | 547 | { |
| 548 | 548 | int svtt = sv->type.t; |
| 549 | − int svr = sv->r & ~VT_LVAL_TYPE; | |
| 549 | + int svr = sv->r; | |
| 550 | 550 | int svrv = svr & VT_VALMASK; |
| 551 | 551 | uint64_t svcul = (uint32_t)sv->c.i; |
| 552 | 552 | svcul = svcul >> 31 & 1 ? svcul - ((uint64_t)1 << 32) : svcul; |
| @@ -1039,7 +1039,7 @@ ST_FUNC void gfunc_prolog(Sym *func_sym) · 486 unmodified lines | ||
| 1039 | 1039 | a[i] < 32 ? 16 + (a[i] - 16) / 2 * 16 : |
| 1040 | 1040 | 224 + ((a[i] - 32) >> 1 << 1)); |
| 1041 | 1041 | sym_push(sym->v & ~SYM_FIELD, &sym->type, |
| 1042 | − (a[i] & 1 ? VT_LLOCAL : VT_LOCAL) | lvalue_type(sym->type.t), | |
| 1042 | + (a[i] & 1 ? VT_LLOCAL : VT_LOCAL) | VT_LVAL, | |
| 1043 | 1043 | off); |
| 1044 | 1044 | |
| 1045 | 1045 | if (a[i] < 16) { |
| @@ -1126,7 +1126,7 @@ ST_FUNC void gen_va_arg(CType *t) · 80 unmodified lines | ||
| 1126 | 1126 | gaddrof(); |
| 1127 | 1127 | r0 = intr(gv(RC_INT)); |
| 1128 | 1128 | r1 = get_reg(RC_INT); |
| 1129 | − vtop[0].r = r1 | lvalue_type(t->t); | |
| 1129 | + vtop[0].r = r1 | VT_LVAL; | |
| 1130 | 1130 | r1 = intr(r1); |
| 1131 | 1131 | |
| 1132 | 1132 | if (!hfa) { |
| @@ -1964,7 +1964,7 @@ void gfunc_prolog(Sym *func_sym) · 1963 unmodified lines | ||
| 1964 | 1964 | /* define parameters */ |
| 1965 | 1965 | while ((sym = sym->next) != NULL) { |
| 1966 | 1966 | type = &sym->type; |
| 1967 | − sym_push(sym->v & ~SYM_FIELD, type, VT_LOCAL | lvalue_type(type->t), addr); | |
| 1967 | + sym_push(sym->v & ~SYM_FIELD, type, VT_LOCAL | VT_LVAL, addr); | |
| 1968 | 1968 | size = type_size(type, &align); |
| 1969 | 1969 | size = (size + 3) & ~3; |
| 1970 | 1970 | |
| @@ -587,7 +587,7 @@ ST_FUNC void gfunc_prolog(Sym *func_sym) · 586 unmodified lines | ||
| 587 | 587 | addr += size; |
| 588 | 588 | } |
| 589 | 589 | sym_push(sym->v & ~SYM_FIELD, type, |
| 590 | − VT_LOCAL | lvalue_type(type->t), param_addr); | |
| 590 | + VT_LOCAL | VT_LVAL, param_addr); | |
| 591 | 591 | param_index++; |
| 592 | 592 | } |
| 593 | 593 | func_ret_sub = 0; |
| @@ -1084,16 +1084,7 @@ ST_FUNC void gen_bounded_ptr_deref(void) · 490 unmodified lines | ||
| 1084 | 1084 | if (nocode_wanted) |
| 1085 | 1085 | return; |
| 1086 | 1086 | |
| 1087 | − size = 0; | |
| 1088 | − /* XXX: put that code in generic part of tcc */ | |
| 1089 | − if (!is_float(vtop->type.t)) { | |
| 1090 | − if (vtop->r & VT_LVAL_BYTE) | |
| 1091 | − size = 1; | |
| 1092 | − else if (vtop->r & VT_LVAL_SHORT) | |
| 1093 | − size = 2; | |
| 1094 | − } | |
| 1095 | − if (!size) | |
| 1096 | − size = type_size(&vtop->type, &align); | |
| 1087 | + size = type_size(&vtop->type, &align); | |
| 1097 | 1088 | switch(size) { |
| 1098 | 1089 | case 1: func = TOK___bound_ptr_indir1; break; |
| 1099 | 1090 | case 2: func = TOK___bound_ptr_indir2; break; |
| @@ -681,7 +681,7 @@ ST_FUNC void gfunc_prolog(Sym *func_sym) · 680 unmodified lines | ||
| 681 | 681 | } |
| 682 | 682 | } |
| 683 | 683 | sym_push(sym->v & ~SYM_FIELD, &sym->type, |
| 684 | − (byref ? VT_LLOCAL : VT_LOCAL) | lvalue_type(sym->type.t), | |
| 684 | + (byref ? VT_LLOCAL : VT_LOCAL) | VT_LVAL, | |
| 685 | 685 | param_addr); |
| 686 | 686 | } |
| 687 | 687 | func_va_list_ofs = addr; |
| @@ -932,11 +932,6 @@ struct filespec { · 931 unmodified lines | ||
| 932 | 932 | dereferencing value */ |
| 933 | 933 | #define VT_BOUNDED 0x8000 /* value is bounded. The address of the |
| 934 | 934 | bounding function call point is in vc */ |
| 935 | −#define VT_LVAL_BYTE 0x1000 /* lvalue is a byte */ | |
| 936 | −#define VT_LVAL_SHORT 0x2000 /* lvalue is a short */ | |
| 937 | −#define VT_LVAL_UNSIGNED 0x4000 /* lvalue is unsigned */ | |
| 938 | −#define VT_LVAL_TYPE (VT_LVAL_BYTE | VT_LVAL_SHORT | VT_LVAL_UNSIGNED) | |
| 939 | − | |
| 940 | 935 | /* types */ |
| 941 | 936 | #define VT_BTYPE 0x000f /* mask for basic type */ |
| 942 | 937 | #define VT_VOID 0 /* void type */ |
| @@ -1426,7 +1421,6 @@ ST_FUNC void vstore(void); · 483 unmodified lines | ||
| 1426 | 1421 | ST_FUNC void inc(int post, int c); |
| 1427 | 1422 | ST_FUNC void parse_mult_str (CString *astr, const char *msg); |
| 1428 | 1423 | ST_FUNC void parse_asm_str(CString *astr); |
| 1429 | −ST_FUNC int lvalue_type(int t); | |
| 1430 | 1424 | ST_FUNC void indir(void); |
| 1431 | 1425 | ST_FUNC void unary(void); |
| 1432 | 1426 | ST_FUNC void expr_prod(void); |
| @@ -1408,7 +1408,7 @@ ST_FUNC void save_reg_upstack(int r, int n) · 1407 unmodified lines | ||
| 1408 | 1408 | p->c.i */ |
| 1409 | 1409 | p->r = (p->r & ~(VT_VALMASK | VT_BOUNDED)) | VT_LLOCAL; |
| 1410 | 1410 | } else { |
| 1411 | − p->r = lvalue_type(p->type.t) | VT_LOCAL; | |
| 1411 | + p->r = VT_LVAL | VT_LOCAL; | |
| 1412 | 1412 | } |
| 1413 | 1413 | p->r2 = VT_CONST; |
| 1414 | 1414 | p->c.i = l; |
| @@ -1430,7 +1430,7 @@ ST_FUNC int get_reg_ex(int rc, int rc2) · 15 unmodified lines | ||
| 1430 | 1430 | n=0; |
| 1431 | 1431 | for(p = vstack; p <= vtop; p++) { |
| 1432 | 1432 | if ((p->r & VT_VALMASK) == r || |
| 1433 | − (p->r2 & VT_VALMASK) == r) | |
| 1433 | + p->r2 == r) | |
| 1434 | 1434 | n++; |
| 1435 | 1435 | } |
| 1436 | 1436 | if (n <= 1) |
| @@ -1454,7 +1454,7 @@ ST_FUNC int get_reg(int rc) · 17 unmodified lines | ||
| 1454 | 1454 | return r; |
| 1455 | 1455 | for(p=vstack;p<=vtop;p++) { |
| 1456 | 1456 | if ((p->r & VT_VALMASK) == r || |
| 1457 | − (p->r2 & VT_VALMASK) == r) | |
| 1457 | + p->r2 == r) | |
| 1458 | 1458 | goto notfound; |
| 1459 | 1459 | } |
| 1460 | 1460 | return r; |
| @@ -1467,7 +1467,7 @@ ST_FUNC int get_reg(int rc) · 6 unmodified lines | ||
| 1467 | 1467 | spill registers used in gen_opi()) */ |
| 1468 | 1468 | for(p=vstack;p<=vtop;p++) { |
| 1469 | 1469 | /* look at second register (if long long) */ |
| 1470 | − r = p->r2 & VT_VALMASK; | |
| 1470 | + r = p->r2; | |
| 1471 | 1471 | if (r < VT_CONST && (reg_classes[r] & rc)) |
| 1472 | 1472 | goto save_found; |
| 1473 | 1473 | r = p->r & VT_VALMASK; |
| @@ -1553,16 +1553,13 @@ ST_FUNC void gaddrof(void) · 79 unmodified lines | ||
| 1553 | 1553 | vtop->r &= ~VT_LVAL; |
| 1554 | 1554 | /* tricky: if saved lvalue, then we can go back to lvalue */ |
| 1555 | 1555 | if ((vtop->r & VT_VALMASK) == VT_LLOCAL) |
| 1556 | − vtop->r = (vtop->r & ~(VT_VALMASK | VT_LVAL_TYPE)) | VT_LOCAL | VT_LVAL; | |
| 1557 | − | |
| 1558 | − | |
| 1556 | + vtop->r = (vtop->r & ~VT_VALMASK) | VT_LOCAL | VT_LVAL; | |
| 1559 | 1557 | } |
| 1560 | 1558 | |
| 1561 | 1559 | #ifdef CONFIG_TCC_BCHECK |
| 1562 | 1560 | /* generate lvalue bound code */ |
| 1563 | 1561 | static void gbound(void) |
| 1564 | 1562 | { |
| 1565 | − int lval_type; | |
| 1566 | 1563 | CType type1; |
| 1567 | 1564 | |
| 1568 | 1565 | vtop->r &= ~VT_MUSTBOUND; |
| @@ -1570,14 +1567,13 @@ static void gbound(void) · 1 unmodified line | ||
| 1570 | 1567 | if (vtop->r & VT_LVAL) { |
| 1571 | 1568 | /* if not VT_BOUNDED value, then make one */ |
| 1572 | 1569 | if (!(vtop->r & VT_BOUNDED)) { |
| 1573 | − lval_type = vtop->r & (VT_LVAL_TYPE | VT_LVAL); | |
| 1574 | 1570 | /* must save type because we must set it to int to get pointer */ |
| 1575 | 1571 | type1 = vtop->type; |
| 1576 | 1572 | vtop->type.t = VT_PTR; |
| 1577 | 1573 | gaddrof(); |
| 1578 | 1574 | vpushi(0); |
| 1579 | 1575 | gen_bounded_ptr_add(); |
| 1580 | − vtop->r |= lval_type; | |
| 1576 | + vtop->r |= VT_LVAL; | |
| 1581 | 1577 | vtop->type = type1; |
| 1582 | 1578 | } |
| 1583 | 1579 | /* then check for dereferencing */ |
| @@ -1603,12 +1599,10 @@ static void incr_bf_adr(int o) · 19 unmodified lines | ||
| 1603 | 1599 | { |
| 1604 | 1600 | vtop->type = char_pointer_type; |
| 1605 | 1601 | gaddrof(); |
| 1606 | − vpushi(o); | |
| 1602 | + vpushs(o); | |
| 1607 | 1603 | gen_op('+'); |
| 1608 | − vtop->type.t = (vtop->type.t & ~(VT_BTYPE|VT_DEFSIGN)) | |
| 1609 | − | (VT_BYTE|VT_UNSIGNED); | |
| 1610 | − vtop->r = (vtop->r & ~VT_LVAL_TYPE) | |
| 1611 | − | (VT_LVAL_BYTE|VT_LVAL_UNSIGNED|VT_LVAL); | |
| 1604 | + vtop->type.t = VT_BYTE | VT_UNSIGNED; | |
| 1605 | + vtop->r |= VT_LVAL; | |
| 1612 | 1606 | } |
| 1613 | 1607 | |
| 1614 | 1608 | /* single-byte load mode for packed or otherwise unaligned bitfields */ |
| @@ -1688,7 +1682,7 @@ static int adjust_bf(SValue *sv, int bit_pos, int bit_size) · 73 unmodified lines | ||
| 1688 | 1682 | t = sv->type.ref->auxtype; |
| 1689 | 1683 | if (t != -1 && t != VT_STRUCT) { |
| 1690 | 1684 | sv->type.t = (sv->type.t & ~VT_BTYPE) | t; |
| 1691 | − sv->r = (sv->r & ~VT_LVAL_TYPE) | lvalue_type(sv->type.t); | |
| 1685 | + sv->r |= VT_LVAL; | |
| 1692 | 1686 | } |
| 1693 | 1687 | return t; |
| 1694 | 1688 | } |
| @@ -1824,23 +1818,6 @@ ST_FUNC int gv(int rc) · 129 unmodified lines | ||
| 1824 | 1818 | vtop->r2 = r2; |
| 1825 | 1819 | done: |
| 1826 | 1820 | vtop->type.t = original_type; |
| 1827 | − } else if ((vtop->r & VT_LVAL) && !is_float(vtop->type.t)) { | |
| 1828 | − int t1, t; | |
| 1829 | − /* lvalue of scalar type : need to use lvalue type | |
| 1830 | − because of possible cast */ | |
| 1831 | − t = vtop->type.t; | |
| 1832 | − t1 = t; | |
| 1833 | − /* compute memory access type */ | |
| 1834 | − if (vtop->r & VT_LVAL_BYTE) | |
| 1835 | − t = VT_BYTE; | |
| 1836 | − else if (vtop->r & VT_LVAL_SHORT) | |
| 1837 | − t = VT_SHORT; | |
| 1838 | − if (vtop->r & VT_LVAL_UNSIGNED) | |
| 1839 | − t |= VT_UNSIGNED; | |
| 1840 | − vtop->type.t = t; | |
| 1841 | − load(r, vtop); | |
| 1842 | − /* restore wanted type */ | |
| 1843 | − vtop->type.t = t1; | |
| 1844 | 1821 | } else { |
| 1845 | 1822 | if (vtop->r == VT_CMP) |
| 1846 | 1823 | vset_VT_JMP(); |
| @@ -2983,16 +2960,11 @@ static void gen_cast(CType *type) · 1136 unmodified lines | ||
| 2983 | 2960 | } |
| 2984 | 2961 | #endif |
| 2985 | 2962 | } |
| 2986 | − /* if lvalue and single word type, nothing to do because | |
| 2987 | − the lvalue already contains the real type size (see | |
| 2988 | − VT_LVAL_xxx constants) */ | |
| 2989 | 2963 | } |
| 2964 | + if ((vtop->r & VT_LVAL) | |
| 2965 | + && (dbt & VT_BTYPE) != (sbt & VT_BTYPE)) | |
| 2966 | + gv(RC_INT); | |
| 2990 | 2967 | } |
| 2991 | − } else if ((dbt & VT_BTYPE) == VT_PTR && !(vtop->r & VT_LVAL)) { | |
| 2992 | − /* if we are casting between pointer types, | |
| 2993 | − we must update the VT_LVAL_xxx size */ | |
| 2994 | − vtop->r = (vtop->r & ~VT_LVAL_TYPE) | |
| 2995 | − | (lvalue_type(type->ref->type.t) & VT_LVAL_TYPE); | |
| 2996 | 2968 | } |
| 2997 | 2969 | vtop->type = *type; |
| 2998 | 2970 | vtop->type.t &= ~ ( VT_CONSTANT | VT_VOLATILE | VT_ARRAY ); |
| @@ -4850,23 +4822,6 @@ static CType *type_decl(CType *type, AttributeDef *ad, int *v, int td) · 1851 unmodified lines | ||
| 4850 | 4822 | return ret; |
| 4851 | 4823 | } |
| 4852 | 4824 | |
| 4853 | −/* compute the lvalue VT_LVAL_xxx needed to match type t. */ | |
| 4854 | −ST_FUNC int lvalue_type(int t) | |
| 4855 | −{ | |
| 4856 | − int bt, r; | |
| 4857 | − r = VT_LVAL; | |
| 4858 | − bt = t & VT_BTYPE; | |
| 4859 | − if (bt == VT_BYTE || bt == VT_BOOL) | |
| 4860 | − r |= VT_LVAL_BYTE; | |
| 4861 | − else if (bt == VT_SHORT) | |
| 4862 | − r |= VT_LVAL_SHORT; | |
| 4863 | − else | |
| 4864 | − return r; | |
| 4865 | − if (t & VT_UNSIGNED) | |
| 4866 | − r |= VT_LVAL_UNSIGNED; | |
| 4867 | − return r; | |
| 4868 | −} | |
| 4869 | − | |
| 4870 | 4825 | /* indirection with full error checking and bound check */ |
| 4871 | 4826 | ST_FUNC void indir(void) |
| 4872 | 4827 | { |
| @@ -4879,9 +4834,9 @@ ST_FUNC void indir(void) · 6 unmodified lines | ||
| 4879 | 4834 | gv(RC_INT); |
| 4880 | 4835 | vtop->type = *pointed_type(&vtop->type); |
| 4881 | 4836 | /* Arrays and functions are never lvalues */ |
| 4882 | − if (!(vtop->type.t & VT_ARRAY) && !(vtop->type.t & VT_VLA) | |
| 4837 | + if (!(vtop->type.t & (VT_ARRAY | VT_VLA)) | |
| 4883 | 4838 | && (vtop->type.t & VT_BTYPE) != VT_FUNC) { |
| 4884 | − vtop->r |= lvalue_type(vtop->type.t); | |
| 4839 | + vtop->r |= VT_LVAL; | |
| 4885 | 4840 | /* if bound checking, the referenced pointer must be checked */ |
| 4886 | 4841 | #ifdef CONFIG_TCC_BCHECK |
| 4887 | 4842 | if (tcc_state->do_bounds_check) |
| @@ -5087,7 +5042,7 @@ ST_FUNC void unary(void) · 199 unmodified lines | ||
| 5087 | 5042 | r = VT_LOCAL; |
| 5088 | 5043 | /* all except arrays are lvalues */ |
| 5089 | 5044 | if (!(type.t & VT_ARRAY)) |
| 5090 | − r |= lvalue_type(type.t); | |
| 5045 | + r |= VT_LVAL; | |
| 5091 | 5046 | memset(&ad, 0, sizeof(AttributeDef)); |
| 5092 | 5047 | decl_initializer_alloc(&type, &ad, r, 1, 0, 0); |
| 5093 | 5048 | } else { |
| @@ -5549,7 +5504,7 @@ special_math_val: · 455 unmodified lines | ||
| 5549 | 5504 | vtop->type.t |= qualifiers; |
| 5550 | 5505 | /* an array is never an lvalue */ |
| 5551 | 5506 | if (!(vtop->type.t & VT_ARRAY)) { |
| 5552 | − vtop->r |= lvalue_type(vtop->type.t); | |
| 5507 | + vtop->r |= VT_LVAL; | |
| 5553 | 5508 | #ifdef CONFIG_TCC_BCHECK |
| 5554 | 5509 | /* if bound checking, the referenced pointer must be checked */ |
| 5555 | 5510 | if (tcc_state->do_bounds_check && (vtop->r & VT_VALMASK) != VT_LOCAL) |
| @@ -7948,7 +7903,7 @@ found: · 2392 unmodified lines | ||
| 7948 | 7903 | type.ref->f = ad.f; |
| 7949 | 7904 | } else if (!(type.t & VT_ARRAY)) { |
| 7950 | 7905 | /* not lvalue if array */ |
| 7951 | − r |= lvalue_type(type.t); | |
| 7906 | + r |= VT_LVAL; | |
| 7952 | 7907 | } |
| 7953 | 7908 | has_init = (tok == '='); |
| 7954 | 7909 | if (has_init && (type.t & VT_VLA)) |
| @@ -678,16 +678,7 @@ ST_FUNC void gen_bounded_ptr_deref(void) · 677 unmodified lines | ||
| 678 | 678 | if (nocode_wanted) |
| 679 | 679 | return; |
| 680 | 680 | |
| 681 | − size = 0; | |
| 682 | − /* XXX: put that code in generic part of tcc */ | |
| 683 | − if (!is_float(vtop->type.t)) { | |
| 684 | − if (vtop->r & VT_LVAL_BYTE) | |
| 685 | − size = 1; | |
| 686 | − else if (vtop->r & VT_LVAL_SHORT) | |
| 687 | − size = 2; | |
| 688 | − } | |
| 689 | − if (!size) | |
| 690 | − size = type_size(&vtop->type, &align); | |
| 681 | + size = type_size(&vtop->type, &align); | |
| 691 | 682 | switch(size) { |
| 692 | 683 | case 1: func = TOK___bound_ptr_indir1; break; |
| 693 | 684 | case 2: func = TOK___bound_ptr_indir2; break; |
| @@ -981,7 +972,7 @@ void gfunc_prolog(Sym *func_sym) · 287 unmodified lines | ||
| 981 | 972 | gen_modrm64(0x89, arg_regs[reg_param_index], VT_LOCAL, NULL, addr); |
| 982 | 973 | } |
| 983 | 974 | sym_push(sym->v & ~SYM_FIELD, type, |
| 984 | − VT_LLOCAL | lvalue_type(type->t), addr); | |
| 975 | + VT_LLOCAL | VT_LVAL, addr); | |
| 985 | 976 | } else { |
| 986 | 977 | if (reg_param_index < REGN) { |
| 987 | 978 | /* save arguments passed by register */ |
| @@ -995,7 +986,7 @@ void gfunc_prolog(Sym *func_sym) · 7 unmodified lines | ||
| 995 | 986 | } |
| 996 | 987 | } |
| 997 | 988 | sym_push(sym->v & ~SYM_FIELD, type, |
| 998 | − VT_LOCAL | lvalue_type(type->t), addr); | |
| 989 | + VT_LOCAL | VT_LVAL, addr); | |
| 999 | 990 | } |
| 1000 | 991 | addr += 8; |
| 1001 | 992 | reg_param_index++; |
| @@ -1205,7 +1196,16 @@ static X86_64_Mode classify_x86_64_arg(CType *ty, CType *ret, int *psize, int *p · 203 unmodified lines | ||
| 1205 | 1196 | ret_t = VT_QLONG; |
| 1206 | 1197 | } else { |
| 1207 | 1198 | *reg_count = 1; |
| 1208 | − ret_t = (size > 4) ? VT_LLONG : VT_INT; | |
| 1199 | + if (size > 4) | |
| 1200 | + ret_t = VT_LLONG; | |
| 1201 | + else if (size > 2) | |
| 1202 | + ret_t = VT_INT; | |
| 1203 | + else if (size > 1) | |
| 1204 | + ret_t = VT_SHORT; | |
| 1205 | + else | |
| 1206 | + ret_t = VT_BYTE; | |
| 1207 | + if ((ty->t & VT_BTYPE) == VT_STRUCT || (ty->t & VT_UNSIGNED)) | |
| 1208 | + ret_t |= VT_UNSIGNED; | |
| 1209 | 1209 | } |
| 1210 | 1210 | break; |
| 1211 | 1211 | |
| @@ -1321,7 +1321,7 @@ void gfunc_call(int nb_args) · 109 unmodified lines | ||
| 1321 | 1321 | tcc_error("SSE disabled but floating point arguments passed"); |
| 1322 | 1322 | |
| 1323 | 1323 | /* fetch cpu flag before generating any code */ |
| 1324 | − if (vtop >= vstack && (vtop->r & VT_VALMASK) == VT_CMP) | |
| 1324 | + if ((vtop->r & VT_VALMASK) == VT_CMP) | |
| 1325 | 1325 | gv(RC_INT); |
| 1326 | 1326 | |
| 1327 | 1327 | /* for struct arguments, we need to call memcpy and the function |
| @@ -1635,7 +1635,7 @@ void gfunc_prolog(Sym *func_sym) · 307 unmodified lines | ||
| 1635 | 1635 | default: break; /* nothing to be done for x86_64_mode_none */ |
| 1636 | 1636 | } |
| 1637 | 1637 | sym_push(sym->v & ~SYM_FIELD, type, |
| 1638 | − VT_LOCAL | lvalue_type(type->t), param_addr); | |
| 1638 | + VT_LOCAL | VT_LVAL, param_addr); | |
| 1639 | 1639 | } |
| 1640 | 1640 | |
| 1641 | 1641 | #ifdef CONFIG_TCC_BCHECK |