Nios II Classic Processor Reference Guide

ID 683620
Date 10/28/2016
Public
Document Table of Contents

8.5.69. nextpc

Instruction get address of following instruction
Operation

rC ←  PC + 4

Assembler Syntax

nextpc rC

Example

nextpc r6

Description

Stores the address of the next instruction to register rC.

Usage

A relocatable code fragment can use nextpc to calculate the address of its data segment. nextpc is the only way to access the PC directly.

Exceptions

None

Instruction Type

R

Instruction Fields

C = Register index of operand rC

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