[Vm-dev] VM Maker: Cog-eem.305.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Dec 5 19:31:19 UTC 2015


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

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

Name: Cog-eem.305
Author: eem
Time: 5 December 2015, 11:31:07.55 am
UUID: ce18f80d-28db-41ed-a361-d31604c2da7c
Ancestors: Cog-eem.304

Add support for indirect jumps to the BochsX64Alien.

=============== Diff against Cog-eem.304 ===============

Item was changed:
  ----- Method: BochsX64Alien>>handleGroup5FailureAt:in:rex: (in category 'error handling') -----
  handleGroup5FailureAt: pc "<Integer>" in: memoryArray "<Bitmap|ByteArray>" rex: rexByteOrNil "<Integer|nil>"
  	"Convert an execution primitive failure for a group 5 instruction into the relevant ProcessorSimulationTrap signal."
  	| modrmByte getter |
  	self assert: rexByteOrNil isNil.
  	modrmByte := memoryArray byteAt: pc + 2.
  	(modrmByte >> 3 bitAnd: 7)
  		caseOf: {
  			[2 "Call Ev"]	->	[getter := self registerStateGetters at: (modrmByte bitAnd: 7) + 1.
  							^(ProcessorSimulationTrap
  									pc: pc
  									nextpc: pc + 2
  									address: (self perform: getter)
  									type: #call)
+ 								signal].
+ 			[4 "Jump Ev"]	->	[getter := self registerStateGetters at: (modrmByte bitAnd: 7) + 1.
+ 							^(ProcessorSimulationTrap
+ 									pc: pc
+ 									nextpc: pc + 2
+ 									address: (self perform: getter)
+ 									type: #jump)
  								signal] }!

Item was added:
+ ----- Method: BochsX64Alien>>simulateJumpCallOf:memory: (in category 'execution') -----
+ simulateJumpCallOf: address memory: aMemory
+ 	"Simulate a frame-building jump call of address (i.e. do not push the return pc
+ 	 as this has already been done).  Build a frame since
+ 	a) this is used for calls into the run-time which are unlikely to be leaf-calls, and
+ 	b) stack alignment needs to be realistic for assert checking for platforms such as Mac OS X"
+ 	self pushWord: self rbp in: aMemory.
+ 	self rbp: self rsp.
+ 	PostBuildStackDelta ~= 0 ifTrue:
+ 		[self rsp: self rsp - PostBuildStackDelta].
+ 	self rip: address!



More information about the Vm-dev mailing list