## Compiler, Assembler and Library

- 4-1 Version of the Library (Recommended)
- 4-2 R4300 Multiplication Anomaly (Required)
- 4-3 Deleting Debug Information (Required)

### 4-1 Version of the Library (Recommended)

Caution
The most recent version of the N64 OS/Library should be used for each game program.

Discussion
The library may be revised to avoid a problem with Control Deck compatibility.

### 4-2 R4300 Multiplication Anomaly (Required)

Caution
Use the standard compiler and assembler with any and all necessary patches. If a different compiler or assembler is used, ensure that integer or floating point multiplication is not performed immediately following a floating point multiplication.

Discussion
The program may not work as expected if one of the operands of the first multiplication is not a number, zero, or infinity.

Example-1 Multiplication instructions are allocated continuously

      .
      .
    mul.d   fv0,ft0
    mult    a0,a1
      .
      .

Example-2 First multiplication instruction is in a delay slot of branch instruction and also the second multiplication instruction is on the destination of the branch

      .
      .
    bne     t1,t7,Label           ; branch instruction
    mul.s   fa0,fa1               ; delay slot
      .
      .
    Label:
    dmult   t1,t7
      .
      .

Note: If IRIX 5.3 is being used for the development system, patch1118 must be installed to ensure that back-to-back multiplies are not generated. This patch is distributed with the standard N64 development system. If using IRIX 6.2 with IDO 7.1, no patch needs to be installed. In both cases, use the "-Wab, -r4300_mul" compiler option in order to activate the multiply check.

### 4-3 Deleting Debug Information (Required)

Caution
When programs are compiled or assembled as a release version, debug information (-g option when using the standard compiler and debugger) must not be added. The debug library should not be used.

Discussion
When debug information is left in the program its execution speed is slow and program size is larger. If any operation related to the interface between the e-board and host is left in the program, it could create problems with the program.

Note: Delete "-g" option if standard compiler and assembler are used. Delete rmon related operation and interface to host such as osSyncPrintf(). If assert() is used, it must be removed from the ROM version by inserting #define NDEBUG.

© 1999 Nintendo of America Inc.
Release Date: March 1999