Nios II Classic Processor Reference Guide

ID 683620
Date 10/28/2016
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