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

commits at source.squeak.org commits at source.squeak.org
Wed Apr 8 02:22:44 UTC 2015


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

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

Name: VMMaker.oscog-tpr.1177
Author: tpr
Time: 7 April 2015, 7:21:19.146 pm
UUID: faf2f535-d388-4c67-b5bd-141ba5038afd
Ancestors: VMMaker.oscog-eem.1176

Fix two moron-level typos in short, simple bits of code. Sigh.

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

Item was changed:
  ----- Method: CogARMCompiler>>concretizeMoveCqR (in category 'generate machine code - concretize') -----
  concretizeMoveCqR
  	"Will get inlined into concretizeAt: switch."
  	"If the quick constant is in fact a shiftable 8bit, generate the apropriate MOV, otherwise do what is necessary for a whole word."
  	<inline: true>
  	|word reg|
  	word := operands at: 0.
  	reg := self concreteRegister: (operands at: 1).
  	self 
  		rotateable8bitImmediate: (operands at: 0) 
  		ifTrue: [:rot :immediate |
  			self machineCodeAt: 0 put: (self mov: reg imm: immediate ror: rot).
  			^machineCodeSize := 4]
  		ifFalse: [|invVal|
  			word <0
  				ifTrue:[invVal := -1 - word]
  				ifFalse:[invVal := word bitInvert32].
  			self rotateable8bitImmediate: invVal
  				ifTrue: [ :rot :immediate |
+ 					self machineCodeAt: 0 put: (self mvn: reg imm: immediate ror: rot).
- 					self machineCodeAt: 0 put: (self mvn: ConcreteIPReg imm: immediate ror: rot).
  					^machineCodeSize := 4]
  				ifFalse: [^self concretizeMoveCwR]]
  	!

Item was changed:
  ----- Method: CogARMCompiler>>concretizePushCq (in category 'generate machine code - concretize') -----
  concretizePushCq
+ 	"Will get inlined into concretizeAt: switch."
- 	| word instrOffset |
  	<inline: true>
+ 	| word instrOffset|
- 	self break.
  	word := operands at: 0.
+ 	self 
+ 		rotateable8bitImmediate: word 
+ 		ifTrue: [:rot :immediate |
+ 			self machineCodeAt: 0 put: (self mov: ConcreteIPReg imm: immediate ror: rot).
- 	self
- 		rotateable8bitImmediate: word
- 		ifTrue: [:rot :immediate | 
- 			self
- 				machineCodeAt: 0
- 				put: (self
- 						mov: ConcreteIPReg
- 						imm: immediate
- 						ror: rot).
  			instrOffset := 4]
+ 		ifFalse:[|invVal|
+ 			word <0
+ 				ifTrue:[invVal := -1 - word]
+ 				ifFalse:[invVal := word bitInvert32].
+ 			self rotateable8bitImmediate: invVal
+ 				ifTrue: [ :rot :immediate |
+ 					self machineCodeAt: 0 put: (self mvn: ConcreteIPReg imm: immediate ror: rot).
+ 					^machineCodeSize := 4]
+ 				ifFalse: [instrOffset := self at: 0 moveCw: word intoR: ConcreteIPReg]].
+ 	self machineCodeAt: instrOffset put: (self pushR: ConcreteIPReg).
+ 	^machineCodeSize := instrOffset + 4!
- 		ifFalse: [| invVal |
- 			word < 0
- 				ifTrue: [invVal := -1 - word]
- 				ifFalse: [invVal := word bitInvert32].
- 			self
- 				rotateable8bitImmediate: invVal
- 				ifTrue: [:rot :immediate | 
- 					self
- 						machineCodeAt: 0
- 						put: (self
- 								mvn: ConcreteIPReg
- 								imm: immediate
- 								ror: rot).
- 					instrOffset := 4]
- 				ifFalse: [instrOffset := self
- 								at: 0
- 								moveCw: word
- 								intoR: ConcreteIPReg]].
- 	self
- 		machineCodeAt: instrOffset
- 		put: (self pushR: ConcreteIPReg).
- 	^ machineCodeSize := instrOffset + 4!



More information about the Vm-dev mailing list