[Vm-dev] VM Maker: VMMaker.oscog-eem.1007.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Jan 1 21:41:13 UTC 2015


Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.1007.mcz

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

Name: VMMaker.oscog-eem.1007
Author: eem
Time: 1 January 2015, 1:38:43.854 pm
UUID: 5ab9382c-cd68-43ef-a5e4-0c107083d0c6
Ancestors: VMMaker.oscog-eem.1006

...and use a signed shift for the 64-bit Spur
loadFloatOrIntFrom: check.

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

Item was changed:
  ----- Method: Spur64BitMemoryManager>>loadFloatOrIntFrom: (in category 'interpreter access') -----
  loadFloatOrIntFrom: floatOrIntOop
  	"If floatOrInt is an integer, then convert it to a C double float and return it.
  	 If it is a Float, then load its value and return it.
  	 Otherwise fail -- ie return with primErrorCode non-zero."
  
  	<inline: true>
  	<returnTypeC: #double>
  	| result tagBits shift |
  	<var: #result type: #double>
  
  	(tagBits := floatOrIntOop bitAnd: self tagMask) ~= 0
  		ifTrue:
  			[tagBits = self smallFloatTag ifTrue:
  				[^self smallFloatValueOf: floatOrIntOop].
  			 (tagBits = self smallIntegerTag
  			  and: [shift := 64 - self numTagBits - self smallFloatMantissaBits.
  				(self cCode: [floatOrIntOop << shift]
+ 						inSmalltalk: [floatOrIntOop << shift bitAnd: 1 << 64 - 1]) >>> shift = floatOrIntOop]) ifTrue:
- 						inSmalltalk: [floatOrIntOop << shift bitAnd: 1 << 64 - 1]) >> shift = floatOrIntOop]) ifTrue:
  				[^(self integerValueOf: floatOrIntOop) asFloat]]
  		ifFalse:
  			[(self classIndexOf: floatOrIntOop) = ClassFloatCompactIndex ifTrue:
  				[self cCode: '' inSmalltalk: [result := Float new: 2].
  				 self fetchFloatAt: floatOrIntOop + self baseHeaderSize into: result.
  				 ^result]].
  	coInterpreter primitiveFail.
  	^0.0!



More information about the Vm-dev mailing list