Skip to content

Commit

Permalink
Fixing addresses to support addreses of 64bits in the stack
Browse files Browse the repository at this point in the history
  • Loading branch information
tesonep committed Apr 25, 2022
1 parent 66c9ac5 commit a9a9081
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 23 deletions.
10 changes: 0 additions & 10 deletions smalltalksrc/VMMaker/CogVMSimulator.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -3117,13 +3117,3 @@ CogVMSimulator >> windowIsClosing [
on: BlockCannotReturn
do: [:ex|]] "Cause return from #test, et al"
]

{ #category : #'frame access' }
CogVMSimulator >> withoutSmallIntegerTags: anInteger [
self assert: (anInteger >= 0 and: [anInteger highBit <= 32]).
^(anInteger bitAnd: 16r80000000) ~= 0
ifTrue: ["negative"
(anInteger bitAnd: 16r7FFFFFFE) - 16r80000000]
ifFalse: ["positive"
anInteger - 1]
]
3 changes: 2 additions & 1 deletion smalltalksrc/VMMaker/Cogit.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -8575,11 +8575,12 @@ Cogit >> handleCallOrJumpSimulationTrap: aProcessorSimulationTrap [
Cogit >> handleReadSimulationTrap: aProcessorSimulationTrap [
<doNotGenerate>
| variableValue accessor |
variableValue := (simulatedVariableGetters at: aProcessorSimulationTrap address) value asInteger.
accessor := aProcessorSimulationTrap registerAccessor.
processor
perform: accessor
with: variableValue signedIntToLong.
with: variableValue.
accessor ~~ #pc: ifTrue:
[processor pc: aProcessorSimulationTrap nextpc]
]
Expand Down
12 changes: 0 additions & 12 deletions smalltalksrc/VMMaker/StackInterpreterSimulator.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2476,15 +2476,3 @@ StackInterpreterSimulator >> windowIsClosing [
on: BlockCannotReturn
do: [:ex|]] "Cause return from #test, et al"
]

{ #category : #'frame access' }
StackInterpreterSimulator >> withoutSmallIntegerTags: anInteger [
| signBit |
self assert: (anInteger >= 0 and: [anInteger highBit <= (objectMemory wordSize * 8)]).
signBit := 1 << (objectMemory wordSize * 8 - 1).
^(anInteger bitAnd: signBit) ~= 0
ifTrue: ["negative"
(anInteger bitClear: signBit + 1) - signBit]
ifFalse: ["positive"
anInteger - 1]
]
12 changes: 12 additions & 0 deletions smalltalksrc/VMMaker/TVMSimulator.trait.st
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,15 @@ TVMSimulator >> openOn: fileName extraMemory: extraBytes [
^ self imageReader readImageNamed: fileName

]

{ #category : #'frame access' }
TVMSimulator >> withoutSmallIntegerTags: anInteger [
| signBit |
self assert: (anInteger >= 0 and: [anInteger highBit <= (self objectMemory wordSize * 8)]).
signBit := 1 << (self objectMemory wordSize * 8 - 1).
^(anInteger bitAnd: signBit) ~= 0
ifTrue: ["negative"
(anInteger bitClear: signBit + 1) - signBit]
ifFalse: ["positive"
anInteger - 1]
]

0 comments on commit a9a9081

Please sign in to comment.