English
Language : 

RH850F1L Datasheet, PDF (10/16 Pages) Renesas Technology Corp – Emulator
RH850/F1L Series E1/E20 Emulator Release Note(Restrictions when using CubeSuite+)
[Example 1-2]
In the example below, execution branches to the case statement (*2) from the position of (*1) when function
GetCount() is called for the first time.
Under some conditions, however, the PC (indicated by an arrow) appears to have moved to the position of
(*3) immediately before (*2).
enum Count { ZERO, ONE, TWO };
enum Count GetCount()
{
static enum Count value = ZERO;
switch (value) {
<-(*1)
case TWO:
value = ZERO;
break;
case ONE:
value = TWO; <-(*3)
break;
case ZERO:
default:
value = ONE; <-(*2)
break;
}
return value;
}
Conditions:
The instruction at the branch destination
(a) acquires the value of a constant, or
(b) determines the address of a variable.
[Resolution]:
None
R20UT2743EJ0200 Rev.2.00
Mar 20, 2014
Page 10 of 13