[Vm-dev] VM Maker: VMMaker.oscog-eem.1426.mcz
commits at source.squeak.org
commits at source.squeak.org
Sat Jul 18 20:56:30 UTC 2015
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.1426.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.1426
Author: eem
Time: 18 July 2015, 1:54:29.051 pm
UUID: 94ab92ba-c5c4-4953-8566-a4cd9c38df1f
Ancestors: VMMaker.oscog-eem.1425
Fix at least one set of 64-bit issues caused by Slang. In particular the integerObjectOf: code resulted in (objectMemory integerObjectOf: MillisecondClockMask) evaluating to the -1 object, instead of the 16r1FFFFFFF object, which was the cause of the initially nresponsive 64-bit image on the real VM (no problem in the simulator).
=============== Diff against VMMaker.oscog-eem.1425 ===============
Item was changed:
----- Method: CCodeGenerator>>generateIntegerObjectOf:on:indent: (in category 'C translation') -----
generateIntegerObjectOf: msgNode on: aStream indent: level
"Generate the C code for this message onto the given stream."
+ | expr castToSqint |
+ expr := msgNode args first.
+ aStream nextPutAll: '(('.
+ "Note that the default type of an integer constant in C is int. Hence we /must/
+ cast constants to long if in the 64-bit world, since e.g. in 64-bits
+ (int)(16r1FFFFF << 3) = (int)16rFFFFFFF8 = -8
+ whereas
+ (long)(16r1FFFFF << 3) = (long) 16rFFFFFFF8 = 4294967288."
+ castToSqint := expr isConstant and: [vmClass isNil or: [vmClass objectMemoryClass wordSize = 8]].
+ castToSqint ifTrue:
+ [aStream nextPutAll: '(sqInt)'].
+ self emitCExpression: expr on: aStream.
-
aStream
- nextPutAll: '(('.
- self emitCExpression: msgNode args first on: aStream.
- aStream
nextPutAll: ' << ';
print: vmClass objectMemoryClass numSmallIntegerTagBits;
nextPutAll: ') | 1)'!
More information about the Vm-dev
mailing list