Nios® II Processor Reference Guide

ID 683836
Date 10/22/2020
Public
Document Table of Contents

8.5.65. muli

Instruction multiply immediate
Operation

rB ←  (rA x σ(IMM16)) 31..0

Assembler Syntax

muli rB, rA, IMM16

Example

muli r6, r7, -100

Description

Sign-extends the 16-bit immediate value IMM16 to 32 bits and multiplies it by the value of rA. Stores the 32 low-order bits of the product to rB. The result is independent of whether rA is treated as a signed or unsigned number.

Nios® II processors that do not implement the muli instruction cause an unimplemented instruction exception.

Carry Detection and Overflow Detection:

For a discussion of carry and overflow detection, refer to the mul instruction.

Exceptions

Unimplemented instruction

Instruction Type

I

Instruction Fields

A = Register index of operand rA

B = Register index of operand rB

IMM16 = 16-bit signed immediate value

Bit Fields
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
A B IMM16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
IMM16 0x24

Did you find the information on this page useful?

Characters remaining:

Feedback Message