Eliot Miranda uploaded a new version of Cog to project VM Maker:
http://source.squeak.org/VMMaker/Cog-eem.378.mcz==================== Summary ====================
Name: Cog-eem.378
Author: eem
Time: 18 December 2019, 1:04:21.723838 am
UUID: 72df8bcc-abb6-4b4b-8fde-33006db4d179
Ancestors: Cog-eem.377
Include the labelsDictionary in disassembly decoration in processor simulators that want it. This allows i.e. the ARMv8 simulator to identify two-word literals by tagging the labels dictionary when a pc-relative load is decorated.
=============== Diff against Cog-eem.377 ===============
Item was added:
+ ----- Method: CogProcessorAlien>>decorateDisassembly:for:fromAddress:labels: (in category 'disassembly') -----
+ decorateDisassembly: anInstructionString for: aSymbolManager "<Cogit>" fromAddress: address labels: labelDictionaryOrNil
+ "This is a hook to allow decoration to add values to labelDictionary to get better decoration of out-of-line literals.
+ It is only relevant to 64-bit out-of-line literal back ends, which currently means only ARMv8. Hence the default
+ defers to the original mehtod, used in most classes."
+ ^self decorateDisassembly: anInstructionString for: aSymbolManager fromAddress: address!
Item was changed:
----- Method: CogProcessorAlien>>disassembleFrom:to:in:for:labels:on: (in category 'disassembly') -----
disassembleFrom: startAddress to: endAddress in: memory for: aSymbolManager "<Cogit>" labels: labelDictionary on: aStream
| address |
address := startAddress.
[address <= endAddress] whileTrue:
[[:sizeArg :stringArg| | size string |
size := sizeArg.
string := stringArg.
(aSymbolManager labelForPC: address) ifNotNil:
[:label| aStream nextPutAll: label; nextPut: $:; cr].
(labelDictionary at: address ifAbsent: []) ifNotNil:
[:label|
+ label ~~ #twoWordLiteral ifTrue:
+ [self printLabel: label on: aStream at: address for: aSymbolManager.
+ label isArray ifTrue:
+ [string := nil.
+ size := label third]]].
- self printLabel: label on: aStream at: address for: aSymbolManager.
- label isArray ifTrue:
- [string := nil.
- size := label third]].
string ifNotNil:
+ [aStream nextPutAll: (self decorateDisassembly: string for: aSymbolManager fromAddress: address labels: labelDictionary)].
- [aStream nextPutAll: (self decorateDisassembly: string for: aSymbolManager fromAddress: address)].
aStream cr; flush.
address := address + size]
valueWithArguments: (self
primitiveDisassembleAt: address
inMemory: memory)].
(labelDictionary at: address ifAbsent: []) ifNotNil:
[:label| self printLabel: label on: aStream at: address for: aSymbolManager]!