VM Maker: VMMaker.oscog-eem.2604.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

VM Maker: VMMaker.oscog-eem.2604.mcz

commits-2
 
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2604.mcz

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

Name: VMMaker.oscog-eem.2604
Author: eem
Time: 10 December 2019, 12:20:47.039646 pm
UUID: da1b7197-99c1-4482-b011-99cf9d2c78f5
Ancestors: VMMaker.oscog-eem.2603

A64: Implement simple scheme for aligning 64-bit literals in 32-bit granularity code.  Later on we can try and introduce Liuteral and Literal32 and group Literal32's together for more compact code.  Bit this is fine for now.

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

Item was changed:
  ----- Method: CogARMCompiler>>callInstructionByteSize (in category 'accessing') -----
  callInstructionByteSize
+ "ARMv8 calls and jumps span +/- 128 mb, more than enough for intra-zone calls and jumps."
- "ARM calls and jumps span +/- 32 mb, more than enough for intra-zone calls and jumps."
  ^4!

Item was added:
+ ----- Method: CogAbstractInstruction>>literalAlignment (in category 'accessing') -----
+ literalAlignment
+ "Answer the required alignment for literals embedded in code.
+ Default to codeGranularity.  Subclasses requiring greater must override"
+ <inline: true>
+ ^self codeGranularity!

Item was changed:
  ----- Method: OutOfLineLiteralsManager>>dumpLiterals: (in category 'compile abstract instructions') -----
  dumpLiterals: generateBranchAround
+ "Output all pending literal instructions, making the originals dependents on the generated ones
+ so that a later pass will copy the address of each generated literal inst to its original in literals,
- "Output all pending literal instructions, making the originals dependents of the generated ones
- so that a later pass will copy the address of each generated literl inst to its original in literals,
  and hence allow the instruction using the literal to compute the correct address.."
  | jump litInst |
  <var: 'jump' type: #'AbstractInstruction *'>
  <var: 'litInst' type: #'AbstractInstruction *'>
 
  generateBranchAround ifTrue:
  [jump := cogit Jump: 0].
+ cogit backEnd literalAlignment > cogit backEnd codeGranularity ifTrue:
+ [cogit gen: AlignmentNops operand: cogit backEnd literalAlignment].
  lastDumpedLiteralIndex to: nextLiteralIndex - 1 do:
  [:i|
  litInst := self literalInstructionAt: i.
  (cogit gen: Literal operand: (litInst operands at: 0)) dependent: litInst.
  litInst setLiteralOpcodeIndex: cogit getOpcodeIndex].
  generateBranchAround ifTrue:
  [jump jmpTarget: cogit Label].
 
  firstOpcodeIndex := cogit getOpcodeIndex.
  lastDumpedLiteralIndex := nextLiteralIndex!