Encoding:

POOL32A

000000

0

00000

rs

ac

MTHI

10000001

POOL32Axf

111100

6

5

5

2

8

6

SPECIAL

000000

rs

0

00000000

ac

0

00000

MTHI

010001

6

5

8

2

5

6

Format:

MTHI rs, ac

microMIPS32 pre-Release 6, microMIPSDSP

Move to HI register

Purpose:

Move to HI register

To copy a GPR to the special purpose HI part of the specified accumulator register.

Description:

HI[ac] = GPR[rs]

The source register rs is copied to the HI part of accumulator ac. The HI part of the accumulator is defined to be bits

64 to 127 of the DSP Module accumulator register.

The value of ac can range from 0 to 3. When ac=0, this refers to the original HI/LO register pair of the MIPS64 architecture.

In Release 6 of the MIPS Architecture, accumulators are eliminated from MIPS64.

Restrictions:

A computed result written to the HI/LO pair by DIV, DIVU, DDIV, DDIVU, DMULT, DMULTU, MULT, or MULTU must be read by MFHI or MFLO before a new result can be written into either HI or LO. Note that this restriction only applies to the original HI/LO accumulator pair, and does not apply to the new accumulators, ac1, ac2, and ac3.

If an MTHI instruction is executed following one of these arithmetic instructions, but before an MFLO or MFHI instruction, the contents of LO are UNPREDICTABLE. The following example shows this illegal situation:

MULT r2,r4 # start operation that will eventually write to HI,LO
...        # code not containing mfhi or mflo
MTHI r6
...        # code not containing mflo
MFLO r3    # this mflo would get an UNPREDICTABLE value

Operation:

HI[ac]63..0 = GPR[rs]63..0

Exceptions:

Reserved Instruction, DSP Disabled