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

commits at source.squeak.org commits at source.squeak.org
Tue Mar 24 20:12:27 UTC 2015


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

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

Name: VMMaker.oscog-eem.1115
Author: eem
Time: 24 March 2015, 1:10:10.337 pm
UUID: 925a7df5-a222-417f-9d84-c7f3ff488f79
Ancestors: VMMaker.oscog-tpr.1114

Merge with VMMaker.oscog-tpr.1114 restoring
testAdd.

Fix an assert in SpurSegmentManager>>insertSegmentFor:

=============== Diff against VMMaker.oscog-tpr.1114 ===============

Item was changed:
  ----- Method: CogARMCompilerTests>>testAdd (in category 'tests') -----
  testAdd
  	"self new testAdd"
+ 	
+ 	"the forms are valid, "
- 	|memory|
- 	self resetGen. "initialise important stuff"
- 		
  	"test AddCqR"
  	self concreteCompilerClass registersWithNamesDo: [ :reg :regName |
  		#(0 16rF 16rFF) do:
+ 			[:n| | inst len |
+ 			inst := self gen: AddCqR operand: n operand: reg.
+ 			len := inst concretizeAt: 0.
+ 			self processor
+ 				disassembleInstructionAt: 0
+ 				In: inst machineCode object
+ 				into: [:str :sz| | plainJane herIntended |
+ 					plainJane := self strip: str.
+ 					herIntended := 'adds	', regName, ', ', regName, ', #', n asString.
+ 					self assert: (plainJane match: herIntended)]]].
- 			[:n| 
- 			self gen: AddCqR operand: n operand: reg]].
- 	memory := self generateInstructions.
- 	self disassembleOpcodesIn: memory to: Transcript	.
  		
- 	self resetGen. "initialise important stuff"
  	"test AddCwR"
  	self concreteCompilerClass registersWithNamesDo: [ :reg :regName |
+ 		#(16rFFFFFFFF 16r88888888 0) do:
+ 			[:n| | inst len |
+ 			inst := self gen: AddCwR operand: n operand: reg.
+ 			len := inst concretizeAt: 0.
+ 			self processor
+ 				disassembleInstructionAt: 0
+ 				In: inst machineCode object
+ 				into: [:str :sz| | plainJane herIntended |
+ 					plainJane := self strip: str.
+ 					herIntended := 'mov	sl, #', (n bitAnd: 16rFF << 24) asString.
+ 					self assert: (plainJane match: herIntended)].
+ 			self processor
+ 				disassembleInstructionAt: 4
+ 				In: inst machineCode object
+ 				into: [:str :sz| | plainJane herIntended |
+ 					plainJane := self strip: str.
+ 					herIntended := 'orr	sl, sl, #', (n bitAnd: 16rFF << 16) asString.
+ 					self assert: (plainJane match: herIntended)].
+ 			self processor
+ 				disassembleInstructionAt: 8
+ 				In: inst machineCode object
+ 				into: [:str :sz| | plainJane herIntended |
+ 					plainJane := self strip: str.
+ 					herIntended := 'orr	sl, sl, #', (n bitAnd: 16rFF << 8) signedIntFromLong asString.
+ 					self assert: (plainJane match: herIntended)].
+ 			self processor
+ 				disassembleInstructionAt: 12
+ 				In: inst machineCode object
+ 				into: [:str :sz| | plainJane herIntended |
+ 					plainJane := self strip: str.
+ 					herIntended := 'orr	sl, sl, #', (n bitAnd: 16rFF) asString.
+ 					self assert: (plainJane match: herIntended)].
+ 			self processor
+ 				disassembleInstructionAt: 16
+ 				In: inst machineCode object
+ 				into: [:str :sz| | plainJane herIntended |
+ 					plainJane := self strip: str.
+ 					herIntended := 'adds	', regName, ', ', regName, ', sl'.
+ 					self assert: (plainJane match: herIntended)]]]
- 		#(16rFFFFFFFF 16r88888888) do:
- 			[:n|
- 			self gen: AddCwR operand: n operand: reg]].
- 	memory := self generateInstructions.
- 	self disassembleOpcodesIn: memory to: Transcript	.
  !

Item was changed:
  ----- Method: SpurSegmentManager>>insertSegmentFor: (in category 'growing/shrinking memory') -----
  insertSegmentFor: segAddress
  	"Reserve a new segInfo for segAddress.  If segAddress
  	 is in the middle of the existing segments, shuffle them
  	 up to make room. Answer the new segment's index."
  	| segIndex lastSegIndex |
+ 	self assert: segAddress >= (segments at: 0) segLimit.
- 	self assert: segAddress > (segments at: 0) segLimit.
  	numSegments = numSegInfos ifTrue:
  		[self allocateOrExtendSegmentInfos].
  	self assert: numSegments < numSegInfos.
  	segIndex := lastSegIndex := numSegments - 1.
  	numSegments := numSegments + 1.
  	[segAddress >= (segments at: segIndex) segLimit ifTrue:
  		[segIndex := segIndex + 1.
  		 lastSegIndex to: segIndex by: -1 do:
  			[:idx| segments at: idx + 1 put: (segments at: idx)].
  		 ^segIndex].
  	 segIndex := segIndex - 1]
  		repeat!



More information about the Vm-dev mailing list