|
From: Jeremy F. <je...@go...> - 2004-03-04 22:45:08
|
On Thu, 2004-03-04 at 01:59, Nicholas Nethercote wrote: > Our idea was to have a platform-independent language that skins in which > skins would write their instrumentation. It would presumably look a lot > like UCode. As for skin-specific UInstrs, we thought ditching them would > be ok; Memcheck is the only one that uses them, and they're not really > necessary -- even Tag_PCast40 is just a NEG, SBB, OR which is currently > expressible in UCode. Yes, but not portably. It relies on the x86 behaviour of NEG setting carry depending on whether its argument is zero or not. Unless we define the NEG UOp to contain this, it isn't very portable. Paul's implementation of Tag_PCast40 is very different, and uses the PPC's extensive set of bit-swizzling instructions. It seems to me that the PCast* operations can be composed out of various fairly generic pieces which we could make into UCode operations (things to expand any 0 bit to all zero bits, any 1 bit to all 1 bits, etc). > We could have a special instruction in this instrumentation language with > which a skin can create any (arch-specific) instruction it wants by just > specifying the naked bytes, so skins could generate any instruction if > they really wanted (ie. make the common case easy, and the uncommon case > possible). Well, since we're planning to have one anyway to carry the client's instructions through, it will just be a matter of inserting those. J |