Nios® II Processor Reference Guide

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

8.5.91. subi

Instruction subtract immediate
Operation

rB ←  rA – σ(IMMED)

Assembler Syntax

subi rB, rA, IMMED

Example

subi r8, r8, 4

Description

Sign-extends the immediate value IMMED to 32 bits, subtracts it from the value of rA and then stores the result in rB.

Usage

The maximum allowed value of IMMED is 32768. The minimum allowed value is

–32767.

Pseudo-instruction

subi is implemented as addi rB, rA, -IMMED

Did you find the information on this page useful?

Characters remaining:

Feedback Message