On 12 May 2014 13:51, Joern Rennecke <joern.renne...@embecosm.com> wrote:
> On 12 May 2014 13:16, Christian Bruel <christian.br...@st.com> wrote:
>
>> Just for my curiosity, which other targets have multi-way toggling
>> support ?
>
> The epiphany has, sort of: you read a control register, AND and/or OR
> some mask(s) to the value,
> and write it back.
> If we knew the previous mode, we might elide and AND or an OR.
>
> I think this is actually quite a common issue.

P.S.: In some cases, multiple modes input could still be handled if we
knew that certain other modes
don't appear in the input, so a more powerful interface than providing
the previous mode - if known,
is to provide a set of potential predecessor modes.
The case where we don't know anything then obviously is represented as
the full base set.
In the mode switching infrastructure, you can just calculate the union
of the incoming (potential) mode(s) from each incoming edge.

Reply via email to