[Vm-dev] VM Maker: VMMaker.oscog-tpr.1122.mcz
commits at source.squeak.org
commits at source.squeak.org
Thu Mar 26 04:14:13 UTC 2015
tim Rowledge uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-tpr.1122.mcz
==================== Summary ====================
Name: VMMaker.oscog-tpr.1122
Author: tpr
Time: 25 March 2015, 9:12:25.847 pm
UUID: 35623fda-ad89-4dbf-8908-2bf5d62d3b54
Ancestors: VMMaker.oscog-eem.1121
update two tests - one deleted, one 'fixed'.
=============== Diff against VMMaker.oscog-eem.1121 ===============
Item was changed:
----- Method: CogARMCompilerTests>>testAdd (in category 'tests') -----
testAdd
"self new testAdd"
"the forms are valid, "
"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)]]].
"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) signedIntFromLong asString.
- 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)]]]
!
Item was removed:
- ----- Method: CogARMCompilerTests>>testGenerateAdd (in category 'tests') -----
- testGenerateAdd
- "self new testGenerateAdd"
- |memory|
- self resetGen. "initialise important stuff"
-
- "test AddCqR"
- self concreteCompilerClass registersWithNamesDo: [ :reg :regName |
- #(0 16rF 16rFF) do:
- [: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) do:
- [:n|
- self gen: AddCwR operand: n operand: reg]].
- memory := self generateInstructions.
- self disassembleOpcodesIn: memory to: Transcript .
- !
More information about the Vm-dev
mailing list