|
Message
From: =?unknown-8bit?Q?Gy=F6rgy?= 'nog' Jeney<nog@s...>
Date: Thu Jun 30 11:20:12 CEST 2005
Subject: [openrisc] [or1ksim #107] Remove useless calls to m{f,t}spr
> * Gy?rgy 'nog' Jeney (nog@s...) wrote: > > Hi, > > > > There has been a nice amount of traffic on openrisc in the last days, may aswell > > add my own :) > > > > ChangeLog: > > * Remove m{f,t}spr calls where we can access the spr directly. > > i would think that it is better (for readability) to have > m{f,t}spr_internal function, that is an inline of what you suggest. it's > just as fast and you still keep the m{f,t}spr abstraction...
mfspr_internal(spr) cpu_state.sprs[spr]
What's the difference for readability? The one has round brackets, the other square ones and they're even the same length. What abstraction are you thinking of? The whole idea is that there should not be any abstraction. As soon as we have abstraction, doing stuff like mtspr_internal(SPR_NPC, ) is expected to do the right thing (alter the course of execution), which is impossible to do without conditions, in which case we're no better of than what's there currently.
nog.
|
 |