[Vm-dev] VM Maker: VMMaker.oscog-eem.1352.mcz
commits at source.squeak.org
commits at source.squeak.org
Tue Jun 16 00:59:03 UTC 2015
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.1352.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.1352
Author: eem
Time: 15 June 2015, 5:56:48.795 pm
UUID: a638308d-1558-44d2-9408-bd5ffd38bb49
Ancestors: VMMaker.oscog-eem.1351
Concoct a scheme for choosing a defaultCompilerClass
when there are multiple choices. Hence fix Slang
translation of the CogOutOfLineLiteralsARMCompiler
=============== Diff against VMMaker.oscog-eem.1351 ===============
Item was added:
+ ----- Method: CogARMCompiler class>>defaultCompilerClass (in category 'translation') -----
+ defaultCompilerClass
+ ^CogOutOfLineLiteralsARMCompiler!
Item was added:
+ ----- Method: CogAbstractInstruction class>>defaultCompilerClass (in category 'translation') -----
+ defaultCompilerClass
+ ^self!
Item was changed:
----- Method: CogOutOfLineLiteralsARMCompiler>>inlineCacheTagAt: (in category 'inline cacheing') -----
+ inlineCacheTagAt: followingAddress
+ ^objectMemory longAt: (self pcRelativeAddressAt: followingAddress - 8)!
- inlineCacheTagAt: address
- ^objectMemory longAt: (self pcRelativeAddressAt: address - 8)!
Item was changed:
----- Method: CogOutOfLineLiteralsARMCompiler>>pcRelativeAddressAt: (in category 'inline cacheing') -----
+ pcRelativeAddressAt: instrAddress
- pcRelativeAddressAt: address
"Extract the address of the ldr rX, [pc, #NNN] instruction at address"
| inst offset |
+ inst := objectMemory longAt: instrAddress.
- inst := objectMemory longAt: address.
self assert: (inst bitAnd: 16rFF5F0000) = (self ldr: 0 rn: PC plus: 0 imm: 0).
offset := inst bitAnd: 16rFFF.
+ ^instrAddress + 8 + ((inst anyMask: 1 << 23)
+ ifTrue: [offset]
+ ifFalse: [offset negated])!
- ^address + 8 + ((inst anyMask: 1 << 23)
- ifTrue: [offset]
- ifFalse: [offset negated])!
Item was changed:
----- Method: Cogit class>>activeCompilerClass (in category 'translation') -----
activeCompilerClass
^initializationOptions
at: #CogCompilerClass
ifPresent: [:compilerClassName| Smalltalk classNamed: compilerClassName]
ifAbsent:
+ [(CogAbstractInstruction subclasses detect:
- [CogAbstractInstruction subclasses detect:
[:compilerClass|
+ compilerClass ISA == (initializationOptions at: #ISA)]) defaultCompilerClass]!
- compilerClass ISA == (initializationOptions at: #ISA)]]!
Item was changed:
----- Method: OutOfLineLiteralsManager>>literalInstructionInRange: (in category 'testing') -----
literalInstructionInRange: litInst
"A literal is in range if its opcode index is within outOfLineLiteralOpcodeLimit, or if
its index has yet to be assigned."
+ | opcodeIdx |
+ opcodeIdx := litInst literalOpcodeIndex.
+ ^opcodeIdx asInteger < 0
+ or: [self assert cogit getOpcodeIndex >= opcodeIdx.
+ cogit getOpcodeIndex - opcodeIdx < cogit backEnd outOfLineLiteralOpcodeLimit]!
- | opcodeIndex |
- opcodeIndex := litInst literalOpcodeIndex.
- ^opcodeIndex asInteger < 0
- or: [self assert cogit opcodeIndex >= opcodeIndex.
- cogit getOpcodeIndex - opcodeIndex < cogit backEnd outOfLineLiteralOpcodeLimit]!
More information about the Vm-dev
mailing list