VM Maker: VMMaker.oscog-rsf.2072.mcz

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

VM Maker: VMMaker.oscog-rsf.2072.mcz

commits-2
 
Ronie Salgado Faila uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-rsf.2072.mcz

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

Name: VMMaker.oscog-rsf.2072
Author: rsf
Time: 4 January 2017, 11:19:12.905175 pm
UUID: a71106f7-964a-4165-bd14-cd8b52ca1acf
Ancestors: VMMaker.oscog-eem.2071

Fixing some compilation warnings.
Fixing the order of the arguments of some trampolines.
Fixing the computation of the numTrampolines to return values according to the LowcodeVM flag.
Added a hack in CogObjectRepresentationForSpur to always add the NumStoreTrampolines count. The generated NumTrampolines C define is just a constant, which does not take into account if -DIMMUTABILITY was passed to the compiler, which happens with the PharoVM.

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

Item was changed:
  ----- Method: CogBytecodeDescriptor class>>instVarNamesAndTypesForTranslationDo: (in category 'translation') -----
  instVarNamesAndTypesForTranslationDo: aBinaryBlock
  "enumerate aBinaryBlock with the names and C type strings for the inst vars to include in a BytecodeDescriptor struct."
 
  "With hasIRC there are 9 flag bits.  Excluding hasIRC in non-Newspeak VMs keeps the descriptor compact."
  (NewspeakVM
  ifTrue: [self instVarNames]
  ifFalse: [self instVarNames copyWithout: 'hasIRC']) do:
  [:ivn|
  aBinaryBlock
  value: ivn
  value: (ivn caseOf: {
  ['generator'] -> [#('sqInt (*' ')(void)')].
+ ['spanFunction'] -> [#('sqInt NoDbgRegParms (*' ')(struct _BytecodeDescriptor *,sqInt,sqInt,sqInt)')].
+ ['needsFrameFunction'] -> [#('sqInt NoDbgRegParms (*' ')(sqInt)')].
- ['spanFunction'] -> [#('sqInt (*' ')(struct _BytecodeDescriptor *,sqInt,sqInt,sqInt)')].
- ['needsFrameFunction'] -> [#('sqInt (*' ')(sqInt)')].
  ['numBytes'] -> ['unsigned char'].
  ['stackDelta'] -> ['signed char'].
  ['opcode'] -> ['unsigned char'] }
  otherwise: [#('unsigned' ' : 1')])]!

Item was changed:
  ----- Method: CogObjectRepresentation>>genDoubleComparison:invert: (in category 'primitive generators') -----
  genDoubleComparison: jumpOpcodeGenerator invert: invertComparison
  <option: #DPFPReg0>
+ <var: #jumpOpcodeGenerator declareC: 'AbstractInstruction * NoDbgRegParms (*jumpOpcodeGenerator)(void *)'>
- <var: #jumpOpcodeGenerator declareC: 'AbstractInstruction *(*jumpOpcodeGenerator)(void *)'>
  | jumpFail jumpImmediate jumpNonInt jumpCond compare |
  <var: #jumpImmediate type: #'AbstractInstruction *'>
  <var: #jumpNonInt type: #'AbstractInstruction *'>
  <var: #jumpCond type: #'AbstractInstruction *'>
  <var: #compare type: #'AbstractInstruction *'>
  <var: #jumpFail type: #'AbstractInstruction *'>
  cogit processorHasDoublePrecisionFloatingPointSupport ifFalse:
  [^UnimplementedPrimitive].
  cogit genLoadArgAtDepth: 0 into: Arg0Reg.
  self genGetDoubleValueOf: ReceiverResultReg into: DPFPReg0.
  jumpImmediate := self genJumpImmediate: Arg0Reg.
  self genGetCompactClassIndexNonImmOf: Arg0Reg into: SendNumArgsReg.
  self genCmpClassFloatCompactIndexR: SendNumArgsReg.
  jumpFail := cogit JumpNonZero: 0.
  self genGetDoubleValueOf: Arg0Reg into: DPFPReg1.
  invertComparison "May need to invert for NaNs"
  ifTrue: [compare := cogit CmpRd: DPFPReg0 Rd: DPFPReg1]
  ifFalse: [compare := cogit CmpRd: DPFPReg1 Rd: DPFPReg0].
  jumpCond := cogit perform: jumpOpcodeGenerator with: 0. "FP jumps are a little weird"
  cogit genMoveFalseR: ReceiverResultReg.
  cogit genPrimReturn.
  jumpCond jmpTarget: (cogit genMoveTrueR: ReceiverResultReg).
  cogit genPrimReturn.
  jumpImmediate jmpTarget: cogit Label.
  self maybeGenConvertIfSmallFloatIn: Arg0Reg scratchReg: TempReg into: DPFPReg1 andJumpTo: compare.
  self smallIntegerIsOnlyImmediateType ifFalse:
  [jumpNonInt := self genJumpNotSmallInteger: Arg0Reg scratchReg: TempReg].
  self genConvertSmallIntegerToIntegerInReg: Arg0Reg.
  cogit ConvertR: Arg0Reg Rd: DPFPReg1.
  cogit Jump: compare.
  jumpFail jmpTarget: cogit Label.
  self smallIntegerIsOnlyImmediateType ifFalse:
  [jumpNonInt jmpTarget: jumpFail getJmpTarget].
  ^CompletePrimitive!

Item was changed:
  ----- Method: CogObjectRepresentation>>genLcByteSizeOf:to: (in category 'inline primitive support') -----
  genLcByteSizeOf: oop to: resultRegister
  <option: #LowcodeVM>
  "TODO: Optimize this one avoiding the trampoline"
+ oop ~= Arg0Reg ifTrue: [cogit MoveR: oop R: Arg0Reg ].
- oop ~= ReceiverResultReg ifTrue: [cogit MoveR: oop R: ReceiverResultReg ].
  cogit CallRT: ceByteSizeOfTrampoline.
 
  cogit MoveR: TempReg R: resultRegister.
  cogit ssPushNativeRegister: resultRegister.!

Item was changed:
  ----- Method: CogObjectRepresentation>>genLcInstantiateOop:constantIndexableSize: (in category 'inline primitive support') -----
  genLcInstantiateOop: classOop constantIndexableSize: indexableSize
  <option: #LowcodeVM>
+ classOop ~= Arg0Reg ifTrue: [cogit MoveR: classOop R: Arg0Reg].
+ cogit MoveCq: indexableSize R: Arg1Reg.
- classOop ~= ReceiverResultReg ifTrue: [cogit MoveR: classOop R: ReceiverResultReg].
- cogit MoveCq: indexableSize R: Arg0Reg.
  cogit CallRT: ceInstantiateClassIndexableSizeTrampoline.
 
  cogit MoveR: TempReg R: classOop.
  cogit ssPushRegister: classOop.!

Item was changed:
  ----- Method: CogObjectRepresentation>>genLcInstantiateOop:indexableSize: (in category 'inline primitive support') -----
  genLcInstantiateOop: classOop indexableSize: indexableSize
  <option: #LowcodeVM>
+ classOop ~= Arg0Reg ifTrue: [
+ indexableSize = Arg0Reg ifTrue: [
- classOop ~= ReceiverResultReg ifTrue: [
- indexableSize = ReceiverResultReg ifTrue: [
  cogit MoveR: indexableSize R: TempReg.
  ].
+ cogit MoveR: classOop R: Arg0Reg
- cogit MoveR: classOop R: ReceiverResultReg
  ].
 
+ indexableSize ~= Arg1Reg ifTrue: [
+ indexableSize = Arg0Reg ifTrue: [
+ cogit MoveR: TempReg R: Arg1Reg.
- indexableSize ~= Arg0Reg ifTrue: [
- indexableSize = ReceiverResultReg ifTrue: [
- cogit MoveR: TempReg R: Arg0Reg.
  ] ifFalse: [
+ cogit MoveR: indexableSize R: Arg1Reg.
- cogit MoveR: indexableSize R: Arg0Reg.
  ]
  ].
 
  cogit CallRT: ceInstantiateClassIndexableSizeTrampoline.
 
  cogit MoveR: TempReg R: classOop.
  cogit ssPushRegister: classOop.!

Item was changed:
  ----- Method: CogObjectRepresentation>>genLcPointerToOop:class: (in category 'inline primitive support') -----
  genLcPointerToOop: pointer class: pointerClass
  <option: #LowcodeVM>
  cogit PushR: pointer.
+ cogit annotate: (cogit MoveCw: pointerClass R: Arg0Reg) objRef: pointerClass.
+ cogit MoveCq: BytesPerOop R: Arg1Reg.
- cogit annotate: (cogit MoveCw: pointerClass R: ReceiverResultReg) objRef: pointerClass.
- cogit MoveCq: BytesPerOop R: Arg0Reg.
  cogit CallRT: ceInstantiateClassIndexableSizeTrampoline.
 
  cogit PopR: pointer.
  cogit MoveR: pointer Mw: BaseHeaderSize r: TempReg.
 
  cogit MoveR: TempReg R: pointer.
  cogit ssPushRegister: pointer.!

Item was changed:
  ----- Method: CogObjectRepresentation>>genSmallIntegerComparison:orDoubleComparison:invert: (in category 'primitive generators') -----
  genSmallIntegerComparison: jumpOpcode orDoubleComparison: jumpFPOpcodeGenerator invert: invertComparison
  "Stack looks like
  return address"
  | jumpNonInt jumpFail jumpCond r |
+ <var: #jumpFPOpcodeGenerator declareC: 'AbstractInstruction * NoDbgRegParms (*jumpFPOpcodeGenerator)(void *)'>
- <var: #jumpFPOpcodeGenerator declareC: 'AbstractInstruction *(*jumpFPOpcodeGenerator)(void *)'>
  <var: #jumpNonInt type: #'AbstractInstruction *'>
  <var: #jumpCond type: #'AbstractInstruction *'>
  <var: #jumpFail type: #'AbstractInstruction *'>
  r := self genSmallIntegerComparison: jumpOpcode.
  r < 0 ifTrue:
  [^r].
  self cppIf: #DPFPReg0 defined ifTrue:
  "Fall through on non-SmallInteger argument.  Argument may be a Float : let us check or fail"
  [self smallIntegerIsOnlyImmediateType ifFalse:
  [jumpNonInt := self genJumpImmediate: Arg0Reg].
  self genGetCompactClassIndexNonImmOf: Arg0Reg into: SendNumArgsReg.
  self genCmpClassFloatCompactIndexR: SendNumArgsReg.
  jumpFail := cogit JumpNonZero: 0.
 
  "It was a Float, so convert the receiver to double and perform the operation"
  self genConvertSmallIntegerToIntegerInReg: ReceiverResultReg.
  cogit ConvertR: ReceiverResultReg Rd: DPFPReg0.
  self genGetDoubleValueOf: Arg0Reg into: DPFPReg1.
  invertComparison "May need to invert for NaNs"
  ifTrue: [cogit CmpRd: DPFPReg0 Rd: DPFPReg1]
  ifFalse: [cogit CmpRd: DPFPReg1 Rd: DPFPReg0].
  jumpCond := cogit perform: jumpFPOpcodeGenerator with: 0. "FP jumps are a little weird"
  cogit genMoveFalseR: ReceiverResultReg.
  cogit genPrimReturn.
  jumpCond jmpTarget: (cogit genMoveTrueR: ReceiverResultReg).
  cogit genPrimReturn.
 
  self smallIntegerIsOnlyImmediateType
  ifTrue: [jumpFail jmpTarget: cogit Label]
  ifFalse: [jumpNonInt jmpTarget: (jumpFail jmpTarget: cogit Label)]].
  ^CompletePrimitive!

Item was changed:
  ----- Method: CogObjectRepresentation>>generateLowcodeObjectTrampolines (in category 'initialization') -----
  generateLowcodeObjectTrampolines
  <option: #LowcodeVM>
  ceFloatObjectOfTrampoline := cogit genTrampolineFor: #floatObjectOf:
  called: 'ceFloatObjectOfTrampoline'
  floatArg: DPFPReg0
  result: TempReg.
  ceFloatValueOfTrampoline := cogit genTrampolineFor: #floatValueOf:
  called: 'ceFloatValueOfTrampoline'
  arg: ReceiverResultReg
  floatResult: DPFPReg0.
  ceInstantiateClassIndexableSizeTrampoline := cogit genTrampolineFor: #instantiateClass:indexableSize:
  called: 'ceInstantiateClassIndexableSizeTrampoline'
- arg: ReceiverResultReg
  arg: Arg0Reg
+ arg: Arg1Reg
  result: TempReg.
  ceInstantiateClassTrampoline := cogit genTrampolineFor: #instantiateClass:indexableSize:
  called: 'ceInstantiateClassTrampoline'
  arg: ReceiverResultReg
  arg: 0
  result: TempReg.
  ceByteSizeOfTrampoline := cogit genTrampolineFor: #byteSizeOf:
  called: 'ceByteSizeOfTrampoline'
- arg: ReceiverResultReg
  arg: Arg0Reg
  result: TempReg.
  BytesPerOop = 4 ifTrue: [
  cePositive64BitIntegerTrampoline := cogit genTrampolineFor: #positive64BitIntegerFor:
  called: 'cePositive64BitIntegerTrampoline'
  arg: ReceiverResultReg
  arg: Arg0Reg
  result: TempReg.
  cePositive64BitValueOfTrampoline := cogit genTrampolineFor: #positive64BitValueOf:
  called: 'cePositive64BitValueOfTrampoline'
  arg: ReceiverResultReg
  result: TempReg
  result: Arg0Reg.
  ceSigned64BitIntegerTrampoline := cogit genTrampolineFor: #signed64BitIntegerFor:
  called: 'ceSigned64BitIntegerTrampoline'
  arg: ReceiverResultReg
  arg: Arg0Reg
  result: TempReg.
  ceSigned64BitValueOfTrampoline := cogit genTrampolineFor: #signed64BitValueOf:
  called: 'ceSigned64BitValueOfTrampoline'
  arg: ReceiverResultReg
  result: TempReg
  result: Arg0Reg.
  ] ifFalse: [
  cePositive64BitIntegerTrampoline := cogit genTrampolineFor: #positive64BitIntegerFor:
  called: 'cePositive64BitIntegerTrampoline'
  arg: ReceiverResultReg
  result: TempReg.
  cePositive64BitValueOfTrampoline := cogit genTrampolineFor: #positive64BitValueOf:
  called: 'cePositive64BitValueOfTrampoline'
  arg: ReceiverResultReg
  result: TempReg.
  ceSigned64BitIntegerTrampoline := cogit genTrampolineFor: #signed64BitIntegerFor:
  called: 'ceSigned64BitIntegerTrampoline'
  arg: ReceiverResultReg
  result: TempReg.
  ceSigned64BitValueOfTrampoline := cogit genTrampolineFor: #signed64BitValueOf:
  called: 'ceSigned64BitValueOfTrampoline'
  arg: ReceiverResultReg
  result: TempReg.
  ]!

Item was changed:
  ----- Method: CogObjectRepresentationFor32BitSpur class>>numTrampolines (in category 'accessing') -----
  numTrampolines
+ ^ super numTrampolines + (LowcodeVM ifTrue: [4] ifFalse: [0])!
- ^ super numTrampolines + 4 "lowcode"!

Item was changed:
  ----- Method: CogObjectRepresentationForSpur class>>numTrampolines (in category 'accessing') -----
  numTrampolines
  ^super numTrampolines
  + (SistaV1BytecodeSet
  ifTrue: [8] "(small,large)x(method,block,fullBlock) context creation,
  ceStoreCheckContextReceiverTrampoline and ceScheduleScavengeTrampoline"
  ifFalse: [6] "(small,large)x(method,block) context creation,
  ceStoreCheckContextReceiverTrampoline and ceScheduleScavengeTrampoline")
+ + NumStoreTrampolines "FIXME: the generated C code does not take into account whether IMMUTABILITY is defined to one or zero"
+ "((initializationOptions at: #IMMUTABILITY ifAbsent: [false])
- + ((initializationOptions at: #IMMUTABILITY ifAbsent: [false])
  ifTrue: [NumStoreTrampolines]
+ ifFalse: [0])"!
- ifFalse: [0])!

Item was changed:
  ----- Method: CogObjectRepresentationForSpur>>generateObjectRepresentationTrampolines (in category 'initialization') -----
  generateObjectRepresentationTrampolines
  "Do the store check.  Answer the argument for the benefit of the code generator;
  ReceiverResultReg may be caller-saved and hence smashed by this call.  Answering
  it allows the code generator to reload ReceiverResultReg cheaply.
  In Spur the only thing we leave to the run-time is adding the receiver to the
  remembered set and setting its isRemembered bit."
  self
  cppIf: IMMUTABILITY
  ifTrue:
  [self cCode: [] inSmalltalk:
  [ceStoreTrampolines := CArrayAccessor on: (Array new: NumStoreTrampolines)].
  0 to: NumStoreTrampolines - 1 do:
  [:instVarIndex |
  ceStoreTrampolines
  at: instVarIndex
  put: (self
  genStoreTrampolineCalled: (cogit
  trampolineName: 'ceStoreTrampoline'
  numArgs: instVarIndex
  limit: NumStoreTrampolines - 2)
  instVarIndex: instVarIndex)]].
  ceStoreCheckTrampoline := self genStoreCheckTrampoline.
  ceStoreCheckContextReceiverTrampoline := self genStoreCheckContextReceiverTrampoline.
  ceScheduleScavengeTrampoline := cogit
  genTrampolineFor: #ceScheduleScavenge
  called: 'ceScheduleScavengeTrampoline'
  regsToSave: CallerSavedRegisterMask.
  ceSmallActiveContextInMethodTrampoline := self genActiveContextTrampolineLarge: false inBlock: 0 called: 'ceSmallMethodContext'.
  ceSmallActiveContextInBlockTrampoline := self genActiveContextTrampolineLarge: false inBlock: InVanillaBlock called: 'ceSmallBlockContext'.
  SistaV1BytecodeSet ifTrue:
  [ceSmallActiveContextInFullBlockTrampoline := self genActiveContextTrampolineLarge: false inBlock: InFullBlock called: 'ceSmallFullBlockContext'].
  ceLargeActiveContextInMethodTrampoline := self genActiveContextTrampolineLarge: true inBlock: 0 called: 'ceLargeMethodContext'.
  ceLargeActiveContextInBlockTrampoline := self genActiveContextTrampolineLarge: true inBlock: InVanillaBlock called: 'ceLargeBlockContext'.
  SistaV1BytecodeSet ifTrue:
  [ceLargeActiveContextInFullBlockTrampoline := self genActiveContextTrampolineLarge: true inBlock: InFullBlock called: 'ceLargeFullBlockContext'].
 
  LowcodeVM ifTrue: [ self generateLowcodeObjectTrampolines ]!

Item was changed:
  ----- Method: CogSimStackNativeEntry>>stackSpillSize (in category 'accessing') -----
  stackSpillSize
  <returnTypeC: #sqInt>
  type caseOf: {
  [SSConstantInt64] -> [ ^ 8 ].
  [SSConstantFloat64] -> [ ^ 8 ].
  [SSRegisterDoubleFloat] -> [ ^ 8 ].
  [SSRegisterPair] -> [ ^ 8 ].
  [SSSpillFloat64] -> [ ^ 8 ].
  [SSSpillInt64] -> [ ^ 8 ].
+ } otherwise: [^ BytesPerOop ].
+ ^ 0!
- } otherwise: [^ BytesPerOop ]!

Item was changed:
  ----- Method: Cogit class>>numTrampolines (in category 'accessing') -----
  numTrampolines
+ ^38 "30 + 4 each for self and super sends" + (LowcodeVM ifTrue: [1] ifFalse: [0])
- ^38 "30 + 4 each for self and super sends"
 
  "self withAllSubclasses collect: [:c| {c. (c instVarNames select: [:ea| ea beginsWith: 'ce']) size}]"!

Item was changed:
  ----- Method: Cogit>>cogMNUPICSelector:receiver:methodOperand:numArgs: (in category 'in-line cacheing') -----
  cogMNUPICSelector: selector receiver: rcvr methodOperand: methodOperand numArgs: numArgs
  <api>
  "Attempt to create a one-case PIC for an MNU.
  The tag for the case is at the send site and so doesn't need to be generated."
  <returnTypeC: #'CogMethod *'>
  | startAddress |
  ((objectMemory isYoung: selector)
  or: [(objectRepresentation inlineCacheTagForInstance: rcvr) = self picAbortDiscriminatorValue]) ifTrue:
  [^0].
  coInterpreter
  compilationBreak: selector
  point: (objectMemory numBytesOf: selector)
  isMNUCase: true.
  self assert: endCPICCase0 notNil.
  "get memory in the code zone for the CPIC; if that fails we return an error code for the sender to use to work out how to blow up"
  startAddress := methodZone allocate: closedPICSize.
  startAddress = 0 ifTrue:
  [coInterpreter callForCogCompiledCodeCompaction.
  ^0].
 
  "memcpy the prototype across to our allocated space; because anything else would be silly"
+ objectMemory
+ mem: (self cCoerceSimple: startAddress to: #'CogMethod *')
+ cp: (self cCoerceSimple: cPICPrototype to: #'CogMethod *')
+ y: closedPICSize.
- objectMemory mem: startAddress cp: cPICPrototype y: closedPICSize.
 
  self configureMNUCPIC: (self cCoerceSimple: startAddress to: #'CogMethod *')
  methodOperand: methodOperand
  numArgs: numArgs
  delta: startAddress - cPICPrototype.
 
  ^self
  fillInCPICHeader: (self cCoerceSimple: startAddress to: #'CogMethod *')
  numArgs: numArgs
  numCases: 1
  hasMNUCase: true
  selector: selector !

Item was changed:
  ----- Method: Cogit>>cogPICSelector:numArgs:Case0Method:Case1Method:tag:isMNUCase: (in category 'in-line cacheing') -----
  cogPICSelector: selector numArgs: numArgs Case0Method: case0CogMethod Case1Method: case1MethodOrNil tag: case1Tag isMNUCase: isMNUCase
  "Attempt to create a two-case PIC for case0CogMethod and  case1Method,case1Tag.
  The tag for case0CogMethod is at the send site and so doesn't need to be generated.
  case1Method may be any of
  - a Cog method; link to its unchecked entry-point
  - a CompiledMethod; link to ceInterpretMethodFromPIC:
  - a CompiledMethod; link to ceMNUFromPICMNUMethod:receiver:"
  <var: #case0CogMethod type: #'CogMethod *'>
  <returnTypeC: #'CogMethod *'>
  | startAddress |
  (objectMemory isYoung: selector) ifTrue:
  [^self cCoerceSimple: YoungSelectorInPIC to: #'CogMethod *'].
  coInterpreter
  compilationBreak: selector
  point: (objectMemory numBytesOf: selector)
  isMNUCase: isMNUCase.
 
  "get memory in the code zone for the CPIC; if that fails we return an error code for the sender to use to work out how to blow up"
  startAddress := methodZone allocate: closedPICSize.
  startAddress = 0 ifTrue:
  [^self cCoerceSimple: InsufficientCodeSpace to: #'CogMethod *'].
 
  "memcpy the prototype across to our allocated space; because anything else would be silly"
+ objectMemory
+ mem: (self cCoerceSimple: startAddress to: #'CogMethod *')
+ cp: (self cCoerceSimple: cPICPrototype to: #'CogMethod *')
+ y: closedPICSize.
- objectMemory mem: startAddress cp: cPICPrototype y: closedPICSize.
 
  self configureCPIC: (self cCoerceSimple: startAddress to: #'CogMethod *')
  Case0: case0CogMethod
  Case1Method: case1MethodOrNil
  tag: case1Tag
  isMNUCase: isMNUCase
  numArgs: numArgs
  delta: startAddress - cPICPrototype .
 
  ^self
  fillInCPICHeader: (self cCoerceSimple: startAddress to: #'CogMethod *')
  numArgs: numArgs
  numCases: 2
  hasMNUCase: isMNUCase
  selector: selector !

Item was changed:
  ----- Method: Cogit>>generateRunTimeTrampolines (in category 'initialization') -----
  generateRunTimeTrampolines
  "Generate the run-time entries at the base of the native code zone and update the base."
 
  ceSendMustBeBooleanAddFalseTrampoline := self genMustBeBooleanTrampolineFor: objectMemory falseObject
  called: 'ceSendMustBeBooleanAddFalseTrampoline'.
  ceSendMustBeBooleanAddTrueTrampoline := self genMustBeBooleanTrampolineFor: objectMemory trueObject
  called: 'ceSendMustBeBooleanAddTrueTrampoline'.
  ceNonLocalReturnTrampoline := self genNonLocalReturnTrampoline.
  ceCheckForInterruptTrampoline := self genCheckForInterruptsTrampoline.
  "Neither of the context inst var access trampolines save registers.  Their operation could cause
  arbitrary update of stack frames, so the assumption is that callers flush the stack before calling
  the context inst var access trampolines, and that everything except the result is dead afterwards."
  ceFetchContextInstVarTrampoline := self genTrampolineFor: #ceContext:instVar:
  called: 'ceFetchContextInstVarTrampoline'
  arg: ReceiverResultReg
  arg: SendNumArgsReg
  result: SendNumArgsReg.
  ceStoreContextInstVarTrampoline := self genTrampolineFor: #ceContext:instVar:value:
  called: 'ceStoreContextInstVarTrampoline'
  arg: ReceiverResultReg
  arg: SendNumArgsReg
  arg: ClassReg
  result: ReceiverResultReg. "to keep ReceiverResultReg live.".
  ceCannotResumeTrampoline := self genTrampolineFor: #ceCannotResume
  called: 'ceCannotResumeTrampoline'.
  "These two are unusual; they are reached by return instructions."
  ceBaseFrameReturnTrampoline := self genReturnTrampolineFor: #ceBaseFrameReturn:
  called: 'ceBaseFrameReturnTrampoline'
  arg: ReceiverResultReg.
  ceReturnToInterpreterTrampoline := self
  genReturnTrampolineFor: #ceReturnToInterpreter:
  called: 'ceReturnToInterpreterTrampoline'
  arg: ReceiverResultReg.
  ceMallocTrampoline := self genTrampolineFor: #ceMalloc:
  called: 'ceMallocTrampoline'
  arg: ReceiverResultReg
  result: TempReg.
  ceFreeTrampoline := self genTrampolineFor: #ceFree:
  called: 'ceFreeTrampoline'
  arg: ReceiverResultReg.
  LowcodeVM ifTrue: [
  ceFFICalloutTrampoline := self genFFICalloutTrampoline.
  ]!

Item was changed:
  ----- Method: VMMaker class>>generateSqueakSpurLowcodeCogVM (in category 'configurations') -----
  generateSqueakSpurLowcodeCogVM
  "No primitives since we can use those for the Cog VM"
  ^VMMaker
  generate: CoInterpreter
  and: StackToRegisterMappingCogit
  with: #(ObjectMemory Spur32BitCoMemoryManager
  SistaVM true
          LowcodeVM true
  MULTIPLEBYTECODESETS true
  bytecodeTableInitializer initializeBytecodeTableForSqueakV3PlusClosuresSistaV1Hybrid)
  to: (FileDirectory default pathFromURI: self sourceTree, '/spurlowcodesrc')
  platformDir: (FileDirectory default pathFromURI: self sourceTree, '/platforms')
  including:#()!

Loading...