VM Maker: Cog-eem.368.mcz

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

VM Maker: Cog-eem.368.mcz

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

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

Name: Cog-eem.368
Author: eem
Time: 21 November 2019, 1:21:20.824835 pm
UUID: 5dd94d3b-59ac-4839-aea0-dc7e39662638
Ancestors: Cog-eem.367

Make the nfib single step example for GdbARMv8Alien easier to read.

=============== Diff against Cog-eem.367 ===============

Item was changed:
  ----- Method: GdbARMv8AlienTests>>singleStepNFibFor:numTimes:on: (in category 'examples') -----
  singleStepNFibFor: v numTimes: n on: aStream
  "self new singleStepNFibFor: 2 numTimes: 32 on: Transcript"
  | memory p state newState |
  memory := Bitmap new: 1024 * 2 withAll: self processor nopOpcode.
  memory replaceFrom: 1 to: self nfib size with: self nfib asWordArray startingAt: 1.
  (p := self processor)
  r0: n;
  lr: memory size * 2; "return address"
  pc: 0;
  sp: (memory size * 4) - 16.
  p printRegistersOn: aStream.
  state := p registerState.
  aStream cr; flush.
  n timesRepeat:
+ [| first |
+ aStream nextPutAll: (p disassembleNextInstructionIn: memory); space.
+ p singleStepIn: memory readExecuteOnlyBelow: memory size / 2.
- [aStream nextPutAll: (p disassembleNextInstructionIn: memory); space.
- p singleStepIn: memory readExecuteOnlyBelow: memory size / 2.
  newState := p registerState.
+ first := true.
  state doWithIndex:
  [:rv :i| | nv |
  rv ~= (nv := newState at: i) ifTrue:
+ [first ifTrue: [aStream crtab: 2. first := false].
+ aStream nextPutAll: (p registerStateSetters at: i); space; print: rv; nextPutAll: ' -> '; print: nv; space]].
- [aStream nextPutAll: (p registerStateSetters at: i); space; print: rv; nextPutAll: ' -> '; print: nv; space]].
  aStream cr; flush.
  state := newState].
  ^p r0!