-------------------------------------------------------------------------------
*  RELEASE 3.00 BUGLIST                                                       *
*  Update - 12/03/90                                                          *
*  This file contains a list of bugs in the release 3.00 of the 320C30 code   *
*  generation tools.                                                          *
*  All bugs will be fixed in the next production release unless otherwise     *
*  indicated.  There will sometimes be references to internal versions in     *
*  this list.  For that reason you must always refer to the release status    *
*  information (published every two weeks) to verify the availability of a    *
*  specific revision.                                                         *
-------------------------------------------------------------------------------
HLL
-------------------------------------------------------------------------------
3016   V2.00   Fixed V2.10
Displayed data for structure variables is sometimes not updated correctly.

3021   V2.00   Fixed V2.10
Floating point multiply returns infinity if any operand has negative exponent
                  For example:   220 * 0.2

WORKAROUND: Instead of 0.2, use  2.0 and divide by 10
                  For example:   (220 * 2.0) / 10
            This would still not work:     220 * (2.0 / 10.0)

3033   V2.00   Fixed V2.10
Changes do not show when preripherial registers are written to by commands
from the command window or during program execution.  (INIT.CMD file has
incorrect mapping of the peripheral registers. Each register needs to have
its own memory definition.)

3037   V2.00   will fix
                    ------[ Please Note ]--------
The HLL source code debugger verifies that all programs fit into available
memory and will not accept programs with memory map errors.  The EMU30
emulator, however, does not make this verification before loading programs.
When the HLL debugger flags 'Invalid load file' and 'Memory out of range'
errors this means it has detected load file problems which may not have been
detected by emu30.

3083   V2.00   Fixed V2.10
Sequential access to multiply mapped memory leads to scrambled display when
reading into a memory window (e.g. FRAM or FIFO mapped on entire IOBUS)

3130   V2.00   Fixed V2.10
The sample program distributed with DB30 will not load if using the RAM (-cr)
model.  "Memory Address Out of Range" error is generated.

3264   V2.00   Fixed V2.10
When .global symbols are given value XYZ with a .SET directive, the symbol
is displayed at address XYZ in the reverse assembly window.
               ------[ note ]-----
There are instances where this is the correct behavior, but symbols declared
with .global statements have been deleted from the reverse assembly window
to avoid confusion.

3335   V2.14   Fixed V4.00
Scrolling disassembly window sometimes hangs ups.   Bug is intermittent.

3462   V2.00   Fixed V2.10
Test case where db30 strips first character off labels.

3536   V4.01   will fix
When the CALLS window has been closed and the SSAVE command is used to save
the window configuration the configuration does not work properly.  The CALLS
window is not restored correctly.

3553   V4.00   will fix
V4.00 HLL will not display enumerated types or structures of arrays. Where
the array of structures are accessed by a structure pointer. (i.e. a pointer
to an array of structures)

ASSEMBLER
-------------------------------------------------------------------------------
3149   V3.00   will fix V4.10
VMS ONLY:  asm30 will not accept macros of this form ...
m_name      $MACRO   type
            addf     *+ar6(7),r0
            $IF      type.v = 0
            $ELSE
            $ENDIF
            $ENDM
                     ---------[ work around ]----------
the macro will work with the addition of a comment:
m_name      $MACRO   type
            addf     *+ar6(7),r0
*           >>>>>>>>>>   add a comment line here <<<<<<<<<<<<<<   *
            $IF      type.v = 0
            $ELSE
            $ENDIF
            $ENDM
                    --------[ note ]--------
  This problem is expected to be remedied when new macro cabailities (now
in development) are incorporated into the TMS320C30 assembler (V4.10).

3339   V3.00   Fixed V4.00
MAC/MPW ONLY: Assembler does not evaluate comparision statements in .if cond-
tional assembly tests.  For Example:
         NEG      .set   0
         POS      .set   1
                  .if    POS = NEG
         BAD      .set   NO_GOOD     ;MAC assembler assembles this line
                  .else
         GOOD     .set   100h
                  .endif
---[ WORK AROUND ]---
Evaluate comparsion statements separately, using a temporary variable:
        TEMP      .set  (POS == NEG)
                  .if   TEMP        ;MAC assembler takes this correctly

3341   V3.00   will fix V4.00
PC relative labels are not relocated at link time.
For example:
        .global LABEL
LABEL   .word  $ + 4       ;data at location "LABEL" is not relocated.
                     ---[ Work Around ]-----
        .global LABEL
temp    .set   $ + 4
LABEL   .word  temp        ;data at location IS relocated.

3374   V3.00   will fix V4.00
Expressions containing external global reference in .SET directive crash
the assembler (Unix systems).   On PC host the .SET directive miscalculates
the expression.

3606   V4.00   will fix
The assembler will fail with a "Segmentation fault (core dumped)" message when
a variable defined using an improper .set directrive is referenced later in the

  Example:

        .ref    RAM_B0, RAM_B1

n       .set    08h
in      .set    RAM_B0
h       .set    RAM_B0+2        ;known to be incorrect
x       .set    RAM_B0+2+n      ;known to be incorrect

