History

use register classes (will allow better and simpler code gen - fixed long double handling

bellard committed 24 years ago

Commit 21c35b91 parent 49855112 files · +183 −142Browse files

Unified · Split

2 files
  1. i386-gen.c +103 −109
  2. tcc.c +80 −33
i386-gen.c+103−109
@@ -21,11 +21,11 @@ · 20 unmodified lines
2121 /* number of available registers */
2222 #define NB_REGS 4
2323
24−#define NB_REG_CLASSES 2
25−
2624 /* a register can belong to several classes */
27−#define REG_CLASS_INT 0x0001
28−#define REG_CLASS_FLOAT 0x0002
25+#define RC_INT 0x0001 /* generic integer register */
26+#define RC_FLOAT 0x0002 /* generic float register */
27+#define RC_IRET 0x0004 /* function returned integer register */
28+#define RC_FRET 0x0008 /* function returned float register */
2929
3030 /* pretty names for the registers */
3131 enum {
@@ -36,16 +36,15 @@ enum { · 4 unmodified lines
3636 };
3737
3838 int reg_classes[NB_REGS] = {
39− REG_CLASS_INT, /* eax */
40− REG_CLASS_INT, /* ecx */
41− REG_CLASS_INT, /* edx */
42− REG_CLASS_FLOAT, /* st0 */
39+ /* eax */ RC_INT | RC_IRET,
40+ /* ecx */ RC_INT,
41+ /* edx */ RC_INT,
42+ /* st0 */ RC_FLOAT | RC_FRET,
4343 };
4444
45−/* integer return register for functions */
46−#define FUNC_RET_REG 0
47−/* float return register for functions */
48−#define FUNC_RET_FREG 3
45+/* return registers for function */
46+#define REG_IRET REG_EAX
47+#define REG_FRET REG_ST0
4948
5049 /* defined if function parameters must be evaluated in reverse order */
5150 #define INVERT_FUNC_PARAMS
@@ -89,40 +88,17 @@ void gen_le32(int c) · 37 unmodified lines
8988 g(c >> 24);
9089 }
9190
92−/* add a new relocation entry to symbol 's' */
93−void greloc(Sym *s, int addr, int type)
94−{
95− Reloc *p;
96− p = malloc(sizeof(Reloc));
97− if (!p)
98− error("memory full");
99− p->type = type;
100− p->addr = addr;
101− p->next = (Reloc *)s->c;
102− s->c = (int)p;
103−}
104−
105−/* patch each relocation entry with value 'val' */
106−void greloc_patch(Sym *s, int val)
91+/* patch relocation entry with value 'val' */
92+void greloc_patch1(Reloc *p, int val)
10793 {
108− Reloc *p, *p1;
109−
110− p = (Reloc *)s->c;
111− while (p != NULL) {
112− p1 = p->next;
113− switch(p->type) {
114− case RELOC_ADDR32:
115− *(int *)p->addr = val;
116− break;
117− case RELOC_REL32:
118− *(int *)p->addr = val - p->addr - 4;
119− break;
120− }
121− free(p);
122− p = p1;
94+ switch(p->type) {
95+ case RELOC_ADDR32:
96+ *(int *)p->addr = val;
97+ break;
98+ case RELOC_REL32:
99+ *(int *)p->addr = val - p->addr - 4;
100+ break;
123101 }
124− s->c = val;
125− s->r &= ~VT_FORWARD;
126102 }
127103
128104 /* output a symbol and patch all calls to it */
@@ -166,6 +142,30 @@ void gen_addr32(int r, int c) · 37 unmodified lines
166142 }
167143 }
168144
145+/* generate a modrm reference. 'op_reg' contains the addtionnal 3
146+ opcode bits */
147+void gen_modrm(int op_reg, int r, int c)
148+{
149+ op_reg = op_reg << 3;
150+ if ((r & VT_VALMASK) == VT_CONST) {
151+ /* constant memory reference */
152+ o(0x05 | op_reg);
153+ gen_addr32(r, c);
154+ } else if ((r & VT_VALMASK) == VT_LOCAL) {
155+ /* currently, we use only ebp as base */
156+ if (c == (char)c) {
157+ /* short reference */
158+ o(0x45 | op_reg);
159+ g(c);
160+ } else {
161+ oad(0x85 | op_reg, c);
162+ }
163+ } else {
164+ g(0x00 | op_reg | (r & VT_VALMASK));
165+ }
166+}
167+
168+
169169 /* load 'r' from value 'sv' */
170170 void load(int r, SValue *sv)
171171 {
@@ -183,7 +183,7 @@ void load(int r, SValue *sv) · 11 unmodified lines
183183 v1.r = VT_LOCAL | VT_LVAL;
184184 v1.c.ul = fc;
185185 load(r, &v1);
186− v = r;
186+ fr = r;
187187 }
188188 if ((ft & VT_BTYPE) == VT_FLOAT) {
189189 o(0xd9); /* flds */
@@ -204,22 +204,14 @@ void load(int r, SValue *sv) · 14 unmodified lines
204204 o(0xb70f); /* movzwl */
205205 else
206206 o(0x8b); /* movl */
207−
208− if (v == VT_CONST) {
209− o(0x05 + r * 8); /* 0xXX, r */
210− gen_addr32(fr, fc);
211− } else if (v == VT_LOCAL) {
212− oad(0x85 + r * 8, fc); /* xx(%ebp), r */
213− } else {
214− g(0x00 + r * 8 + v); /* (v), r */
215− }
207+ gen_modrm(r, fr, fc);
216208 } else {
217209 if (v == VT_CONST) {
218210 o(0xb8 + r); /* mov $xx, r */
219211 gen_addr32(fr, fc);
220212 } else if (v == VT_LOCAL) {
221− o(0x8d);
222− oad(0x85 + r * 8, fc); /* lea xxx(%ebp), r */
213+ o(0x8d); /* lea xxx(%ebp), r */
214+ gen_modrm(r, VT_LOCAL, fc);
223215 } else if (v == VT_CMP) {
224216 oad(0xb8 + r, 0); /* mov $0, r */
225217 o(0x0f); /* setxx %br */
@@ -247,8 +239,7 @@ void store(int r, SValue *v) · 21 unmodified lines
247239 fc = v->c.ul;
248240 fr = v->r & VT_VALMASK;
249241 bt = ft & VT_BTYPE;
250− /* XXX: incorrect if reg to reg */
251− /* XXX: should not flush float stack */
242+ /* XXX: incorrect if float reg to reg */
252243 if (bt == VT_FLOAT) {
253244 o(0xd9); /* fsts */
254245 r = 2;
@@ -267,13 +258,10 @@ void store(int r, SValue *v) · 12 unmodified lines
267258 else
268259 o(0x89);
269260 }
270− if (fr == VT_CONST) {
271− o(0x05 + r * 8); /* mov r,xxx */
272− gen_addr32(v->r, fc);
273− } else if (fr == VT_LOCAL) {
274− oad(0x85 + r * 8, fc); /* mov r,xxx(%ebp) */
275− } else if (v->r & VT_LVAL) {
276− g(fr + r * 8); /* mov r, (fr) */
261+ if (fr == VT_CONST ||
262+ fr == VT_LOCAL ||
263+ (v->r & VT_LVAL)) {
264+ gen_modrm(r, v->r, fc);
277265 } else if (fr != r) {
278266 o(0xc0 + fr + r * 8); /* mov r, fr */
279267 }
@@ -298,7 +286,7 @@ void gfunc_param(GFuncContext *c) · 18 unmodified lines
298286 /* allocate the necessary size on stack */
299287 oad(0xec81, size); /* sub $xxx, %esp */
300288 /* generate structure store */
301− r = get_reg(REG_CLASS_INT);
289+ r = get_reg(RC_INT);
302290 o(0x89); /* mov %esp, r */
303291 o(0xe0 + r);
304292 vset(VT_INT, r, 0);
@@ -306,7 +294,7 @@ void gfunc_param(GFuncContext *c) · 1 unmodified line
306294 vstore();
307295 c->args_size += size;
308296 } else if (is_float(vtop->t)) {
309− gv(); /* only one float register */
297+ gv(RC_FLOAT); /* only one float register */
310298 if ((vtop->t & VT_BTYPE) == VT_FLOAT)
311299 size = 4;
312300 else if ((vtop->t & VT_BTYPE) == VT_DOUBLE)
@@ -324,7 +312,7 @@ void gfunc_param(GFuncContext *c) · 11 unmodified lines
324312 } else {
325313 /* simple type (currently always same size) */
326314 /* XXX: implicit cast ? */
327− r = gv();
315+ r = gv(RC_INT);
328316 o(0x50 + r); /* push r */
329317 c->args_size += 4;
330318 }
@@ -347,7 +335,7 @@ void gfunc_call(GFuncContext *c) · 16 unmodified lines
347335 }
348336 } else {
349337 /* otherwise, indirect call */
350− r = gv();
338+ r = gv(RC_INT);
351339 o(0xff); /* call *r */
352340 o(0xd0 + r);
353341 }
@@ -383,17 +371,22 @@ int gtst(int inv, int t) · 29 unmodified lines
383371 t = gjmp(t);
384372 gsym(vtop->c.i);
385373 }
386− } else if ((vtop->r & (VT_VALMASK | VT_LVAL)) == VT_CONST) {
387− /* constant jmp optimization */
388− if ((vtop->c.i != 0) != inv)
389− t = gjmp(t);
390374 } else {
391− /* XXX: floats */
392− v = gv();
393− o(0x85);
394− o(0xc0 + v * 9);
395− g(0x0f);
396− t = psym(0x85 ^ inv, t);
375+ if (is_float(vtop->t)) {
376+ vpushi(0);
377+ gen_op(TOK_NE);
378+ }
379+ if ((vtop->r & (VT_VALMASK | VT_LVAL | VT_FORWARD)) == VT_CONST) {
380+ /* constant jmp optimization */
381+ if ((vtop->c.i != 0) != inv)
382+ t = gjmp(t);
383+ } else {
384+ v = gv(RC_INT);
385+ o(0x85);
386+ o(0xc0 + v * 9);
387+ g(0x0f);
388+ t = psym(0x85 ^ inv, t);
389+ }
397390 }
398391 vtop--;
399392 return t;
@@ -405,9 +398,9 @@ void gen_opi(int op) · 5 unmodified lines
405398 int t, r, fr;
406399
407400 vswap();
408− r = gv();
401+ r = gv(RC_INT);
409402 vswap();
410− fr = gv();
403+ fr = gv(RC_INT);
411404 vtop--;
412405
413406 if (op == '+') {
@@ -460,9 +453,9 @@ void gen_opi(int op) · 46 unmodified lines
460453 oad(0xbd, t);
461454 }
462455 if (op == '%' | op == TOK_UMOD)
463− r = 2;
456+ r = REG_EDX;
464457 else
465− r = 0;
458+ r = REG_EAX;
466459 vtop->r = r;
467460 } else {
468461 vtop--;
@@ -477,22 +470,22 @@ void gen_opi(int op) · 8 unmodified lines
477470 /* NOTE: currently floats can only be lvalues */
478471 void gen_opf(int op)
479472 {
480− int a, ft, fc, swapped, r;
473+ int a, ft, fc, swapped;
481474
482475 /* convert constants to memory references */
483476 if ((vtop[-1].r & (VT_CONST | VT_LVAL)) == VT_CONST) {
484477 vswap();
485− gv();
478+ gv(RC_FLOAT);
486479 vswap();
487480 }
488481 if ((vtop[0].r & (VT_CONST | VT_LVAL)) == VT_CONST)
489− gv();
482+ gv(RC_FLOAT);
490483
491484 /* must put at least one value in the floating point register */
492485 if ((vtop[-1].r & VT_LVAL) &&
493486 (vtop[0].r & VT_LVAL)) {
494487 vswap();
495− gv();
488+ gv(RC_FLOAT);
496489 vswap();
497490 }
498491 if (op >= TOK_EQ && op <= TOK_GT) {
@@ -520,13 +513,18 @@ void gen_opf(int op) · 21 unmodified lines
520513 vtop->r = VT_CMP;
521514 vtop->c.i = op;
522515 } else {
516+ swapped = 0;
523517 /* swap the stack if needed so that t1 is the register and t2 is
524518 the memory reference */
525− swapped = 0;
526519 if (vtop[-1].r & VT_LVAL) {
527520 vswap();
528521 swapped = 1;
529522 }
523+ /* no memory reference possible for long double operations */
524+ if ((vtop->t & VT_BTYPE) == VT_LDOUBLE) {
525+ load(REG_ST0, vtop);
526+ swapped = !swapped;
527+ }
530528
531529 switch(op) {
532530 default:
@@ -534,34 +532,30 @@ void gen_opf(int op) · 1 unmodified line
534532 a = 0;
535533 break;
536534 case '-':
537− a = 0x20;
535+ a = 4;
538536 if (swapped)
539− a += 8;
537+ a++;
540538 break;
541539 case '*':
542− a = 0x08;
540+ a = 1;
543541 break;
544542 case '/':
545− a = 0x30;
543+ a = 6;
546544 if (swapped)
547− a += 8;
545+ a++;
548546 break;
549547 }
550548 ft = vtop->t;
551549 fc = vtop->c.ul;
552− if ((ft & VT_BTYPE) == VT_DOUBLE)
553− o(0xdc);
554− else
555− o(0xd8);
556−
557− r = vtop->r & VT_VALMASK;
558− if (r == VT_CONST) {
559− o(0x05 + a);
560− gen_addr32(vtop->r, fc);
561− } else if (r == VT_LOCAL) {
562− oad(0x85 + a, fc);
550+ if ((ft & VT_BTYPE) == VT_LDOUBLE) {
551+ o(0xde); /* fxxxp %st, %st(1) */
552+ o(0xc1 + (a << 3));
563553 } else {
564− g(0x00 + a + r);
554+ if ((ft & VT_BTYPE) == VT_DOUBLE)
555+ o(0xdc);
556+ else
557+ o(0xd8);
558+ gen_modrm(a, vtop->r, fc);
565559 }
566560 vtop--;
567561 }
@@ -570,7 +564,7 @@ void gen_opf(int op) · 2 unmodified lines
570564 /* convert integers to fp 't' type */
571565 void gen_cvt_itof(int t)
572566 {
573− gv();
567+ gv(RC_INT);
574568 if ((vtop->t & (VT_BTYPE | VT_UNSIGNED)) == (VT_INT | VT_UNSIGNED)) {
575569 /* unsigned int to float/double/long double */
576570 o(0x6a); /* push $0 */
@@ -599,7 +593,7 @@ void gen_cvt_ftoi(int t) · 22 unmodified lines
599593 {
600594 int r, size;
601595
602− gv();
596+ gv(RC_FLOAT);
603597 if (t == VT_INT | VT_UNSIGNED &&
604598 t == VT_LLONG | VT_UNSIGNED &&
605599 t == VT_LLONG)
@@ -607,7 +601,7 @@ void gen_cvt_ftoi(int t) · 1 unmodified line
607601 else
608602 size = 4;
609603
610− r = get_reg(REG_CLASS_INT);
604+ r = get_reg(RC_INT);
611605 oad(0x2dd9, (int)&__tcc_int_fpu_control); /* ldcw xxx */
612606 oad(0xec81, size); /* sub $xxx, %esp */
613607 if (size == 4)
@@ -626,7 +620,7 @@ void gen_cvt_ftoi(int t) · 12 unmodified lines
626620 void gen_cvt_ftof(int t)
627621 {
628622 /* all we have to do on i386 is to put the float in a register */
629− gv();
623+ gv(RC_FLOAT);
630624 }
631625
632626 /* pop stack value */
tcc.c+80−33
@@ -340,7 +340,7 @@ void gexpr(void); · 339 unmodified lines
340340 void decl(int l);
341341 void decl_initializer(int t, int r, int c, int first, int size_only);
342342 int decl_initializer_alloc(int t, int sec, int has_init);
343−int gv(void);
343+int gv(int rc);
344344 void move_reg(int r, int s);
345345 void save_reg(int r);
346346 void vpop(void);
@@ -360,7 +360,9 @@ int pointed_size(int t); · 13 unmodified lines
360360 int parse_btype(int *type_ptr);
361361 int type_decl(int *v, int t, int td);
362362 void error(const char *fmt, ...);
363+void vpushi(int v);
363364 void vset(int t, int r, int v);
365+void greloc(Sym *s, int addr, int type);
364366
365367 /* true if float/double/long double type */
366368 static inline int is_float(int t)
@@ -419,6 +421,36 @@ void *dlsym(void *handle, char *symbol) · 52 unmodified lines
419421
420422 #endif
421423
424+/* add a new relocation entry to symbol 's' */
425+void greloc(Sym *s, int addr, int type)
426+{
427+ Reloc *p;
428+ p = malloc(sizeof(Reloc));
429+ if (!p)
430+ error("memory full");
431+ p->type = type;
432+ p->addr = addr;
433+ p->next = (Reloc *)s->c;
434+ s->c = (int)p;
435+}
436+
437+/* patch each relocation entry with value 'val' */
438+void greloc_patch(Sym *s, int val)
439+{
440+ Reloc *p, *p1;
441+
442+ p = (Reloc *)s->c;
443+ while (p != NULL) {
444+ p1 = p->next;
445+ greloc_patch1(p, val);
446+ free(p);
447+ p = p1;
448+ }
449+ s->c = val;
450+ s->r &= ~VT_FORWARD;
451+}
452+
453+
422454 static inline int isid(int c)
423455 {
424456 return (c >= 'a' && c <= 'z') ||
@@ -1884,7 +1916,7 @@ void vsetc(int t, int r, CValue *vc) · 1459 unmodified lines
18841916 /* cannot let cpu flags if other instruction are generated */
18851917 /* XXX: VT_JMP test too ? */
18861918 if ((vtop->r & VT_VALMASK) == VT_CMP)
1887− gv();
1919+ gv(RC_INT);
18881920 vtop++;
18891921 vtop->t = t;
18901922 vtop->r = r;
@@ -2028,12 +2060,12 @@ void move_reg(int r, int s) · 137 unmodified lines
20282060 }
20292061 }
20302062
2031−/* convert a (vtop->t, vtop->c) in register. lvalues are converted as
2032− values. Cannot be used if cannot be converted to register value
2033− (such as structures). */
2034−int gv(void)
2063+/* store vtop a register belonging to class 'rc'. lvalues are
2064+ converted as values. Cannot be used if cannot be converted to
2065+ register value (such as structures). */
2066+int gv(int rc)
20352067 {
2036− int r, bit_pos, bit_size, rc, size, align, i;
2068+ int r, bit_pos, bit_size, size, align, i;
20372069
20382070 /* NOTE: get_reg can modify vstack[] */
20392071 if (vtop->t & VT_BITFIELD) {
@@ -2047,7 +2079,7 @@ int gv(void) · 7 unmodified lines
20472079 vpushi(32 - bit_size);
20482080 /* NOTE: transformed to SHR if unsigned */
20492081 gen_op(TOK_SAR);
2050− r = gv();
2082+ r = gv(rc);
20512083 } else {
20522084 if (is_float(vtop->t) &&
20532085 (vtop->r & (VT_VALMASK | VT_LVAL)) == VT_CONST) {
@@ -2064,14 +2096,16 @@ int gv(void) · 10 unmodified lines
20642096 glo += size << 2;
20652097 }
20662098 r = vtop->r & VT_VALMASK;
2067− if (r >= VT_CONST || (vtop->r & VT_LVAL)) {
2068− if (is_float(vtop->t))
2069− rc = REG_CLASS_FLOAT;
2070− else
2071− rc = REG_CLASS_INT;
2099+ /* need to reload if:
2100+ - constant
2101+ - lvalue (need to dereference pointer)
2102+ - already a register, but not in the right class */
2103+ if (r >= VT_CONST ||
2104+ (vtop->r & VT_LVAL) ||
2105+ !(reg_classes[r] & rc)) {
20722106 r = get_reg(rc);
2107+ load(r, vtop);
20732108 }
2074− load(r, vtop);
20752109 vtop->r = r;
20762110 }
20772111 return r;
@@ -2620,7 +2654,7 @@ void gen_assign_cast(int dt) · 542 unmodified lines
26202654 /* store vtop in lvalue pushed on stack */
26212655 void vstore(void)
26222656 {
2623− int ft, r, t, size, align, bit_size, bit_pos;
2657+ int ft, r, t, size, align, bit_size, bit_pos, rc;
26242658 GFuncContext gf;
26252659
26262660 ft = vtop[-1].t;
@@ -2675,11 +2709,14 @@ void vstore(void) · 48 unmodified lines
26752709 /* store result */
26762710 vstore();
26772711 } else {
2678− r = gv(); /* generate value */
2712+ rc = RC_INT;
2713+ if (is_float(ft))
2714+ rc = RC_FLOAT;
2715+ r = gv(rc); /* generate value (XXX: move that to store code) */
26792716 /* if lvalue was saved on stack, must read it */
26802717 if ((vtop[-1].r & VT_VALMASK) == VT_LLOCAL) {
26812718 SValue sv;
2682− t = get_reg(REG_CLASS_INT);
2719+ t = get_reg(RC_INT);
26832720 sv.t = VT_INT;
26842721 sv.r = VT_LOCAL | VT_LVAL;
26852722 sv.c.ul = vtop[-1].c.ul;
@@ -2696,19 +2733,24 @@ void vstore(void) · 10 unmodified lines
26962733 /* post defines POST/PRE add. c is the token ++ or -- */
26972734 void inc(int post, int c)
26982735 {
2699− int r, r1;
2736+ int r, r1, rc, t;
27002737 SValue sv;
27012738
27022739 test_lvalue();
27032740 if (post)
27042741 vdup(); /* room for returned value */
27052742 vdup(); /* save lvalue */
2706− r = gv();
27072743 if (post) {
27082744 /* duplicate value */
2709− /* XXX: handle floats */
2710− r1 = get_reg(REG_CLASS_INT);
2745+ rc = RC_INT;
27112746 sv.t = VT_INT;
2747+ t = vtop->t & VT_TYPE;
2748+ if (is_float(t)) {
2749+ rc = RC_FLOAT;
2750+ sv.t = t;
2751+ }
2752+ r = gv(rc);
2753+ r1 = get_reg(rc);
27122754 sv.r = r;
27132755 sv.c.ul = 0;
27142756 load(r1, &sv); /* move r to r1 */
@@ -3137,10 +3179,10 @@ Sym *external_sym(int v, int u, int r) · 422 unmodified lines
31373179
31383180 void indir(void)
31393181 {
3140− if (vtop->r & VT_LVAL)
3141− gv();
31423182 if ((vtop->t & VT_BTYPE) != VT_PTR)
31433183 expect("pointer");
3184+ if (vtop->r & VT_LVAL)
3185+ gv(RC_INT);
31443186 vtop->t = pointed_type(vtop->t);
31453187 if (!(vtop->t & VT_ARRAY)) /* an array is never an lvalue */
31463188 vtop->r |= VT_LVAL;
@@ -3442,7 +3484,11 @@ void unary(void) · 295 unmodified lines
34423484 gfunc_param(&gf);
34433485 } else {
34443486 ret.t = s->t;
3445− ret.r = FUNC_RET_REG; /* return in register */
3487+ /* return in register */
3488+ if (is_float(ret.t))
3489+ ret.r = REG_FRET;
3490+ else
3491+ ret.r = REG_IRET;
34463492 ret.c.i = 0;
34473493 }
34483494 #ifndef INVERT_FUNC_PARAMS
@@ -3561,7 +3607,7 @@ void eor(void) · 112 unmodified lines
35613607 /* XXX: better constant handling */
35623608 void expr_eq(void)
35633609 {
3564− int t, u, c, r1, r2;
3610+ int t, u, c, r1, r2, rc;
35653611
35663612 if (const_wanted) {
35673613 sum(10);
@@ -3582,16 +3628,19 @@ void expr_eq(void) · 14 unmodified lines
35823628 if (tok == '?') {
35833629 next();
35843630 t = gtst(1, 0);
3585−
35863631 gexpr();
3587− r1 = gv();
3632+ /* XXX: float handling ? */
3633+ rc = RC_INT;
3634+ if (is_float(vtop->t))
3635+ rc = RC_FLOAT;
3636+ r1 = gv(rc);
35883637 vpop();
35893638 skip(':');
35903639 u = gjmp(0);
35913640
35923641 gsym(t);
35933642 expr_eq();
3594− r2 = gv();
3643+ r2 = gv(rc);
35953644 move_reg(r1, r2);
35963645 vtop->r = r1;
35973646 gsym(u);
@@ -3718,11 +3767,9 @@ void block(int *bsym, int *csym, int *case_sym, int *def_sym, int case_reg) · 120 unmodified lines
37183767 /* copy structure value to pointer */
37193768 vstore();
37203769 } else if (is_float(func_vt)) {
3721− /* move return value to float return register */
3722− move_reg(FUNC_RET_FREG, gv());
3770+ gv(RC_FRET);
37233771 } else {
3724− /* move return value to standard return register */
3725− move_reg(FUNC_RET_REG, gv());
3772+ gv(RC_IRET);
37263773 }
37273774 vpop();
37283775 }
@@ -3794,7 +3841,7 @@ void block(int *bsym, int *csym, int *case_sym, int *def_sym, int case_reg) · 65 unmodified lines
37943841 next();
37953842 skip('(');
37963843 gexpr();
3797− case_reg = gv();
3844+ case_reg = gv(RC_INT);
37983845 vpop();
37993846 skip(')');
38003847 a = 0;

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