Skip to content

Commit

Permalink
VMMaker.oscog-nice.1973 Fix bug OpenSmalltalk/opensmalltalk-vm#23
Browse files Browse the repository at this point in the history
ioGetClockLogSizeUsecsIdxMsecsIdx prototype is not 64bits compatible

The problem is in primitiveClockLogAddresses for which type inference for #runInNOut result into an int.
But ioGetClockLogSizeUsecsIdxMsecsIdx expect a pointer on a sqInt, not a pointer on an int as first parameter.
Workaround by explicitely decalring #runInNOut as sqInt.

The fix is in oscogLLP64 branch (http://smalltalkhub.com/mc/nice/NiceVMExperiments/main) since VMMaker.oscogLLP64-nice.1915, Time: 29 July 2016, 12:36:23.284336 am
  • Loading branch information
nicolas-cellier-aka-nice committed Nov 1, 2016
1 parent ca0eca2 commit c196515
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions smalltalksrc/VMMaker/InterpreterPrimitives.class.st
Expand Up @@ -1111,6 +1111,7 @@ InterpreterPrimitives >> primitiveClockLogAddresses [
| result runInNOut usecs uidx msecs midx v1 v2 |
<var: #usecs type: #'void *'>
<var: #msecs type: #'void *'>
<var: #runInNOut type: #sqInt> "bypass type inference which would deduce int"
argumentCount ~= 1 ifTrue:
[^self primitiveFail].
runInNOut := (self stackValue: 0) == objectMemory trueObject.
Expand Down

0 comments on commit c196515

Please sign in to comment.