beautypg.com

6 usp: user stack pointer – FUJITSU MB91460 SERIES FR60 User Manual

Page 135

background image

119

Chapter 5 CPU Registers

2.Dedicated Registers

2.6 USP: User Stack Pointer

User Stack Pointer (USP) consists of 32 bits.

Figure 2-10 Bit Structure of User Stack Pointer (USP)

When S flag is “1”, this pointer works as R15.

You can explicitly specify USP.

You can not use it for RETI instruction.

This pointer saves and returns PC and PS values at the position where system stack pointer (SSP) indicates. After
interrupt, it stores PC in address where SSP indicates, and PS in (SSP+4) address.

Figure 2-11 Interrupt Stack

31

[Initial value]

USP

00000000

H

0

[Example]

[Before interrupt]

[After interrupt]

SSP

SSP

80000000

H

7FFFFFFC

H

7FFFFFF8

H

80000000

H

7FFFFFFC

H

7FFFFFF8

H

PS

PC

80000000

H

7FFFFFF8

H

Memory