Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.1584.mcz ==================== Summary ==================== Name: VMMaker.oscog-eem.1584 Author: eem Time: 12 December 2015, 12:02:58.198 pm UUID: 389d59b6-a7df-41a2-b92d-5991f0a14575 Ancestors: VMMaker.oscog-eem.1583 Ghaahhh, Sensei just whacked me on the head again...why does Sensei keep doing that? =============== Diff against VMMaker.oscog-eem.1583 =============== Item was changed: ----- Method: CogInLineLiteralsX64Compiler>>sizePCDependentInstructionAt: (in category 'generate machine code') ----- sizePCDependentInstructionAt: eventualAbsoluteAddress "Size a jump and set its address. The target may be another instruction or an absolute address. On entry the address inst var holds our virtual address. On exit address is set to eventualAbsoluteAddress, which is where this instruction will be output. The span of a jump to a following instruction is therefore between that instruction's address and this instruction's address ((which are both still their virtual addresses), but the span of a jump to a preceding instruction or to an absolute address is between that instruction's address (which by now is its eventual absolute address) or absolute address and eventualAbsoluteAddress." | target maximumSpan abstractInstruction | <var: #abstractInstruction type: #'AbstractInstruction *'> opcode = AlignmentNops ifTrue: [| alignment | address := eventualAbsoluteAddress. alignment := operands at: 0. ^machineCodeSize := (eventualAbsoluteAddress + (alignment - 1) bitAnd: alignment negated) - eventualAbsoluteAddress]. self assert: self isJump. target := operands at: 0. abstractInstruction := cogit cCoerceSimple: target to: #'AbstractInstruction *'. (self isAnInstruction: abstractInstruction) ifTrue: [maximumSpan := abstractInstruction address - (((cogit abstractInstruction: self follows: abstractInstruction) ifTrue: [eventualAbsoluteAddress] ifFalse: [address]) + 2)] ifFalse: [maximumSpan := target - (eventualAbsoluteAddress + 2)]. address := eventualAbsoluteAddress. opcode >= FirstShortJump ifTrue: [machineCodeSize := (self isQuick: maximumSpan) ifTrue: [2] ifFalse: [opcode = Jump + ifTrue: [5] + ifFalse: [6]]] - ifTrue: [5]]] ifFalse: [machineCodeSize := opcode caseOf: { [JumpLong] -> [5]. [JumpFull] -> [12]. [JumpLongZero] -> [6]. [JumpLongNonZero] -> [6] }]. ^machineCodeSize "Slang can't inline the switch into the ifTrue:ifFalse: correctly"! |
> On 12-12-2015, at 8:03 PM, [hidden email] wrote: > > > Eliot Miranda uploaded a new version of VMMaker to project VM Maker: > http://source.squeak.org/VMMaker/VMMaker.oscog-eem.1584.mcz > > ==================== Summary ==================== > > Name: VMMaker.oscog-eem.1584 > Author: eem > Time: 12 December 2015, 12:02:58.198 pm > UUID: 389d59b6-a7df-41a2-b92d-5991f0a14575 > Ancestors: VMMaker.oscog-eem.1583 > > Ghaahhh, Sensei just whacked me on the head again...why does Sensei keep doing that? Because {whack} sensei {whack!} can {Whack!!} tim -- tim Rowledge; [hidden email]; http://www.rowledge.org/tim Useful Latin Phrases:- Furnulum pani nolo = I don't want a toaster. |
Free forum by Nabble | Edit this page |