M Extension

Versions

2.0.0
State

ratified

Ratification date

2019-12

Synopsis

This chapter describes the standard integer multiplication and division instruction extension, which is named M and contains instructions that multiply or divide values held in two integer registers.

We separate integer multiply and divide out from the base to simplify low-end implementations, or for applications where integer multiply and divide operations are either infrequent or better handled in attached accelerators.

Instructions

The following instructions are defined by this extension:

div

Signed division

divu

Unsigned division

divuw

Unsigned 32-bit division

divw

Signed 32-bit division

mul

Signed multiply

mulh

Signed multiply high

mulhsu

Signed/unsigned multiply high

mulhu

Unsigned multiply high

mulw

Signed 32-bit multiply

rem

Signed remainder

remu

Unsigned remainder

remuw

Unsigned 32-bit remainder

remw

Signed 32-bit remainder

Parameters

This extension has the following implementation options:

MUTABLE_MISA_M

Type

boolean

Valid Values

boolean

Description

Indicates whether or not the M extension can be disabled with the misa.M bit.