[Vm-dev] VM Maker: VMMaker.oscog-tpr.1226.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Apr 20 19:36:06 UTC 2015


tim Rowledge uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-tpr.1226.mcz

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

Name: VMMaker.oscog-tpr.1226
Author: tpr
Time: 20 April 2015, 12:34:10.863 pm
UUID: 4005ac70-5638-4ec4-9560-675851459bd6
Ancestors: VMMaker.oscog-eem.1225

Fix a couple of not-implemented-for-ARM methds.
Call correct relocate code in relocateCallsInClosedPIC:

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

Item was changed:
  ----- Method: CogARMCompiler>>concretizeRetN (in category 'generate machine code - concretize') -----
  concretizeRetN
  	"Will get inlined into concretizeAt: switch."
  	<inline: true>
  	| offset |
  	offset := operands at: 0.
  	offset = 0 ifTrue:
  		[self machineCodeAt: 0 put: (self mov: PC rn: LR). "pop	{pc}"
  		^machineCodeSize := 4].
+ 	self assert: offset < 255. "We have an 8 bit immediate. If needed, we could rotate it less than 30 bit."
- 	self assert: offset < 32. "We have an 8 bit immediate. If needed, we could rotate it less than 30 bit."
  
  	self machineCodeAt: 0 put: (self add: SP rn: SP imm: offset  ror: 0).
  	self machineCodeAt: 4 put: (self mov: PC rn: LR).  "pop	{pc}"
  	^machineCodeSize := 8!

Item was added:
+ ----- Method: CogARMCompiler>>loadLiteralByteSize (in category 'accessing') -----
+ loadLiteralByteSize
+ 	"Answer the byte size of a MoveCwR opcode's corresponding machine code"
+ 	^16!

Item was added:
+ ----- Method: CogAbstractInstruction>>relocateMethodReferenceBeforeAddress:by: (in category 'inline cacheing') -----
+ relocateMethodReferenceBeforeAddress: pc by: delta
+ 	self relocateCallBeforeReturnPC: pc by: delta!

Item was changed:
  ----- Method: Cogit>>relocateCallsInClosedPIC: (in category 'compaction') -----
  relocateCallsInClosedPIC: cPIC
  	<var: #cPIC type: #'CogMethod *'>
  	| delta pc entryPoint targetMethod |
  	<var: #targetMethod type: #'CogMethod *'>
  	delta := cPIC objectHeader.
  	self assert: (backEnd callTargetFromReturnAddress: cPIC asInteger + missOffset)
  					= (self picAbortTrampolineFor: cPIC cmNumArgs).
  	backEnd relocateCallBeforeReturnPC: cPIC asInteger + missOffset by: delta negated.
  
  	pc := cPIC asInteger + firstCPICCaseOffset.
  	1 to: cPIC cPICNumCases do:
  		[:i|
  		entryPoint := backEnd jumpLongTargetBeforeFollowingAddress: pc.
  		"Find target from jump.  Ignore jumps to the interpret and MNU calls within this PIC"
  		(entryPoint < cPIC asInteger
  		 or: [entryPoint > (cPIC asInteger + cPIC blockSize)]) ifTrue:
  			[targetMethod := self cCoerceSimple: entryPoint - cmNoCheckEntryOffset to: #'CogMethod *'.
  			 self assert: targetMethod cmType = CMMethod.
  			 backEnd
  				relocateJumpLongBeforeFollowingAddress: pc
  				by: (delta - targetMethod objectHeader) negated].
  		pc := pc + cPICCaseSize].
  	self assert: cPIC cPICNumCases > 0.
  	pc := pc - cPICCaseSize.
  	"Finally relocate the load of the PIC and the jump to the overflow routine ceCPICMiss:receiver:"
  	backEnd relocateMethodReferenceBeforeAddress: pc + backEnd loadLiteralByteSize by: delta.
+ 	backEnd relocateJumpLongBeforeFollowingAddress: pc + cPICEndSize by: delta negated!
- 	backEnd relocateJumpBeforeFollowingAddress: pc + cPICEndSize by: delta negated!



More information about the Vm-dev mailing list