[Vm-dev] VM Maker: Cog-rmacnak.299.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Dec 1 02:55:51 UTC 2015


Ryan Macnak uploaded a new version of Cog to project VM Maker:
http://source.squeak.org/VMMaker/Cog-rmacnak.299.mcz

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

Name: Cog-rmacnak.299
Author: rmacnak
Time: 30 November 2015, 6:55:38.035 pm
UUID: 5cf0cfa6-509a-48f5-ae66-4375da66ffa1
Ancestors: Cog-rmacnak.298

MIPS simulator and disassembler: fix decoding R-type shift amount.

=============== Diff against Cog-rmacnak.298 ===============

Item was added:
+ ----- Method: MIPSELSimulatorTests>>testSllLarge (in category 'tests - arithmetic') -----
+ testSllLarge
+ 	| result |
+ 	self 
+ 		testGenerateInto: 
+ 			[:stream :compiler | 
+ 			stream nextPut: (compiler sllR: V0 R: A0 C: 31).
+ 			stream nextPut: (compiler jR: RA).
+ 			stream nextPut: (compiler nop). "Delay slot"]
+ 		disassembly:
+ '00000000  000417C0  sll v0, a0, 31
+ 00000004  03E00008  jr ra
+ 00000008  00000000  nop
+ '		run: 
+ 			[:simulator | 
+ 			result := simulator call: 0 with: 0 with: 0 with: 0 with: 0.
+ 			self assert: result equals: 0.
+ 			result := simulator call: 0 with: 42 with: 0 with: 0 with: 0.
+ 			self assert: result equals: 0.
+ 			result := simulator call: 0 with: -42 with: 0 with: 0 with: 0.
+ 			self assert: result equals: 0.
+ 			result := simulator call: 0 with: 1 with: 0 with: 0 with: 0.
+ 			self assert: result equals: -16r80000000.
+ 			result := simulator call: 0 with: -1 with: 0 with: 0 with: 0.
+ 			self assert: result equals: -16r80000000].!

Item was added:
+ ----- Method: MIPSELSimulatorTests>>testSraLarge (in category 'tests - arithmetic') -----
+ testSraLarge
+ 	| result |
+ 	self 
+ 		testGenerateInto: 
+ 			[:stream :compiler | 
+ 			stream nextPut: (compiler sraR: V0 R: A0 C: 31).
+ 			stream nextPut: (compiler jR: RA).
+ 			stream nextPut: (compiler nop). "Delay slot"]
+ 		disassembly:
+ '00000000  000417C3  sra v0, a0, 31
+ 00000004  03E00008  jr ra
+ 00000008  00000000  nop
+ '		run: 
+ 			[:simulator | 
+ 			result := simulator call: 0 with: 0 with: 0 with: 0 with: 0.
+ 			self assert: result equals: 0.
+ 			result := simulator call: 0 with: 42 with: 0 with: 0 with: 0.
+ 			self assert: result equals: 0.
+ 			result := simulator call: 0 with: -42 with: 0 with: 0 with: 0.
+ 			self assert: result equals: -1].!

Item was added:
+ ----- Method: MIPSELSimulatorTests>>testSrlLarge (in category 'tests - arithmetic') -----
+ testSrlLarge
+ 	| result |
+ 	self 
+ 		testGenerateInto: 
+ 			[:stream :compiler | 
+ 			stream nextPut: (compiler srlR: V0 R: A0 C: 31).
+ 			stream nextPut: (compiler jR: RA).
+ 			stream nextPut: (compiler nop). "Delay slot"]
+ 		disassembly:
+ '00000000  000417C2  srl v0, a0, 31
+ 00000004  03E00008  jr ra
+ 00000008  00000000  nop
+ '		run: 
+ 			[:simulator | 
+ 			result := simulator call: 0 with: 0 with: 0 with: 0 with: 0.
+ 			self assert: result equals: 0.
+ 			result := simulator call: 0 with: 42 with: 0 with: 0 with: 0.
+ 			self assert: result equals: 0.
+ 			result := simulator call: 0 with: -42 with: 0 with: 0 with: 0.
+ 			self assert: result equals: 1].!

Item was changed:
  ----- Method: MIPSInstruction>>sa (in category 'fields') -----
  sa
+ 	^(value >> 6) bitAnd: 31!
- 	^(value >> 6) bitAnd: 15!



More information about the Vm-dev mailing list