VM Maker: VMMaker.oscog-eem.2698.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.2698.mcz

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

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

Name: VMMaker.oscog-eem.2698
Author: eem
Time: 2 February 2020, 7:45:41.640351 pm
UUID: 562cdbbc-e6f4-4b05-914e-7991755334e8
Ancestors: VMMaker.oscog-eem.2697

Cogit: Implement NativePopR:& NativePushR:.  Fix compilation warnings for cStack/FramePointerAddress access.  Fix nextProfileTickAddress for 64-bit simulation.  Write stackLimitAddress & vmOwnerLockAddress in the modern style.

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

Item was changed:
+ ----- Method: CoInterpreter>>cFramePointerAddress (in category 'trampoline support') -----
- ----- Method: CoInterpreter>>cFramePointerAddress (in category 'cog jit support') -----
  cFramePointerAddress
  <api>
+ <returnTypeC: #usqInt>
  ^self
+ cCode: [(self addressOf: CFramePointer) asUnsignedInteger]
- cCode: [self addressOf: CFramePointer]
  inSmalltalk: [cogit simulatedReadWriteVariableAddress: #getCFramePointer in: self]!

Item was changed:
+ ----- Method: CoInterpreter>>cStackPointerAddress (in category 'trampoline support') -----
- ----- Method: CoInterpreter>>cStackPointerAddress (in category 'cog jit support') -----
  cStackPointerAddress
  <api>
+ <returnTypeC: #usqInt>
  ^self
+ cCode: [(self addressOf: CStackPointer) asUnsignedInteger]
- cCode: [self addressOf: CStackPointer]
  inSmalltalk: [cogit simulatedReadWriteVariableAddress: #getCStackPointer in: self]!

Item was changed:
  ----- Method: CoInterpreter>>nextProfileTickAddress (in category 'trampoline support') -----
  nextProfileTickAddress
  <api>
  <returnTypeC: #usqInt>
  "N.B. nextProfileTick is 64-bits"
  ^self cCode: [(self addressOf: nextProfileTick) asUnsignedInteger]
  inSmalltalk:
+ [objectMemory wordSize = 8
- [VMBIGENDIAN
  ifTrue:
+ [cogit simulatedReadWriteVariableAddress: #nextProfileTick in: self]
- [cogit simulatedReadWriteVariableAddress: #nextProfileTickLow in: self.
- cogit simulatedReadWriteVariableAddress: #nextProfileTickHigh in: self]
  ifFalse:
+ [VMBIGENDIAN
+ ifTrue:
+ [cogit simulatedReadWriteVariableAddress: #nextProfileTickLow in: self.
+ cogit simulatedReadWriteVariableAddress: #nextProfileTickHigh in: self]
+ ifFalse:
+ [cogit simulatedReadWriteVariableAddress: #nextProfileTickHigh in: self.
+ cogit simulatedReadWriteVariableAddress: #nextProfileTickLow in: self]]]!
- [cogit simulatedReadWriteVariableAddress: #nextProfileTickHigh in: self.
- cogit simulatedReadWriteVariableAddress: #nextProfileTickLow in: self]]!

Item was changed:
  ----- Method: CoInterpreter>>stackLimitAddress (in category 'trampoline support') -----
  stackLimitAddress
  <api>
  <returnTypeC: #usqInt>
+ ^self cCode: [(self addressOf: stackLimit) asUnsignedInteger]
- ^self cCode: '(usqInt)&GIV(stackLimit)'
   inSmalltalk: [cogit simulatedVariableAddress: #stackLimitFromMachineCode in: self]!

Item was changed:
  ----- Method: CoInterpreterMT>>vmOwnerLockAddress (in category 'cog jit support') -----
  vmOwnerLockAddress
+ <doNotGenerate>
+ ^cogThreadManager
+ ifNotNil: [:ctm| ctm vmOwnerLockAddress]
+ ifNil: [0]!
- <api> "NB. For the JIT only, so it can generate the lock & unlock functions."
- <returnTypeC: #usqInt>
- ^processHasThreadId
- ifTrue: [self cCode: '(usqInt)&GIV(vmOwnerLock)'
- inSmalltalk: [self inMemoryVMOwnerLockAddress]]
- ifFalse: [0]!

Item was added:
+ ----- Method: CogThreadManager>>vmOwnerLockAddress (in category 'public api') -----
+ vmOwnerLockAddress
+ <api> "NB. For the JIT only, so it can generate the lock & unlock functions."
+ <returnTypeC: #usqInt>
+ ^self
+ cCode: [(self addressOf: vmOwnerLock) asUnsignedInteger]
+ inSmalltalk: [self inMemoryVMOwnerLockAddress]!

Item was added:
+ ----- Method: Cogit>>NativePopR: (in category 'abstract instructions') -----
+ NativePopR: reg
+ ^self gen: (NativeSPReg = SPReg ifTrue: [PopR] ifFalse: [NativePopR]) operand: reg!

Item was added:
+ ----- Method: Cogit>>NativePushR: (in category 'abstract instructions') -----
+ NativePushR: reg
+ ^self gen: (NativeSPReg = SPReg ifTrue: [PushR] ifFalse: [NativePushR]) operand: reg!