Branch: refs/heads/Cog
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: 55c9a9d02670e0df1b4a199a1938c08620a6be1f
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/55c9a9d02670e0df1b…
Author: Eliot Miranda <eliot.miranda(a)gmail.com>
Date: 2023-03-28 (Tue, 28 Mar 2023)
Changed paths:
A platforms/Cross/plugins/ClipboardExtendedPlugin/ClipboardExtendedPlugin.h
R platforms/iOS/plugins/ClipboardExtendedPlugin/sqMacExtendedClipboard.h
M platforms/iOS/plugins/ClipboardExtendedPlugin/sqMacExtendedClipboard.m
M platforms/unix/plugins/ClipboardExtendedPlugin/sqUnixExtendedClipboard.c
M platforms/win32/plugins/ClipboardExtendedPlugin/sqWin32ExtendedClipboard.c
M src/plugins/ClipboardExtendedPlugin/ClipboardExtendedPlugin.c
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.3316
Bow to the inevitable and go with as traditional platforms/Cross style include
file for the ClipboardExtendedPlugin (int is not wide enough to hold an oop on
64-bits).
Harden the fetch functions on iOS and unix to check for out-of-memory.
The plugin now seems to work on unix but much work needs to be done to
platforms/unix/vm-display-x11/sqUnixX11.c because playing with e.g. firefox
shows that copying HTML text has no effect on the results passed up from
clipboardGetTypeNames et al.
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.3316.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.3316
Author: eem
Time: 28 March 2023, 1:17:00.948881 pm
UUID: 5216fdfa-1bd8-4f37-9cd1-7aba18a852db
Ancestors: VMMaker.oscog-eem.3315
Bow to the inevitable and go with as traditional platforms/Cross style include file for the ClipboardExtendedPlugin (int is not wide enough to hold an oop on 64-bits).
=============== Diff against VMMaker.oscog-eem.3315 ===============
Item was added:
+ ----- Method: ClipboardExtendedPlugin class>>hasHeaderFile (in category 'translation') -----
+ hasHeaderFile
+
+ ^true!
Item was removed:
- ----- Method: ClipboardExtendedPlugin class>>preambleCCode (in category 'translation') -----
- preambleCCode
- ^'// declarations for the support API. eem, 10/10/2022\\void sqPasteboardClear(void *inPasteboard);\sqInt sqPasteboardGetItemCount(void *inPasteboard);\sqInt sqPasteboardCopyItemFlavorsitemNumber(void *inPasteboard, sqInt formatNumber);\void *sqCreateClipboard(void);\void sqPasteboardPutItemFlavordatalengthformatTypeformatLength(void *inPasteboard, char *inData, sqInt dataLength, char *format, sqInt formatLength);\void sqPasteboardPutItemFlavordatalengthformatType(void *inPasteboard, char *inData, sqInt dataLength, sqInt format);\sqInt sqPasteboardCopyItemFlavorDataformatformatLength(void *inPasteboard, char *format, sqInt formatLength);\sqInt sqPasteboardCopyItemFlavorDataformat(void *inPasteboard, sqInt format);\sqInt sqPasteboardhasDataInFormatformatLength(void *inPasteboard, char *format, sqInt formatLength);\sqInt sqPasteboardhasDataInFormat(void *inPasteboard, sqInt format);' withCRs
-
- "quick test:"
- "ExtendedClipboardInterface current addClipboardDataConvertFormToPNG: Display"!
Branch: refs/heads/virtend
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: bbe4de3d5b4d3eada5d7461bc6ae1903bc3a1b5f
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/bbe4de3d5b4d3eada5…
Author: Eliot Miranda <eliot.miranda(a)gmail.com>
Date: 2023-03-28 (Tue, 28 Mar 2023)
Changed paths:
M src/plugins/SqueakFFIPrims/ARM64AppleFFIPlugin.c
M src/plugins/SqueakFFIPrims/ARM64FFIPlugin.c
M src/plugins/SqueakFFIPrims/RiscV64FFIPlugin.c
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.3315
Fix a regression in the ARM64 (non-Apple) and RISCV64 FFI plugins introduced
by VMMaker.oscog-eem.3309/VMMaker.oscog-eem.3310. I had forgot to push up
alignCurrentArgOf:to:
Branch: refs/heads/Cog
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: b958008a525aa3e46cf80747a00670abbe875540
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/b958008a525aa3e46c…
Author: Eliot Miranda <eliot.miranda(a)gmail.com>
Date: 2023-03-28 (Tue, 28 Mar 2023)
Changed paths:
M src/plugins/SqueakFFIPrims/ARM64AppleFFIPlugin.c
M src/plugins/SqueakFFIPrims/ARM64FFIPlugin.c
M src/plugins/SqueakFFIPrims/RiscV64FFIPlugin.c
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.3315
Fix a regression in the ARM64 (non-Apple) and RISCV64 FFI plugins introduced
by VMMaker.oscog-eem.3309/VMMaker.oscog-eem.3310. I had forgot to push up
alignCurrentArgOf:to:
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.3315.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.3315
Author: eem
Time: 28 March 2023, 11:19:04.757315 am
UUID: 9f1219c6-2ad5-4cb2-9e1d-572ad6ec934b
Ancestors: VMMaker.oscog-eem.3314
Fix a regression in the ARM64 (non-Apple) and RISCV64 FFI plugins introduced by VMMaker.oscog-eem.3309/VMMaker.oscog-eem.3310. I forgot to push up alignCurrentArgOf:to:
=============== Diff against VMMaker.oscog-eem.3314 ===============
Item was removed:
- ----- Method: ThreadedARM64AppleFFIPlugin>>alignCurrentArgOf:to: (in category 'marshalling') -----
- alignCurrentArgOf: calloutState to: boundary
- <var: #calloutState type: #'CalloutState *'>
- <inline: #always>
- | misAlignedBytes |
- misAlignedBytes := calloutState currentArg asInteger bitAnd: boundary - 1.
- misAlignedBytes ~= 0 ifTrue:
- [calloutState currentArg: calloutState currentArg + (boundary - misAlignedBytes)]!
Item was added:
+ ----- Method: ThreadedARM64FFIPlugin>>alignCurrentArgOf:to: (in category 'marshalling') -----
+ alignCurrentArgOf: calloutState to: boundary
+ <var: #calloutState type: #'CalloutState *'>
+ <inline: #always>
+ | misAlignedBytes |
+ misAlignedBytes := calloutState currentArg asInteger bitAnd: boundary - 1.
+ misAlignedBytes ~= 0 ifTrue:
+ [calloutState currentArg: calloutState currentArg + (boundary - misAlignedBytes)]!
Item was changed:
----- Method: ThreadedARM64FFIPlugin>>ffiPushStructure:ofSize:typeSpec:ofLength:in: (in category 'marshalling') -----
ffiPushStructure: pointer ofSize: structSize typeSpec: argSpec ofLength: argSpecSize in: calloutState
<var: #pointer type: #'void *'>
<var: #argSpec type: #'unsigned int *'>
<var: #calloutState type: #'CalloutState *'>
<inline: #always>
| availableRegisterSpace roundedSize |
"Stage B
B.1 If the argument type is a Composite Type whose size cannot be statically determined by both the caller
and the callee, the argument is copied to memory and the argument is replaced by a pointer to the copy.
(There are no such types in C/C++ but they exist in other languages or in language extensions).
B.2 If the argument type is an HFA or an HVA, then the argument is used unmodified.
B.3 If the argument type is a Composite Type that is larger than 16 bytes, then the argument is copied to
memory allocated by the caller and the argument is replaced by a pointer to the copy.
B.4 If the argument type is a Composite Type then the size of the argument is rounded up to the nearest
multiple of 8 bytes."
"See IHI0055B_aapcs64.pdf sections 4.3.5 & 5.4.2 Stage C"
(self structIsHomogenousFloatArrayOfSize: structSize typeSpec: argSpec ofLength: argSpecSize)
ifTrue:
[availableRegisterSpace := (NumFloatRegArgs - calloutState floatRegisterIndex) * self wordSize.
structSize <= availableRegisterSpace ifTrue: "Stage C, step C.2, all in floating-point registers (!!!!)"
[self
memcpy: (self cCoerceSimple: (self addressOf: (calloutState floatRegisters at: calloutState floatRegisterIndex)) to: #'void *')
_: pointer
_: structSize.
"Round structSize up and divide by 8 ( NB: _not_ 4 !!)"
calloutState floatRegisterIndex: calloutState floatRegisterIndex + (structSize + 7 bitShift: -3).
^0].
"Stage C, step C.3"
availableRegisterSpace := 0.
calloutState floatRegisterIndex: 8]
ifFalse:
[availableRegisterSpace := (NumIntRegArgs - calloutState integerRegisterIndex) * self wordSize].
"If it's small (16 bytes or less) and will fit in registers it is passed in registers, otherwise it is copied to memory.
If it is a Homogenous Short Vector (HVA) (up to 32 bytes long) and will fit it is passed in registers."
(structSize <= availableRegisterSpace "all in integer registers; we have no way of getting to SIMD registers"
and: [structSize <= 16
or: [self structIsHomogenousIntegerArrayOfSize: structSize typeSpec: argSpec ofLength: argSpecSize]]) ifTrue:
[structSize <= availableRegisterSpace ifTrue:"all in integer registers"
[self
memcpy: (self cCoerceSimple: (self addressOf: (calloutState integerRegisters at: calloutState integerRegisterIndex)) to: #'void *')
_: pointer
_: structSize.
"Round structSize up and divide by 8 ( NB: _not_ 4 !!)"
calloutState integerRegisterIndex: calloutState integerRegisterIndex + (structSize + 7 bitShift: -3).
^0]].
"If small and won't fit in registers, copy to the stack.
N.B. my (eem) reading of IHI0055B_aapcs64.pdf is that unlike the 32-bit PCS, aggregates are never split between memory and registers."
structSize <= 16 ifTrue:
[roundedSize := structSize + 7 bitClear: 7.
calloutState currentArg + roundedSize > calloutState limit ifTrue:
[^FFIErrorCallFrameTooBig].
+ self alignCurrentArgOf: calloutState to: self wordSize.
- self alignCurrentArgOf: calloutState to: 8.
self memcpy: calloutState currentArg _: pointer _: structSize.
calloutState currentArg: calloutState currentArg + roundedSize].
"If it is not small it is passed as a pointer. N.B. Spur guarantees only 8-byte alignment. IHI0055B_aapcs64.pdf is vague on the memory's alignment.
Arguably the memory should be pinned in case of a callback. Don't bother for now. eem 3/11/2023"
^self ffiPushPointer: pointer in: calloutState!
Branch: refs/heads/virtend
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: d0f7621b0aba127a41a9dade21c7af135dff5111
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/d0f7621b0aba127a41…
Author: Eliot Miranda <eliot.miranda(a)gmail.com>
Date: 2023-03-27 (Mon, 27 Mar 2023)
Changed paths:
M building/linux32/squeak.stack.spur/plugins.ext
M building/linux32ARMv6/squeak.cog.spur/plugins.ext
M building/linux32ARMv6/squeak.cog.v3/plugins.ext
M building/linux32ARMv6/squeak.stack.spur/plugins.ext
M building/linux32ARMv6/squeak.stack.v3/plugins.ext
M building/linux32x86/pharo.cog.spur.lowcode/plugins.ext
M building/linux32x86/pharo.cog.spur/plugins.ext
M building/linux32x86/pharo.sista.spur/plugins.ext
M building/linux32x86/pharo.stack.spur.lowcode/plugins.ext
M building/linux32x86/squeak.cog.spur/plugins.ext
M building/linux32x86/squeak.cog.v3/plugins.ext
M building/linux32x86/squeak.sista.spur/plugins.ext
M building/linux32x86/squeak.stack.spur/plugins.ext
M building/linux32x86/squeak.stack.v3/plugins.ext
M building/linux64/squeak.stack.spur/plugins.ext
M building/linux64ARMv8/squeak.cog.spur/plugins.ext
M building/linux64ARMv8/squeak.cogmt.spur/plugins.ext
M building/linux64ARMv8/squeak.stack.spur/plugins.ext
M building/linux64x64/pharo.cog.spur/plugins.ext
M building/linux64x64/squeak.cog.spur/plugins.ext
M building/linux64x64/squeak.stack.spur/plugins.ext
M platforms/unix/plugins/ClipboardExtendedPlugin/sqUnixExtendedClipboard.c
Log Message:
-----------
Fix a typo in sqUnixExtendedClipboard.c. Add ClipboardExtendedPlugin to the
non-newspeak linux builds.
Branch: refs/heads/Cog
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: 06e0b0b0947f0253a220419ed58b0970722830ff
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/06e0b0b0947f0253a2…
Author: Eliot Miranda <eliot.miranda(a)gmail.com>
Date: 2023-03-27 (Mon, 27 Mar 2023)
Changed paths:
M building/linux32/squeak.stack.spur/plugins.ext
M building/linux32ARMv6/squeak.cog.spur/plugins.ext
M building/linux32ARMv6/squeak.cog.v3/plugins.ext
M building/linux32ARMv6/squeak.stack.spur/plugins.ext
M building/linux32ARMv6/squeak.stack.v3/plugins.ext
M building/linux32x86/pharo.cog.spur.lowcode/plugins.ext
M building/linux32x86/pharo.cog.spur/plugins.ext
M building/linux32x86/pharo.sista.spur/plugins.ext
M building/linux32x86/pharo.stack.spur.lowcode/plugins.ext
M building/linux32x86/squeak.cog.spur/plugins.ext
M building/linux32x86/squeak.cog.v3/plugins.ext
M building/linux32x86/squeak.sista.spur/plugins.ext
M building/linux32x86/squeak.stack.spur/plugins.ext
M building/linux32x86/squeak.stack.v3/plugins.ext
M building/linux64/squeak.stack.spur/plugins.ext
M building/linux64ARMv8/squeak.cog.spur/plugins.ext
M building/linux64ARMv8/squeak.cogmt.spur/plugins.ext
M building/linux64ARMv8/squeak.stack.spur/plugins.ext
M building/linux64riscv/squeak.stack.spur/plugins.ext
M building/linux64x64/pharo.cog.spur/plugins.ext
M building/linux64x64/squeak.cog.spur/plugins.ext
M building/linux64x64/squeak.stack.spur/plugins.ext
M platforms/unix/plugins/ClipboardExtendedPlugin/sqUnixExtendedClipboard.c
Log Message:
-----------
Fix a typo in sqUnixExtendedClipboard.c. Add ClipboardExtendedPlugin to the
non-newspeak linux builds.
Hi All,
anyone have an ARM Windows laptop, eg with the snapdragon processor? If so, are you interested in attempting a port?
Eliot
_,,,^..^,,,_ (phone)