Branch: refs/heads/virtend
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: 9e3995696cd8135addfa196426458bffb4abe5bb
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/9e3995696cd8135add…
Author: Eliot Miranda <eliot.miranda(a)gmail.com>
Date: 2022-10-02 (Sun, 02 Oct 2022)
Changed paths:
M building/macos32x86/common/Makefile.app
M building/macos64ARMv8/common/Makefile.app
M building/macos64x64/common/Makefile.app
M src/plugins/SqueakFFIPrims/ARM32FFIPlugin.c
M src/plugins/SqueakFFIPrims/ARM64AppleFFIPlugin.c
M src/plugins/SqueakFFIPrims/ARM64FFIPlugin.c
M src/plugins/SqueakFFIPrims/IA32FFIPlugin.c
A src/plugins/SqueakFFIPrims/RiscV64FFIPlugin.c
M src/plugins/SqueakFFIPrims/X64SysVFFIPlugin.c
M src/plugins/SqueakFFIPrims/X64Win64FFIPlugin.c
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.3253
Fix a regression in the FFI plugin from VMMaker.oscog-mt.3181. The type of
ffiIntegerValueOf: *must* be signed for e.g. float conversions to operate
correctly. The symptom of having ffiIntegerValueOf: unsigned is lime green
menu bars (top and bottom) in Virtend.
Reduce errors signing Mac executables by ignoring errors from
install_name_tool -add_rpath invocations.
Branch: refs/heads/Cog
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: 7c4c920ba9aa231ae0f923aa994f0df00ef57d0d
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/7c4c920ba9aa231ae0…
Author: Eliot Miranda <eliot.miranda(a)gmail.com>
Date: 2022-10-02 (Sun, 02 Oct 2022)
Changed paths:
M building/macos32x86/common/Makefile.app
M building/macos64ARMv8/common/Makefile.app
M building/macos64x64/common/Makefile.app
M src/plugins/SqueakFFIPrims/ARM32FFIPlugin.c
M src/plugins/SqueakFFIPrims/ARM64AppleFFIPlugin.c
M src/plugins/SqueakFFIPrims/ARM64FFIPlugin.c
M src/plugins/SqueakFFIPrims/IA32FFIPlugin.c
M src/plugins/SqueakFFIPrims/RiscV64FFIPlugin.c
M src/plugins/SqueakFFIPrims/X64SysVFFIPlugin.c
M src/plugins/SqueakFFIPrims/X64Win64FFIPlugin.c
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.3253
Fix a regression in the FFI plugin from VMMaker.oscog-mt.3181. The type of
ffiIntegerValueOf: *must* be signed for e.g. float conversions to operate
correctly. The symptom of having ffiIntegerValueOf: unsigned is lime green
menu bars (top and bottom) in Virtend.
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.3253.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.3253
Author: eem
Time: 2 October 2022, 7:49:57.1256 pm
UUID: 28effaaf-689b-4650-90e9-4c3534bffdd0
Ancestors: VMMaker.oscog-eem.3252
Fix a regression in the FFI plugin from VMMaker.oscog-mt.3181. The type of ffiIntegerValueOf: *must* be signed for e.g. float conversions to operate correctly. The symptom of having ffiIntegerValueOf: unsigned is lime green menu bars (top and bottom).
=============== Diff against VMMaker.oscog-eem.3252 ===============
Item was changed:
----- Method: ThreadedFFIPlugin>>ffiIntegerValueOf: (in category 'callout support') -----
ffiIntegerValueOf: oop
"Support for generic callout. Answer an integer value that is coerced as C would do."
<inline: true>
+ <returnTypeC: #sqLong> "Support up to int64_t or uint64_t, at least intptr_t; type *MUST* be signed for e.g. correct float conversion."
- <returnTypeC: #'usqLong'> "Support up to int64_t or uint64_t, at least intptr_t"
"Cheat with a tag test"
(oop anyMask: BytesPerWord - 1)
ifTrue:
+ [self cppIf: SPURVM
- [(interpreterProxy isIntegerObject: oop) ifTrue:
- [^interpreterProxy integerValueOf: oop].
- self cppIf: SPURVM
ifTrue:
+ [(interpreterProxy isIntegerObject: oop) ifTrue:
+ [^interpreterProxy integerValueOf: oop].
+ (interpreterProxy isCharacterObject: oop) ifTrue: "Immediate in Spur"
- [(interpreterProxy isCharacterObject: oop) ifTrue: "Immediate in Spur"
[^interpreterProxy characterValueOf: oop].
+ (BytesPerWord >= 8 and: [interpreterProxy isFloatObject: oop]) ifTrue: "Immediate in 64-bit Spur"
+ [^interpreterProxy floatValueOf: oop]]
+ ifFalse:
+ [^interpreterProxy integerValueOf: oop]] "only one kind of immediate in v3"
- (interpreterProxy isFloatObject: oop) ifTrue: "Immediate in 64-bit Spur"
- [^interpreterProxy floatValueOf: oop]]]
ifFalse:
[self cppIf: SPURVM
ifTrue: "No non-immediate characters in Spur"
[]
ifFalse:
[(interpreterProxy isCharacterObject: oop) ifTrue:
[^interpreterProxy characterValueOf: oop]].
(interpreterProxy isFloatObject: oop) ifTrue:
[^interpreterProxy floatValueOf: oop].
+ "In Squeak nil, true & false are always contiguous at the start of old space..."
+ (self oop: oop isGreaterThanOrEqualTo: interpreterProxy nilObject andLessThanOrEqualTo: interpreterProxy trueObject) ifTrue:
+ ["i.e. cheaper than but equivalent to:
+ oop = interpreterProxy nilObject ifTrue: [^0]. @@: should we really allow this????
+ oop = interpreterProxy falseObject ifTrue: [^0].
+ oop = interpreterProxy trueObject ifTrue: [^1]."
+ ^oop = interpreterProxy trueObject ifTrue: [1] ifFalse: [0]].
- oop = interpreterProxy nilObject ifTrue: [^0]. "@@: should we really allow this????"
- oop = interpreterProxy falseObject ifTrue: [^0].
- oop = interpreterProxy trueObject ifTrue: [^1].
(interpreterProxy isLargePositiveIntegerObject: oop) ifTrue:
[^interpreterProxy positive64BitValueOf: oop].
(interpreterProxy isLargeNegativeIntegerObject: oop) ifTrue:
[^interpreterProxy signed64BitValueOf: oop]].
^interpreterProxy signedMachineIntegerValueOf: oop "<- will fail if not integer"!
Item was added:
+ ----- Method: ThreadedFFIPlugin>>oop:isGreaterThanOrEqualTo:andLessThanOrEqualTo: (in category 'oop comparison') -----
+ oop: anOop isGreaterThanOrEqualTo: baseOop andLessThanOrEqualTo: limitOop
+ "Compare two oop values, treating them as object memory locations; i.e. use unsigned comparisons.
+ Use a macro, instead of #cCoerce:to: to provide fast simulation and inline code in conditionals,
+ since the inliner doesn't inline in condtionals.
+
+ Override (actually copy) to get around Slang limitations; VMClass is not one of the included classes for plugins; dunno why... eem 10/2/2022"
+ <cmacro: '(anOop,baseOop,limitOop) ((usqInt)(anOop) >= (usqInt)(baseOop) && (usqInt)(anOop) <= (usqInt)(limitOop))'>
+ ^anOop >= baseOop and: [anOop <= limitOop]!