FIRx:   ldi     n,bk                    ;load block size, circular buffer
        ldi     h,ar0                   ;!! Error occurs here
        ldi     x,ar1                   ; at first reference to one of the
                                        ; objects declared with the incorrect
                                        ; .set directives.
        ....

        ...
        .end

3622   V3.00   will fix
A character string passed to a macro using .string directive will only accept
32 characters. One of the characters in the string cannot be a comma because
the comma is assumed to be a delimiter even though it is within the quotes
delimiting the character string.

COMPILER
-------------------------------------------------------------------------------
3085   V3.00   Fixed V4.00
If a pointer to a structure is de-referenced immediately before a condition
statement, and a different member of the same structure is the only reference
within that condition statement, the condition test may not be done properly.
For example:       x = ptr->a;
                   if ( ptr->b ) x++;       /*  x may not be incremented   */
WORK-AROUND:
use cl30 option -mx

3184   V3.00   Fixed V4.00
This C-expression  hangs up the code generator:
      b3184() {
         int a,b;
         b = -b * -a;
      }

3237   V3.00   Fixed V3.31
Compiler errs when register variables of mixed type are combined in the
following type of statement:
                register double  f_var;
                register char    *buf;
                         int     i_var;
                *buf++ = ( i_var = f_var *= 10 ) + '0';
-----[ WORK AROUND ]------
break statement up:
                f_var += 10;
                i_var  = f_var;
                *buf++ = i_var + '0';

3259   V3.00   will fix
VAX/ULTRIX only: Unsigned constants greater than 2^31 are improperly cast
to a float.
                --------[ Work Around ]----------
In place of the constant, create a variable and initialize it to the desired
value.

3276   V3.00   will fix
ASM() statements which are inserted within or at the end of the  declaration
block may not be placed in the order which is expected.  For example:
function() {
     int a;
     int b = 6;
     asm("    LDI 6,R0       ");
     asm("    LDI R0,*+FP    ");   /* b may be initialized after this */
     int c;
Start:   c = log(a);
}

3277   V3.00   Fixed V4.00
if ASM() statements are inserted within or at the end of a declaration list
containing initialization of statics, the asm() statements may be placed
in the .cinit section.

3305   V3.00   Fixed V4.00
Case where compiler generates parellel LDI's to same register:
                register char m,*n,*p;
                m = *n;
                while ( (m = *p++) >= 0 ) {
                *n = m;
                }
                    ---[ WORK AROUND ]-------
Compile with cl30 option -mx.

3368   V3.00   Fixed V4.00
Consecutive writes to same external address generates parallel STI's in
the wrong order.

3534   V3.95   will fix
 Casting a float as an int produces incorrect results. The float should be
 truncated but instead is "floor"ed.

          float x = -9.746;

          ....

          ..  (int) x     -> returns a value of -10, should be -9

3605   V4.00   will fix V4.01
Compiler fails to include asm"( .word 0c80ffffh)" directive on to assembler.
  e.g.
               BOOL OrderTraceType (void)
               {
                if (Order_Trace_Type == iCpuOrder)
                {
                  return TRUE;
                }
                else
                {
                  return FALSE:
                }
                asm ("    .word   0c80ffffh");  /* is not placed in assembly */
               }

3619   V4.00   will fix
Wrong code may be generated for binary expressions of the form

   ((cast) <e1>) op <e2>    OR   <e1> op ((cast) <e2>)

where <e1> and <e2> are arbitrary expressions, op is any binary operator,
(cast) is a float-to-int or int-to-float conversion, and the following
additional conditions are met:
   - BOTH <e1> and <e2> contain calls
   - the compiler evaluates the casted expression first (arbitrary)

Workaround: use an explicit assignment to a temp:
     temp = (cast) <e1>;
     temp op <e2>

3620   V4.00   will fix
The compiler may very rarely generate an illegal parallel MPYx || STx
instruction.  This occurs when a multiply operation in the source code
has all its operands in registers, and an immediately following assignment
stores a register using indirect addressing.

Workaround: Use the -mx switch on the CL30 command line.

SIMULATOR
-------------------------------------------------------------------------------
3169   V1.21   will fix
Simulator cannot execute: CMPI R4,*AR4 (R4 = *AR$ = 2h )
followed by:              BZ 154h

3215   V1.21   Fixed V1.22
With TRAP's the stack is incremented but no return address is pushed.

