4. 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)

Description

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

Reason

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

Reference


Remarks



4-2 R4300 Multiplication Anomaly (Required)

Description

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.

Reason

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

Reference

 

Remarks

These routines are prohibited.

Example 1)
Multiplication instructions are allocated continuously

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

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

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

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)

Description

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.

Reason

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.

Reference


Remarks

Delete "-g" option if SGI 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.