Unified · Split
| @@ -36,10 +36,10 @@ · 35 unmodified lines | ||
| 36 | 36 | |
| 37 | 37 | /* pretty names for the registers */ |
| 38 | 38 | enum { |
| 39 | − REG_EAX = 0, | |
| 40 | − REG_ECX, | |
| 41 | − REG_EDX, | |
| 42 | − REG_ST0, | |
| 39 | + TREG_EAX = 0, | |
| 40 | + TREG_ECX, | |
| 41 | + TREG_EDX, | |
| 42 | + TREG_ST0, | |
| 43 | 43 | }; |
| 44 | 44 | |
| 45 | 45 | int reg_classes[NB_REGS] = { |
| @@ -50,9 +50,9 @@ int reg_classes[NB_REGS] = { · 4 unmodified lines | ||
| 50 | 50 | }; |
| 51 | 51 | |
| 52 | 52 | /* return registers for function */ |
| 53 | −#define REG_IRET REG_EAX /* single word int return register */ | |
| 54 | −#define REG_LRET REG_EDX /* second word return register (for long long) */ | |
| 55 | −#define REG_FRET REG_ST0 /* float return register */ | |
| 53 | +#define REG_IRET TREG_EAX /* single word int return register */ | |
| 54 | +#define REG_LRET TREG_EDX /* second word return register (for long long) */ | |
| 55 | +#define REG_FRET TREG_ST0 /* float return register */ | |
| 56 | 56 | |
| 57 | 57 | /* defined if function parameters must be evaluated in reverse order */ |
| 58 | 58 | #define INVERT_FUNC_PARAMS |
| @@ -647,12 +647,12 @@ void gen_opi(int op) · 588 unmodified lines | ||
| 647 | 647 | r = vtop[-1].r; |
| 648 | 648 | fr = vtop[0].r; |
| 649 | 649 | vtop--; |
| 650 | − save_reg(REG_EDX); | |
| 650 | + save_reg(TREG_EDX); | |
| 651 | 651 | if (op == TOK_UMULL) { |
| 652 | 652 | o(0xf7); /* mul fr */ |
| 653 | 653 | o(0xe0 + fr); |
| 654 | − vtop->r2 = REG_EDX; | |
| 655 | − r = REG_EAX; | |
| 654 | + vtop->r2 = TREG_EDX; | |
| 655 | + r = TREG_EAX; | |
| 656 | 656 | } else { |
| 657 | 657 | if (op == TOK_UDIV || op == TOK_UMOD) { |
| 658 | 658 | o(0xf7d231); /* xor %edx, %edx, div fr, %eax */ |
| @@ -662,9 +662,9 @@ void gen_opi(int op) · 3 unmodified lines | ||
| 662 | 662 | o(0xf8 + fr); |
| 663 | 663 | } |
| 664 | 664 | if (op == '%' || op == TOK_UMOD) |
| 665 | − r = REG_EDX; | |
| 665 | + r = TREG_EDX; | |
| 666 | 666 | else |
| 667 | − r = REG_EAX; | |
| 667 | + r = TREG_EAX; | |
| 668 | 668 | } |
| 669 | 669 | vtop->r = r; |
| 670 | 670 | break; |
| @@ -706,8 +706,8 @@ void gen_opf(int op) · 35 unmodified lines | ||
| 706 | 706 | } |
| 707 | 707 | if (op >= TOK_ULT && op <= TOK_GT) { |
| 708 | 708 | /* load on stack second operand */ |
| 709 | − load(REG_ST0, vtop); | |
| 710 | − save_reg(REG_EAX); /* eax is used by FP comparison code */ | |
| 709 | + load(TREG_ST0, vtop); | |
| 710 | + save_reg(TREG_EAX); /* eax is used by FP comparison code */ | |
| 711 | 711 | if (op == TOK_GE || op == TOK_GT) |
| 712 | 712 | swapped = !swapped; |
| 713 | 713 | else if (op == TOK_EQ || op == TOK_NE) |
| @@ -736,7 +736,7 @@ void gen_opf(int op) · 22 unmodified lines | ||
| 736 | 736 | } else { |
| 737 | 737 | /* no memory reference possible for long double operations */ |
| 738 | 738 | if ((vtop->type.t & VT_BTYPE) == VT_LDOUBLE) { |
| 739 | − load(REG_ST0, vtop); | |
| 739 | + load(TREG_ST0, vtop); | |
| 740 | 740 | swapped = !swapped; |
| 741 | 741 | } |
| 742 | 742 | |
| @@ -791,7 +791,7 @@ void gen_opf(int op) · 48 unmodified lines | ||
| 791 | 791 | and 'long long' cases. */ |
| 792 | 792 | void gen_cvt_itof(int t) |
| 793 | 793 | { |
| 794 | − save_reg(REG_ST0); | |
| 794 | + save_reg(TREG_ST0); | |
| 795 | 795 | gv(RC_INT); |
| 796 | 796 | if ((vtop->type.t & VT_BTYPE) == VT_LLONG) { |
| 797 | 797 | /* signed long long to float/double/long double (unsigned case |
| @@ -814,7 +814,7 @@ void gen_cvt_itof(int t) · 16 unmodified lines | ||
| 814 | 814 | o(0x2404db); /* fildl (%esp) */ |
| 815 | 815 | o(0x04c483); /* add $4, %esp */ |
| 816 | 816 | } |
| 817 | − vtop->r = REG_ST0; | |
| 817 | + vtop->r = TREG_ST0; | |
| 818 | 818 | } |
| 819 | 819 | |
| 820 | 820 | /* convert fp to int 't' type */ |
| @@ -902,7 +902,7 @@ void gen_bounded_ptr_add(void) · 81 unmodified lines | ||
| 902 | 902 | oad(0xe8, -4); |
| 903 | 903 | /* returned pointer is in eax */ |
| 904 | 904 | vtop++; |
| 905 | − vtop->r = REG_EAX | VT_BOUNDED; | |
| 905 | + vtop->r = TREG_EAX | VT_BOUNDED; | |
| 906 | 906 | /* address of bounding function call point */ |
| 907 | 907 | vtop->c.ul = (cur_text_section->reloc->data_offset - sizeof(Elf32_Rel)); |
| 908 | 908 | } |