Eliot Miranda uploaded a new version of Cog to project VM Maker: http://source.squeak.org/VMMaker/Cog-eem.417.mcz ==================== Summary ==================== Name: Cog-eem.417 Author: eem Time: 28 October 2020, 10:59:05.398054 am UUID: 34d31321-fc48-4fa5-a5f6-26d56a703a64 Ancestors: Cog-eem.416 And rename the opffsetBy: primitives suitably. =============== Diff against Cog-eem.416 =============== Item was changed: ----- Method: ProcessorSimulatorPlugin>>primitiveRunInMemory:offsetBy:minimumAddress:readOnlyBelow: (in category 'primitives') ----- "cpuAlien <ProcessorSimulatorAlien>" primitiveRunInMemory: memory "<BitsObject>" offsetBy: offset "<Integer>" minimumAddress: minAddress "<Integer>" readOnlyBelow: minWriteMaxExecAddress "<Integer>" "Run the cpu using the first argument as the memory and the following arguments defining valid addresses, running until it halts or hits an exception." | cpuAlien cpu maybeErr | <var: #cpu type: #'void *'> + cpuAlien := self primitive: #primitiveRunInMemoryOffsetMinimumAddressReadWrite - cpuAlien := self primitive: #primitiveRunInMemoryMinimumAddressReadWrite parameters: #(WordsOrBytes SmallInteger SmallInteger SmallInteger) receiver: #Oop. (cpu := self cCoerceSimple: (self startOfData: cpuAlien) to: #'void *') = 0 ifTrue: [^interpreterProxy primitiveFailFor: PrimErrBadReceiver]. (minAddress < 0 or: [minWriteMaxExecAddress < 0]) ifTrue: [^self primitiveFailFor: PrimErrBadArgument]. prevInterruptCheckChain := interpreterProxy setInterruptCheckChain: #forceStopOnInterrupt. prevInterruptCheckChain = #forceStopOnInterrupt ifTrue: [prevInterruptCheckChain := 0]. maybeErr := self runCPU: cpu In: (self cCoerceSimple: memory to: #'char *') + offset Size: (interpreterProxy byteSizeOf: memory cPtrAsOop) MinAddressRead: minAddress Write: minWriteMaxExecAddress. interpreterProxy setInterruptCheckChain: prevInterruptCheckChain. maybeErr ~= 0 ifTrue: [^interpreterProxy primitiveFailForOSError: maybeErr]. ^cpuAlien! Item was changed: ----- Method: ProcessorSimulatorPlugin>>primitiveSingleStepInMemory:offsetBy:minimumAddress:readOnlyBelow: (in category 'primitives') ----- "cpuAlien <BochsIA32|X86Alien>" primitiveSingleStepInMemory: memory "<Bitmap|ByteArray|WordArray>" offsetBy: offset "<Integer>" minimumAddress: minAddress "<Integer>" readOnlyBelow: minWriteMaxExecAddress "<Integer>" "Single-step the cpu using the first argument as the memory and the following arguments defining valid addresses." | cpuAlien cpu maybeErr | <var: #cpu type: #'void *'> + cpuAlien := self primitive: #primitiveSingleStepInMemoryOffsetMinimumAddressReadWrite - cpuAlien := self primitive: #primitiveSingleStepInMemoryMinimumAddressReadWrite parameters: #(WordsOrBytes SmallInteger SmallInteger SmallInteger) receiver: #Oop. (cpu := self cCoerceSimple: (self startOfData: cpuAlien) to: #'void *') = 0 ifTrue: [^interpreterProxy primitiveFailFor: PrimErrBadReceiver]. (minAddress < 0 or: [minWriteMaxExecAddress < 0]) ifTrue: [^self primitiveFailFor: PrimErrBadArgument]. maybeErr := self singleStepCPU: cpu In: (self cCoerceSimple: memory to: #'char *') + offset Size: (interpreterProxy byteSizeOf: memory cPtrAsOop) MinAddressRead: minAddress Write: minWriteMaxExecAddress. maybeErr ~= 0 ifTrue: [^interpreterProxy primitiveFailForOSError: maybeErr]. ^cpuAlien! |
Free forum by Nabble | Edit this page |