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

commits at source.squeak.org commits at source.squeak.org
Sun May 31 22:48:37 UTC 2020

Eliot Miranda uploaded a new version of VMMaker to project VM Maker:

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

Name: VMMaker.oscog-eem.2758
Author: eem
Time: 31 May 2020, 3:48:23.333686 pm
UUID: 12eca51a-b989-486f-9a89-a66bba48ccc1
Ancestors: VMMaker.oscog-eem.2757

undo two unintended changes form the previous commit.

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

Item was removed:
- ----- Method: CogIA32Compiler>>genAlignCStackSavingRegisters:numArgs:wordAlignment: (in category 'abi') -----
- genAlignCStackSavingRegisters: regMask numArgs: numArgs wordAlignment: alignment
- 	<inline: true>
- 	| regMaskCopy numRegsPushed wordsPushedModAlignment delta |
- 	<var: 'regMaskCopy' type: #usqInt>
- 	self shouldBeImplemented.
- 	self flag: 'test the assert & debug VMs on Windows and Mac OS (while you still can).  The Windows build produces stack alignment assert fails, probably due to ceInvokeInterpret.  The issue is the alignment calculation may not take into account the return address.'.
- 	regMaskCopy := regMask asUnsignedInteger.
- 	numRegsPushed := 0.
- 	[regMaskCopy ~= 0] whileTrue:
- 		[numRegsPushed := numRegsPushed + (regMaskCopy bitAnd: 1).
- 		 regMaskCopy := regMaskCopy bitShift: -1].
- 	(numRegsPushed = 0
- 	 and: [self numIntRegArgs >= numArgs]) ifTrue:
- 		[^0].
- 	wordsPushedModAlignment := numRegsPushed + (numArgs - self numIntRegArgs max: 0) \\ alignment.
- 	wordsPushedModAlignment ~= 0 ifTrue:
- 		[delta := alignment - wordsPushedModAlignment.
- 		 cogit SubCq: delta * objectMemory wordSize R: SPReg].
- 	^0!

Item was changed:
  ----- Method: Cogit>>genInvokeInterpretTrampoline (in category 'initialization') -----
  	"Switch to the C stack (do *not* save the Smalltalk stack pointers;
  	 this is the caller's responsibility), and invoke interpret PDQ."
  	| startAddress |
  	<inline: false>
  	startAddress := methodZoneBase.
  	self zeroOpcodeIndex.
  	backEnd hasVarBaseRegister ifTrue:
  		[self MoveCq: self varBaseAddress R: VarBaseReg]. "Must happen first; value may be used in genLoadStackPointers"
  		ifTrue: [backEnd genLoadCStackPointers]
  		ifFalse: [backEnd genLoadCStackPointer].
- 	cStackAlignment > objectMemory wordSize ifTrue:
- 		[backEnd
- 			genAlignCStackSavingRegisters: self emptyRegisterMask
- 			numArgs: 0
- 			wordAlignment: cStackAlignment / objectMemory wordSize].
  	"Sideways call interpret so that the stack looks correct, for exception handling etc"
  	backEnd genMarshallNArgs: 0 arg: nil arg: nil arg: nil arg: nil.
  	backEnd hasLinkRegister
  			[self MoveAw: coInterpreter cReturnAddressAddress R: LinkReg]
  			[self MoveAw: coInterpreter cReturnAddressAddress R: ABIResultReg.
  			 backEnd genSubstituteReturnAddressR: ABIResultReg].
  	self JumpFullRT: (self
  						cCode: [#interpret asUnsignedInteger]
  						inSmalltalk: [self simulatedTrampolineFor: #interpret]).
  	self outputInstructionsForGeneratedRuntimeAt: startAddress.
  	self recordGeneratedRunTime: 'ceInvokeInterpret' address: startAddress.

More information about the Vm-dev mailing list