[Vm-dev] VM Maker: VMMaker.oscog-eem.3108.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Nov 21 23:38:08 UTC 2021


Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.3108.mcz

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

Name: VMMaker.oscog-eem.3108
Author: eem
Time: 21 November 2021, 3:37:59.732972 pm
UUID: ee6b672e-6205-44d8-ac40-35fae3491f9e
Ancestors: VMMaker.oscog-eem.3107

Cog simulation:
Fix simulation of ioHighResClock in the memoryOffset regime.
Add missing initialCStackAddress methods.
Fix a slip in bitAndByteOffsetOfIsFullBlockBitInto:

=============== Diff against VMMaker.oscog-eem.3107 ===============

Item was added:
+ ----- Method: CoInterpreter>>initialCStackAddress (in category 'simulation only') -----
+ initialCStackAddress
+ 	<doNotGenerate>
+ 	^self rumpCStackAddress!

Item was added:
+ ----- Method: CoInterpreterMT>>initialCStackAddress (in category 'simulation only') -----
+ initialCStackAddress
+ 	<doNotGenerate>
+ 	^(self cStackRangeForThreadIndex: 1) last!

Item was changed:
  ----- Method: CogObjectRepresentationFor64BitSpur>>bitAndByteOffsetOfIsFullBlockBitInto: (in category 'in-line cacheing') -----
  bitAndByteOffsetOfIsFullBlockBitInto: aBlock
  	<inline: true>
  	"This supplies the bitmask for the isFullBlock bit, and the offset of the byte containing
  	 that bit in a CogMethod header to aBlock.  We don't have named variables holding this
  	 offset.  The following assert tests whether the values are correct by creating a surrogate
  	 on an empty ByteArray, setting the bit, and checking that the expected values are set
  	 in the ByteArray."
  	self cCode: [] inSmalltalk:
  		[| pragma |
+ 		pragma := (CogMethodSurrogate >> #cpicHasMNUCaseOrCMIsFullBlock)
- 		pragma := (CogMethodSurrogate64 >> #cpicHasMNUCaseOrCMIsFullBlock)
  						pragmaAt: #bitPosition:width:.
  		self assert: pragma arguments = #(12 "4th bit of 2nd byte after objectHeader" 1)].
  	aBlock value: 16 value: objectMemory baseHeaderSize + 1 "zero-relative"!

Item was added:
+ ----- Method: CogVMSimulator>>initialCStackAddress (in category 'multi-threading simulation switch') -----
+ initialCStackAddress
+ 	"This method includes or excludes CoInterpreterMT methods as required.
+ 	 Auto-generated by CogVMSimulator>>ensureMultiThreadingOverridesAreUpToDate"
+ 
+ 	^self perform: #initialCStackAddress
+ 		withArguments: {}
+ 		inSuperclass: (cogThreadManager ifNil: [CoInterpreterPrimitives] ifNotNil: [CoInterpreterMT])!

Item was changed:
  ----- Method: CogVMSimulator>>printRumpCStackFrom:to:cfp:csp: (in category 'rump c stack') -----
  printRumpCStackFrom: start to: address cfp: cfp csp: csp
+ 	transcript ensureCr.
  	address
  		to: start
  		by: objectMemory wordSize negated
  		do: [:addr| | ptrName value |
  			self printHex: addr.
  			addr = cogit processor sp ifTrue: [ptrName := ' sp'].
  			addr = cogit processor fp ifTrue: [ptrName := (ptrName ifNil: [''] ifNotNil: [ptrName, ',']), 'fp'].
  			addr = csp ifTrue: [ptrName := (ptrName ifNil: [''] ifNotNil: [ptrName, ',']), 'CSP'].
  			addr = cfp ifTrue: [ptrName := (ptrName ifNil: [''] ifNotNil: [ptrName, ',']), 'CFP'].
  			ptrName ifNil: [self tab] ifNotNil: [self print: ' ', ptrName, '->'].
  			self tab; printHex: (value := objectMemory longAt: addr).
  			(cogit lookupAddress: value) ifNotNil:
  				[:label| self print: ' ', label].
  			self cr]!

Item was changed:
  ----- Method: Cogit>>ioHighResClock (in category 'simulation only') -----
  ioHighResClock
  	<doNotGenerate>
+ 	| end limit memory savedsp |
- 	| end memory savedsp |
  	end := self class guardPageSize.
+ 	limit := end + objectRepresentation wordSize.
  	memory := coInterpreter memory.
  	(coInterpreter isOnRumpCStack: (savedsp := processor sp)) ifFalse:
  		[processor sp: (coInterpreter heapBase bitAnd: (cStackAlignment - 1) bitInvert)].
  	processor simulateLeafCallOf: ioHighResClock nextpc: end memory: memory.
  	[processor pc ~= end] whileTrue:
  		[processor
  			singleStepIn: memory
  			minimumAddress: ioHighResClock
+ 			readOnlyBelow: limit].
- 			readOnlyBelow: end].
  	processor sp: savedsp.
+ 	objectRepresentation wordSize = 8 ifTrue:
- 	backEnd class wordSize = 8 ifTrue:
  		[^processor cResultRegister].
  	^(processor cResultRegisterHigh bitShift: 32) + processor cResultRegister
  
  	"self disassembleFrom: ioHighResClock to: self class guardPageSize"!



More information about the Vm-dev mailing list