home *** CD-ROM | disk | FTP | other *** search
- ::::::: bug fix #3 ::::::::::::
-
- The first bug is in 'hcc'. It involves passing arguments of type
- char or unsigned char. This may fail if the arg is an expression
- (and is inefficient for register variables).
-
- First, add the following line near the top of file 'g2.c':
-
- #define isdreg(np) ((np)->g_token == REGVAR && (np)->g_rno < AREG)
-
- Second, in the function 'onearg()' in g2.c, change the following case:
-
- case 1:
- addcode(np, (np->g_ty == ET_U) ?
- "\tclr.w\td0\n\tmove.b\tA,d0\n\tmove.w\td0,-(sp)\n" :
- "\tmove.b\tA,d0\n\text.w\td0\n\tmove.w\td0,-(sp)\n" );
- return 2;
-
- to this:
-
- case 1:
- if (isdreg(np))
- addcode(np, (np->g_ty == ET_U) ?
- "\tand.w\t#255,A\n\tmove.w\tA,-(sp)\n" :
- "\text.w\tA\n\tmove.w\tA,-(sp)\n" );
- else
- addcode(np, (np->g_ty == ET_U) ?
- "\tclr.w\td0\n\tmove.b\tA,d0\n\tmove.w\td0,-(sp)\n" :
- "\tmove.b\tA,d0\n\text.w\td0\n\tmove.w\td0,-(sp)\n" );
- return 2;
-
-
- There is a bug in all versions of 'hcc' that can occur when register
- variables are declared in nested blocks. Because of it, 'jas' cannot
- be re-compiled with the 1.2 release with the optimizer (-O) turned on.
-
- In the file "fun.c", in the function "block()", change these 2 lines:
-
- if (blktab->b_regs > maxregs)
- maxregs = blktab->b_regs;
-
- to this 1 line:
-
- maxregs |= blktab->b_regs;
-
-