3235   V1.21   Fixed V1.22
Delayed branch instructions sometimes allows 4 instead of 3 instructions to
execute before branch and then branches 1 instruction beyond branch address.
The problem occurs when the memory from which the instructions are fetched
is defined with wait states.  (This may be the same bug as reported #3170).

3260   V1.21   will fix
'L .out' command crashes the simulator for .out files which load okay with
V1.00 of simulator.

3311   V1.21   Fixed V1.22
Serial Port timers are not implemented.

3312   V1.21   Fixed V1.22
Serial Port I/O operation does not take into consideration delays and time.

3313   V1.21   Fixed V1.22
Simultaneous interrupts are not served properly and in pipeline suppression
no interrupts are serviced.

3314   V1.21   Fixed V1.22
This instruction line is uninterruptable:
LABLE   BR      LABLE

3315   V1.21   Fixed V1.22
With CALL and BRANCH instructions, interrupts are acknowledged only after
the following instruction is executed.

3316   V1.21   Fixed V1.22
DMA interrupts are not serviced.

3317   V1.21   Fixed V1.22
Timer interrupts are not generated properly.

3319   V1.21   Fixed V1.22
The bus control registers and CPU idle state are not reset after simulator
reset.

3320   V1.21   Fixed V1.22
When the CPU is idle the DMA is also always made idle.

3321   V1.21   Fixed V1.22
Editing these CPU registers though the screen also allows reserved bit to
be changed:
        PC      ST      IF      IE      IOF

3322   V1.21   Fixed V1.22
Addition of expression break points allow invalid expresions to be
included in breakpoint.

3494   V1.20   will fix
When both .out and .cfm files are included on the command line (as shown
on page 2-8 in the User's Guide) the simulator attempts to load the coff
file before configuring the memory with the .cfm file.

3513   V1.22   will fix
Pipeline conflict causes simulator error inside memcopy() when cache is enabled
and bank size is set to 512.  (Error does not occur on 80286 hosts).
(Vevek response: no bug ... 11/05/90)

3519   V1.20   Fixed V1.21
Simulator does not push return address when executing conditional CALL.

3572   V1.30   will fix
Simulator (VAX/VMS) incorrectly processes RPTS instruction when an interrupt
occurs during execution of the instruction. The simulator does not handle
the interrupt which is correct because the instruction should complete before
the interrupt is handled.  But it also does not decrement the RC, repeat count
register once the interrupt happens.

                  RPTS 255            ; interrupt occurs at RC = 00f4h no
                  ldi *ar0++(1)       ; decrement takes place and instruction
          ||      sti r1,*ar1++(1)    ; executes forever.

3616   V1.30   will fix
A NOP with an ivalid opcode in the operand field, should generate a warning
message, since the result of the operation is undefined.

3625   V1.30   will fix
The simulator will not pop into the operating system, it keeps popping into
itself.

PARSER
-------------------------------------------------------------------------------
DOCUMENTATION
-------------------------------------------------------------------------------
3247   V3.00   will fix
F_LSYMS is shown as 0010h instead of 0008h as it should be.
(page A-4, Assembly Language Tools Users' Guide).

3325   V3.00   will fix
Page 2-20 of TMS320C30 C Compiler Reference Guide:  Table showing
"invocation command" for setting C_DIR is wrong for VMS.  Should
show:
        assign "[sys];[exec.files]" C_DIR

RTS
-------------------------------------------------------------------------------
3266   V3.00   Fixed V4.00
STDARG.H: _type is misspelled 'type' (without underscore) in last line of file.
      ----[ work around ]---
Edit file stdarg.h and correct spelling.

3478   V3.00   Fixed V4.00
qsort() function contains the following error:
    while (size--)
    {
        register int temp = *src;
        *src++            = *++dest;  /* this should be *src++=*dest; !! */
        *dest++           = temp;
    }
                    ---[ Work Around ]---
Use gspar to extract qsort.c :
             gspar -x rts.src qsort.c
Edit qsort.c and correct the error. Compile the corrected source:
             gspcl (desired options) qsort.c
Then use gspar to replace qsort.obj in the desired library:
             gspar -r rts.lib qsort.obj

ROM30
-------------------------------------------------------------------------------
3299   V3.00   will fix
ROM30 generates wrong addresses in .LO file (-w option) and .TAG file
(-t option).  Among other effects, this can lead to some addresses being
overwritten twice.

CODEGEN
-------------------------------------------------------------------------------
3323   V3.00   Fixed V3.95
Cl30 -mr option causes some files to crash the compiler.

UTILITIES
-------------------------------------------------------------------------------
3442   V3.00   will fix
The -ea option cannot be used with the -s option because if -ea is used to
change the extension of the assembler file, the interlister cannot find
it.

OPTIMIZER
-------------------------------------------------------------------------------
3479   V4.00   will fix
Sample code which generates "RPTB  Lxx" where Lxx is not a valid register
symbol.  Occurs with optimization level -o2 selected.

LINKER
-------------------------------------------------------------------------------
3574   V4.00   will fix V6.20
Linker ignores fill for hole when fill is specified using ABSOLUTE symbol.

    e.g.
               MEMORY {
                         PAGE 0: PROGRAM:    origin = 0000h, length = 10000H
                         PAGE 1: DATA:       origin = 0000h, length = 10000H
                       }

               SECTIONS
                       {
                          PAG0RAM     60H   : {}
                           D_PAGE     0    (DSECT) :
                           {
                                      .+=  DEMO_PGRSZ,
                                      DEMO.OBJ(DEMOPAGE)
                            }
                        }

         NOTE: This applies to ABSOLUTE symbols only. Expressions with
               relocatable symbols are always evaluated after all storage
               allocation (i.e. after SECTIONS directive is processed).
-------------------------------------------------------------------------------
