DIRECTORY BreakWorldArchitecture, SPARCArchitecture, TargetArchitecture, SPARCBreakWorldUtilities; SPARCBreakWorldUtilitiesImpl: CEDAR PROGRAM IMPORTS BreakWorldArchitecture, SPARCArchitecture, TargetArchitecture EXPORTS SPARCBreakWorldUtilities ~ { SPARCInstructionFromBreakWorldAddress: PUBLIC PROCEDURE [ address: BreakWorldArchitecture.Address, displacement: TargetArchitecture.Displacement ¬ TargetArchitecture.nullDisplacement] RETURNS [SPARCArchitecture.SPARCInstruction] ~ { IF address.IsNullAddress[] THEN { ERROR BreakWorldArchitecture.Cant[ code: $NullAddress, message: "SPARCInstructionFromBreakWorldAddress[nullAddress]"]; }; { instruction: SPARCArchitecture.SPARCInstruction ~ SPARCArchitecture.SPARCInstructionFromTargetInstruction[ instruction: BreakWorldArchitecture.PeekInstruction[ pc: address, displacement: displacement]]; RETURN [instruction]; }; }; SPARCAddressFromBreakWorldAddress: PUBLIC PROCEDURE [ address: BreakWorldArchitecture.Address, displacement: TargetArchitecture.Displacement ¬ TargetArchitecture.nullDisplacement] RETURNS [SPARCArchitecture.SPARCAddress] ~ { IF address.IsNullAddress[] THEN { ERROR BreakWorldArchitecture.Cant[ code: $NullAddress, message: "SPARCInstructionFromBreakWorldAddress[nullAddress]"]; }; { targetAddress: TargetArchitecture.Address ~ TargetArchitecture.AddressFromDisplacement[ address: BreakWorldArchitecture.TargetAddressFromBreakWorldAddress[address: address], displacement: displacement]; sparcAddress: SPARCArchitecture.SPARCAddress ~ SPARCArchitecture.SPARCAddressFromTargetAddress[ address: targetAddress]; RETURN [sparcAddress]; }; }; }. ž SPARCBreakWorldUtilitiesImpl.mesa Copyright Σ 1990, 1991 by Xerox Corporation. All rights reserved. Peter B. Kessler, April 18, 1990 9:06:00 pm PDT ΚΊ•NewlineDelimiter –(cedarcode) style™codešœ!™!Kšœ Πerœ7™BKšœ/™/K™šΟk ˜ K˜K˜Kšœ˜Kšœ˜K˜——unitšΟnœžœž˜+Kšžœ>˜EKšžœ˜ Kšœ˜K˜šŸ%œžœž œ‚žœ)˜ιšžœžœ˜!šžœ˜"KšœS˜S—K˜—˜šœ2˜2˜8šœ4˜4Kšœ*˜*———K˜Kšžœ˜K˜—Kšœ˜K˜—šŸ!œžœž œ‚žœ%˜αšžœžœ˜!šžœ˜"KšœS˜S—K˜—šœ˜šœW˜WKšœV˜VKšœ˜—šœ/˜/šœ0˜0Kšœ˜——K˜Kšžœ˜K˜—Kšœ˜K˜—K˜K˜—K˜—…—X°