[Vm-dev] VM Maker: VMMaker.oscog-eem.252.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed Jan 9 02:13:05 UTC 2013
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.252.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.252
Author: eem
Time: 8 January 2013, 6:08:27.042 pm
UUID: 50d6c392-d32d-49a5-9251-32ad9c299572
Ancestors: VMMaker.oscog-eem.251
Issue 117. Fix primitiveRemLargeIntegers.
The result should be negated iff receiver negative.
=============== Diff against VMMaker.oscog-eem.251 ===============
Item was changed:
----- Method: InterpreterPrimitives>>primitiveRemLargeIntegers (in category 'arithmetic largeint primitives') -----
primitiveRemLargeIntegers
"Primitive arithmetic operations for large integers in 64 bit range"
+ | result oopResult a aIsNegative b oopArg oopRcvr |
- | result oopResult a aIsNegative b bIsNegative oopArg oopRcvr |
<export: true>
<var: 'a' type: 'usqLong'>
<var: 'b' type: 'usqLong'>
<var: 'result' type: 'usqLong'>
oopArg := self stackValue: 0.
oopRcvr := self stackValue: 1.
aIsNegative := self isNegativeIntegerValueOf: oopRcvr.
- bIsNegative := self isNegativeIntegerValueOf: oopArg.
a := self magnitude64BitValueOf: oopRcvr.
b := self magnitude64BitValueOf: oopArg.
b = 0 ifTrue:[self primitiveFail].
self successful ifFalse:[^nil].
result := a \\ b.
+ oopResult := self magnitude64BitIntegerFor: result neg: aIsNegative.
- oopResult := self magnitude64BitIntegerFor: result neg: aIsNegative ~= bIsNegative.
self successful ifTrue: [self pop: 2 thenPush: oopResult].!
More information about the Vm-dev
mailing list