[Vm-dev] VM Maker: Cog-eem.392.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Jan 18 23:49:36 UTC 2020


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

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

Name: Cog-eem.392
Author: eem
Time: 18 January 2020, 3:49:34.90231 pm
UUID: fb9562b5-19d4-4eef-8c6a-5eddc9f205ef
Ancestors: Cog-eem.391

Doh!

=============== Diff against Cog-eem.391 ===============

Item was changed:
  ----- Method: ProcessorSimulatorPlugin>>primitiveIntegerRegisterState (in category 'primitives') -----
  primitiveIntegerRegisterState
  	"Answer an IntegerArray of the processor's integer register state, ending with, if these are not otherwise
  	 included in the register state, the pc and the flags (if the processor has flags).
  	 This primitive is unnecessary; it exists only to speed up single stepping."
  	| cpuAlien cpu registerStateVector |
  	<var: #cpu type: #'void *'>
  	cpuAlien := self primitive: #primitiveIntegerRegisterState parameters: #() receiver: #Oop.
  
  	(cpu := self cCoerceSimple: (self startOfData: cpuAlien) to: #'void *') = 0 ifTrue:
  		[^interpreterProxy primitiveFailFor: PrimErrBadReceiver].
  	
  	"The plugin specific include file must define NumIntegerRegisterStateFields"
  	registerStateVector := interpreterProxy
  								instantiateClass: (self is64BitISA
+ 													ifTrue: [interpreterProxy classDoubleWordArray]
- 													ifTrue: [interpreterProxy classDoubleByteArray]
  													ifFalse: [interpreterProxy classWordArray])
  								indexableSize: NumIntegerRegisterStateFields.
  	registerStateVector = 0 ifTrue:
  		[^interpreterProxy primitiveFailFor: PrimErrNoMemory].
  	(interpreterProxy byteSizeOf: registerStateVector) ~= (NumIntegerRegisterStateFields * (self sizeof: self integerRegisterElementType)) ifTrue:
  		[^interpreterProxy primitiveFailFor: PrimErrBadArgument].
  	self storeIntegerRegisterStateOf: cpu into: (interpreterProxy firstIndexableField: registerStateVector).
  
  	^registerStateVector!



More information about the Vm-dev mailing list