DIRECTORY SPARCArchitecture, SPARCManger; CirioBreakpoint: CEDAR DEFINITIONS ~ { registerSaveArea: NAT ~ 64 * BYTES[SPARCArchitecture.SPARCContents]; PatchStruct: TYPE ~ MACHINE DEPENDENT RECORD [ closureCaller: ClosureCaller, manger: SPARCManger.Manger ]; ClosureCaller: TYPE ~ MACHINE DEPENDENT RECORD [ save: SPARCArchitecture.SPARCInstruction, callSaveRegs: SPARCArchitecture.SPARCInstruction, argSaveAreaOnce: SPARCArchitecture.SPARCInstruction, retAddrHi: SPARCArchitecture.SPARCInstruction, retAddrLo: SPARCArchitecture.SPARCInstruction, argHiClientData: SPARCArchitecture.SPARCInstruction, callClientProc: SPARCArchitecture.SPARCInstruction, argLoClientData: SPARCArchitecture.SPARCInstruction, callRestoreRegs: SPARCArchitecture.SPARCInstruction, argSaveAreaAgain: SPARCArchitecture.SPARCInstruction, restore: SPARCArchitecture.SPARCInstruction ]; }. H CirioBreakpoint.mesa Copyright Ó 1989, 1990 by Xerox Corporation. All rights reserved. Peter B. Kessler, March 29, 1990 10:31 am PST Patches can't be monitored, since the processor executes out of them. My accesses of the patches and the pc's executing in them are races. That isn't a problem because the pc's never get to the patches until I'm done setting them up (fortunately), and I don't clear the patch. Clearing a breakpoint is just putting the instruction back, since you can't tell when the pc (or several of them) are done with the patch (that's is a garbage collection problem). This closureCaller is for Cirio: it includes pushing an extra register window to avoid some register saving and to allocate space for saving the rest of the registers, and putting the ``return address'' of the patch in %i7, so Cirio can figure out where the breakpoint is. save %sp, -(spOffset+stackAllocationForCallee+registerSaveArea), %sp -- allocate a register window and a register save area. call _save_regs add %sp, spOffset+stackAllocationForCallee, %o0 -- save_regs(@registerSaveArea). sethi %hi(return_address), %i7 or %i7, %lo(return_address), %i7 -- set up ``return address''. sethi %hi(clientData), %o0 call clientProc or %lo(clientData), %o0 -- clientProc(clientData). call _restore_regs add %sp, spOffset + stackAllocationForCallee, %o0 -- restore_regs(@registerSaveArea). restore %sp, +(spOffset+stackAllocationForCallee+registerSaveArea), %sp -- deallocate the register window and register save area. Constants. 64 words for saving the registers (except %o0 and %o7, which we don't care about here). Types. Patches are self-describing, in that they include the address of the replaced instruction (in the header) and the replaced instruction (relocated into the patch). in the delay slot. in the delay slot. in the delay slot. �Ê••NewlineDelimiter ™codešœ™Kšœ Ïrœ7™BJ™-J™šÏk ˜ J˜J˜ —J˜—unitšÐlnœžœž œ˜&K™K™ËK™™‘–PclearTabStops 0.75 in flushLeft tabStop 2.0 in flushLeft tabStop 0 bp restIndentšÐboÏo@™DJ–PclearTabStops 0.75 in flushLeft tabStop 2.0 in flushLeft tabStop 0 bp restIndentš¡Ðco7™9—J• CharProps8PostfixXeroxCharCodesPostfixXeroxCharCodes–PclearTabStops 0.75 in flushLeft tabStop 2.0 in flushLeft tabStop 0 bp restIndentš ¡ ™–PclearTabStops 0.75 in flushLeft tabStop 2.0 in flushLeft tabStop 0 bp restIndentš ¡,™/J– PostfixXeroxCharCodes–PclearTabStops 0.75 in flushLeft tabStop 2.0 in flushLeft tabStop 0 bp restIndentš¡¢ ™"—J–PclearTabStops 0.75 in flushLeft tabStop 2.0 in flushLeft tabStop 0 bp restIndentš ¡™–PclearTabStops 0.75 in flushLeft tabStop 2.0 in flushLeft tabStop 0 bp restIndentš ¡™!J–PclearTabStops 0.75 in flushLeft tabStop 2.0 in flushLeft tabStop 0 bp restIndentš¡¢™—J–PclearTabStops 0.75 in flushLeft tabStop 2.0 in flushLeft tabStop 0 bp restIndentš ¡Ðoz ¡™J–PclearTabStops 0.75 in flushLeft tabStop 2.0 in flushLeft tabStop 0 bp restIndentš ¡£ ™–PclearTabStops 0.75 in flushLeft tabStop 2.0 in flushLeft tabStop 0 bp restIndentš ¡£ ¡™J–PclearTabStops 0.75 in flushLeft tabStop 2.0 in flushLeft tabStop 0 bp restIndentš¡¢™—J–8PostfixXeroxCharCodesPostfixXeroxCharCodes–PclearTabStops 0.75 in flushLeft tabStop 2.0 in flushLeft tabStop 0 bp restIndentš ¡™–PclearTabStops 0.75 in flushLeft tabStop 2.0 in flushLeft tabStop 0 bp restIndentš ¡.™1J– PostfixXeroxCharCodes–PclearTabStops 0.75 in flushLeft tabStop 2.0 in flushLeft tabStop 0 bp restIndentš¡¢#™%—–PclearTabStops 0.75 in flushLeft tabStop 2.0 in flushLeft tabStop 0 bp restIndentš ¡@™GJ–PclearTabStops 0.75 in flushLeft tabStop 2.0 in flushLeft tabStop 0 bp restIndentš¡¢9™;—J–PclearTabStops 0.75 in flushLeft tabStop 2.0 in flushLeft tabStop 0 bp restIndent™—head™ šœžœžœ"˜DKšÏcW™W——™K™¢š œ žœžœž œžœ˜.K˜K˜ K˜K˜š œžœžœž œžœ˜0Kšœ*˜*Kšœ1˜1šœ4˜4K™—Kšœ/˜/Kšœ/˜/Kšœ4˜4Kšœ3˜3šœ4˜4K™—Kšœ4˜4šœ5˜5K™—Kšœ,˜,K˜K˜———L˜——…—jG