VM Maker: Cog-eem.362.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

VM Maker: Cog-eem.362.mcz

commits-2
 
Eliot Miranda uploaded a new version of Cog to project VM Maker:
http://source.squeak.org/VMMaker/Cog-eem.362.mcz

==================== Summary ====================

Name: Cog-eem.362
Author: eem
Time: 19 November 2019, 10:40:17.891265 am
UUID: 56b23f69-de8f-4323-b39d-62264bcb85f0
Ancestors: Cog-eem.361

Fix a slip setting up prevInterruptCheckChain.

=============== Diff against Cog-eem.361 ===============

Item was changed:
  ----- Method: ProcessorSimulatorPlugin>>primitiveRunInMemory:minimumAddress:maximumAddress:readOnlyBelow: (in category 'primitives') -----
  "cpuAlien <BochsIA32|X86Alien>" primitiveRunInMemory: memory "<Bitmap|ByteArray|WordArray>" minimumAddress: minAddress "<Integer>" maximumAddress: maxAddress "<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 memorySize maybeErr |
  <var: #cpu type: #'void *'>
  cpuAlien := self primitive: #primitiveRunInMemoryMinAddressMaxAddressReadWrite
  parameters: #(WordsOrBytes Unsigned Unsigned Unsigned)
  receiver: #Oop.
  (cpu := self cCoerceSimple: (self startOfData: cpuAlien) to: #'void *') = 0 ifTrue:
  [^interpreterProxy primitiveFailFor: PrimErrBadReceiver].
+ "Add forceStopOnInterrupt to the interrupt check chain.  It is our responsibility to
+ chain calls, hence we remember any previous client in prevInterruptCheckChain."
  prevInterruptCheckChain := interpreterProxy setInterruptCheckChain: #forceStopOnInterrupt asSymbol.
  prevInterruptCheckChain = #forceStopOnInterrupt asSymbol ifTrue:
+ [prevInterruptCheckChain := 0].
- [prevInterruptCheckChain = 0].
  memorySize := interpreterProxy byteSizeOf: memory cPtrAsOop.
  maybeErr := self runCPU: cpu
  In: memory
  Size: (memorySize min: maxAddress)
  MinAddressRead: minAddress
  Write: minWriteMaxExecAddress.
  interpreterProxy setInterruptCheckChain: prevInterruptCheckChain.
  maybeErr ~= 0 ifTrue:
  [^interpreterProxy primitiveFailFor: PrimErrInappropriate].
  ^cpuAlien!

Item was changed:
  ----- Method: ProcessorSimulatorPlugin>>primitiveRunInMemory:minimumAddress:readOnlyBelow: (in category 'primitives') -----
  "cpuAlien <BochsIA32|X86Alien>" primitiveRunInMemory: memory "<Bitmap|ByteArray|WordArray>" 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: #primitiveRunInMemoryMinimumAddressReadWrite
  parameters: #(WordsOrBytes Unsigned Unsigned)
  receiver: #Oop.
  (cpu := self cCoerceSimple: (self startOfData: cpuAlien) to: #'void *') = 0 ifTrue:
  [^interpreterProxy primitiveFailFor: PrimErrBadReceiver].
  prevInterruptCheckChain := interpreterProxy setInterruptCheckChain: #forceStopOnInterrupt asSymbol.
  prevInterruptCheckChain = #forceStopOnInterrupt asSymbol ifTrue:
+ [prevInterruptCheckChain := 0].
- [prevInterruptCheckChain = 0].
  maybeErr := self runCPU: cpu
  In: memory
  Size: (interpreterProxy byteSizeOf: memory cPtrAsOop)
  MinAddressRead: minAddress
  Write: minWriteMaxExecAddress.
  interpreterProxy setInterruptCheckChain: prevInterruptCheckChain.
  maybeErr ~= 0 ifTrue:
  [^interpreterProxy primitiveFailFor: PrimErrInappropriate].
  ^cpuAlien!