[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] 481257: Regenerate source from VMMaker.oscog-nice.1981
GitHub
noreply at github.com
Sun Nov 13 12:55:22 UTC 2016
Branch: refs/heads/LLP64_v3
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: 4812579a48edf4637687db7590e312da8d2e23e8
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/4812579a48edf4637687db7590e312da8d2e23e8
Author: nicolas-cellier-aka-nice <nicolas.cellier.aka.nice at gmail.com>
Date: 2016-11-12 (Sat, 12 Nov 2016)
Changed paths:
M nsspur64src/vm/cogitX64.c
M nsspur64src/vm/cointerp.c
M nsspur64src/vm/cointerp.h
M nsspur64src/vm/gcc3x-cointerp.c
M nsspursrc/vm/cogitIA32.c
M nsspursrc/vm/cointerp.c
M nsspursrc/vm/cointerp.h
M nsspursrc/vm/gcc3x-cointerp.c
M nsspurstack64src/vm/gcc3x-interp.c
M nsspurstack64src/vm/interp.c
M nsspurstacksrc/vm/gcc3x-interp.c
M nsspurstacksrc/vm/interp.c
M spur64src/vm/cogitX64.c
M spur64src/vm/cointerp.c
M spur64src/vm/cointerp.h
M spur64src/vm/gcc3x-cointerp.c
M spursista64src/vm/cogitX64.c
M spursista64src/vm/cointerp.c
M spursista64src/vm/cointerp.h
M spursista64src/vm/gcc3x-cointerp.c
M spursistasrc/vm/cogitARMv5.c
M spursistasrc/vm/cogitIA32.c
M spursistasrc/vm/cogitMIPSEL.c
M spursistasrc/vm/cointerp.c
M spursistasrc/vm/cointerp.h
M spursistasrc/vm/gcc3x-cointerp.c
M spursrc/vm/cogitIA32.c
M spursrc/vm/cointerp.c
M spursrc/vm/cointerp.h
M spursrc/vm/gcc3x-cointerp.c
M spurstack64src/vm/gcc3x-interp.c
M spurstack64src/vm/interp.c
M spurstacksrc/vm/gcc3x-interp.c
M spurstacksrc/vm/interp.c
M src/plugins/GdbARMPlugin/GdbARMPlugin.c
M src/plugins/LargeIntegers/LargeIntegers.c
M src/plugins/SqueakFFIPrims/ARM32FFIPlugin.c
M src/plugins/SqueakFFIPrims/IA32FFIPlugin.c
M src/plugins/SqueakFFIPrims/X64SysVFFIPlugin.c
M src/plugins/SqueakFFIPrims/X64Win64FFIPlugin.c
M src/vm/cogitIA32.c
M src/vm/cointerp.c
M src/vm/cointerpmt.c
M src/vm/gcc3x-cointerp.c
M src/vm/gcc3x-cointerpmt.c
M stacksrc/vm/gcc3x-interp.c
M stacksrc/vm/interp.c
Log Message:
-----------
Regenerate source from VMMaker.oscog-nice.1981
This is just before the massive long->sqIntptr_t change for LLP64 compatibility.
This includes following VMMaker changes:
Improve portability to LLP64 by using usqInt rather than unsigned long where it makes sense.
It's not the case of integer containing target machine pointer that should use usqIntptr_t for the eventual future case when image wordSize differs from machine word size (32bits image on 64bits VM).
Currently, on Spur, LLP64 apart, usqInt and 'unsigned long' do match, and longAt: longAtPointer: in fact do return a sqInt (see platforms/cross/vm/sqMemory.h).
So for now:
- a single sista counter should fit into a usqInt.
- an immediate character fits into a usqInt.
- maxOldSpaceSize is not going to exeeed addressable space in the image, so it should allways fit into a usqInt too.
Also fix primitiveFFIIntegerAt and merge LLP64 fixes
Introduce sqIntptr_t and usqIntptr_t in VMMaker (image side) for LLP64 compatibility - but do not yet use them.
These are integers long enough to hold a target machine pointer (BytesPerWord).
These should later replace most usage of #long and #'unsigned long'.
They are already defined in sqMemoryAccess.h.
Add enough machinery for generating and simulating these types, inferring size, converting signedness etc....
Introduce asUnsignedIntegerPtr which will convert to (cast to) a usqIntptr_t.
same for asIntegerPtr -> sqIntptr_t.
They should replace most usage of asUnsignedLong and asLong in the future.
Unless we don't want a machine word, but an oop, in which case we should use asUnsignedInteger (-> usqInt) or asInteger (-> sqInt) (typically to turn a longAt: into an unsignedLongAt: - because longAt: answers a sqInt not a long!)
Restore the size of sqInt/usqInt as BytePerOop.
BytesPerOop matches BytesPerWord for Spur currently, but the CCodeGenerator should be Spur-agnostic if possible.
Move sqInt/usqInt check ahead in simulated sizeof: because most variables are of this type.
Fix shifting in ffiCreateIntegralResultOop:ofAtomicType:in: like already applied in primitiveFFIIntegerAt/Put
Properly count the parameters passed by register for X64 Win64: there are only 4 of them, either floating point or integer or any mix, but not 4 floating point and 4 integers.
Fix passing structure by value in X64 Win64: size must be a power of 2, and it's not possible to pass a 16bytes structure into two registers.
reportMinimumUnusedHeadroom with %lld format. That's superfluous in 32 bits, but does not hurt, and it works correctly in LLP64 contrarily to %ld. The alternative of using PRIdSQPTR macro would be overkill here.
Review usage of long/unsigned long type hints that should better be replaced with sqInt/usqInt because the intention is to handle a oop, not a target machine address.
Same with senders of asUnsignedLong, some should be replaced with asUnsignedInteger (that is a cast to usqInt), typically after longAt: because longAt: returns an oop (a sqInt).
Let #'sqIntptr_t' #'usqIntptr_t' types be "isFunctional" to allow inlining in C code generator.
Commit: 8ef57979bce002e446db9b2156a473f812ae65f3
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/8ef57979bce002e446db9b2156a473f812ae65f3
Author: nicolas-cellier-aka-nice <nicolas.cellier.aka.nice at gmail.com>
Date: 2016-11-12 (Sat, 12 Nov 2016)
Changed paths:
M nsspur64src/vm/cogit.h
M nsspur64src/vm/cogitX64.c
M nsspur64src/vm/cointerp.c
M nsspur64src/vm/cointerp.h
M nsspur64src/vm/gcc3x-cointerp.c
M nsspur64src/vm/vmCallback.h
M nsspursrc/vm/cogit.h
M nsspursrc/vm/cogitARMv5.c
M nsspursrc/vm/cogitIA32.c
M nsspursrc/vm/cogitMIPSEL.c
M nsspursrc/vm/cointerp.c
M nsspursrc/vm/cointerp.h
M nsspursrc/vm/gcc3x-cointerp.c
M nsspursrc/vm/vmCallback.h
M nsspurstack64src/vm/gcc3x-interp.c
M nsspurstack64src/vm/interp.c
M nsspurstack64src/vm/vmCallback.h
M nsspurstacksrc/vm/gcc3x-interp.c
M nsspurstacksrc/vm/interp.c
M nsspurstacksrc/vm/vmCallback.h
M spur64src/vm/cogit.h
M spur64src/vm/cogitX64.c
M spur64src/vm/cointerp.c
M spur64src/vm/cointerp.h
M spur64src/vm/gcc3x-cointerp.c
M spur64src/vm/vmCallback.h
M spursista64src/vm/cogit.h
M spursista64src/vm/cogitX64.c
M spursista64src/vm/cointerp.c
M spursista64src/vm/cointerp.h
M spursista64src/vm/gcc3x-cointerp.c
M spursista64src/vm/vmCallback.h
M spursistasrc/vm/cogit.h
M spursistasrc/vm/cogitARMv5.c
M spursistasrc/vm/cogitIA32.c
M spursistasrc/vm/cogitMIPSEL.c
M spursistasrc/vm/cointerp.c
M spursistasrc/vm/cointerp.h
M spursistasrc/vm/gcc3x-cointerp.c
M spursistasrc/vm/vmCallback.h
M spursrc/vm/cogit.h
M spursrc/vm/cogitARMv5.c
M spursrc/vm/cogitIA32.c
M spursrc/vm/cogitMIPSEL.c
M spursrc/vm/cointerp.c
M spursrc/vm/cointerp.h
M spursrc/vm/gcc3x-cointerp.c
M spursrc/vm/vmCallback.h
M spurstack64src/vm/gcc3x-interp.c
M spurstack64src/vm/interp.c
M spurstack64src/vm/vmCallback.h
M spurstacksrc/vm/gcc3x-interp.c
M spurstacksrc/vm/interp.c
M spurstacksrc/vm/vmCallback.h
M src/plugins/AioPlugin/AioPlugin.c
M src/plugins/BitBltPlugin/BitBltPlugin.c
M src/plugins/BochsIA32Plugin/BochsIA32Plugin.c
M src/plugins/BochsX64Plugin/BochsX64Plugin.c
M src/plugins/FileCopyPlugin/FileCopyPlugin.c
M src/plugins/FilePlugin/FilePlugin.c
M src/plugins/GdbARMPlugin/GdbARMPlugin.c
M src/plugins/HostWindowPlugin/HostWindowPlugin.c
M src/plugins/IA32ABI/IA32ABI.c
M src/plugins/InternetConfigPlugin/InternetConfigPlugin.c
M src/plugins/LargeIntegers/LargeIntegers.c
M src/plugins/MIDIPlugin/MIDIPlugin.c
M src/plugins/MacMenubarPlugin/MacMenubarPlugin.c
M src/plugins/Mpeg3Plugin/Mpeg3Plugin.c
M src/plugins/QuicktimePlugin/QuicktimePlugin.c
M src/plugins/SerialPlugin/SerialPlugin.c
M src/plugins/SocketPlugin/SocketPlugin.c
M src/plugins/SoundPlugin/SoundPlugin.c
M src/plugins/SqueakFFIPrims/ARM32FFIPlugin.c
M src/plugins/SqueakFFIPrims/IA32FFIPlugin.c
M src/plugins/SqueakFFIPrims/SqueakFFIPrims.c
M src/plugins/SqueakFFIPrims/X64SysVFFIPlugin.c
M src/plugins/SqueakFFIPrims/X64Win64FFIPlugin.c
M src/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c
M src/plugins/VMProfileLinuxSupportPlugin/VMProfileLinuxSupportPlugin.c
M src/plugins/VMProfileMacSupportPlugin/VMProfileMacSupportPlugin.c
M src/plugins/Win32OSProcessPlugin/Win32OSProcessPlugin.c
M src/vm/cogit.h
M src/vm/cogitARMv5.c
M src/vm/cogitIA32.c
M src/vm/cogitMIPSEL.c
M src/vm/cointerp.c
M src/vm/cointerp.h
M src/vm/cointerpmt.c
M src/vm/cointerpmt.h
M src/vm/gcc3x-cointerp.c
M src/vm/gcc3x-cointerpmt.c
M src/vm/vmCallback.h
M stacksrc/vm/gcc3x-interp.c
M stacksrc/vm/interp.c
M stacksrc/vm/vmCallback.h
Log Message:
-----------
Generate source from VMMaker.oscog-nice.1982
Replace remaining long/unsigned long with sqIntptr_t/usqIntptr_t.
Replace asLong/asUnsignedLong senders with asIntegerPtr/asUnsignedIntegerPtr.
This should be essentially for those int containing a target machine pointer/address.
For some printf cCode (used for debugging), the %ld does not work in LLP64.
We use the standard C way for compatible 32 & 64bits code:
use PRI_format_Type macros as the format (mainly PRIxSQPTR).
This way, VMMaker is now LLP64 friendly.
For other conventions (ILP32 and LP64), this does not change anything since sqIntptr_t is equivalent to long.
Commit: 80a7b63b3d1dbc516ecc494ed91ca28cb2430a51
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/80a7b63b3d1dbc516ecc494ed91ca28cb2430a51
Author: nicolas-cellier-aka-nice <nicolas.cellier.aka.nice at gmail.com>
Date: 2016-11-13 (Sun, 13 Nov 2016)
Changed paths:
M spursista64src/vm/cogitX64.c
M spursista64src/vm/cointerp.c
M spursistasrc/vm/cogitARMv5.c
M spursistasrc/vm/cogitIA32.c
M spursistasrc/vm/cogitMIPSEL.c
M src/plugins/SqueakFFIPrims/ARM32FFIPlugin.c
M src/plugins/SqueakFFIPrims/IA32FFIPlugin.c
M src/plugins/SqueakFFIPrims/X64SysVFFIPlugin.c
M src/plugins/SqueakFFIPrims/X64Win64FFIPlugin.c
Log Message:
-----------
Generate sources as per VMMaker.oscog-nice.1984
X64 Win64 FFI requires setsp/getsp
It also uses PLATFORM_API_USES_CALLEE_POPS_CONVENTION
Minor correction to VMMaker.oscog-nice.1977 to note that Sista counters are always 32-bits, having two 16-bit halves for the reached and taken counts.
Commit: 34edc54c2111e729da5b5b3cc01d955166e0384d
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/34edc54c2111e729da5b5b3cc01d955166e0384d
Author: nicolas-cellier-aka-nice <nicolas.cellier.aka.nice at gmail.com>
Date: 2016-11-13 (Sun, 13 Nov 2016)
Changed paths:
M nsspur64src/vm/cogitX64.c
M nsspur64src/vm/cointerp.c
M nsspur64src/vm/gcc3x-cointerp.c
M nsspursrc/vm/cogitARMv5.c
M nsspursrc/vm/cogitIA32.c
M nsspursrc/vm/cogitMIPSEL.c
M nsspursrc/vm/cointerp.c
M nsspursrc/vm/gcc3x-cointerp.c
M nsspurstack64src/vm/gcc3x-interp.c
M nsspurstack64src/vm/interp.c
M nsspurstacksrc/vm/gcc3x-interp.c
M nsspurstacksrc/vm/interp.c
M spur64src/vm/cogitX64.c
M spur64src/vm/cointerp.c
M spur64src/vm/gcc3x-cointerp.c
M spursista64src/vm/cogitX64.c
M spursista64src/vm/cointerp.c
M spursista64src/vm/gcc3x-cointerp.c
M spursistasrc/vm/cogitARMv5.c
M spursistasrc/vm/cogitIA32.c
M spursistasrc/vm/cogitMIPSEL.c
M spursistasrc/vm/cointerp.c
M spursistasrc/vm/gcc3x-cointerp.c
M spursrc/vm/cogitARMv5.c
M spursrc/vm/cogitIA32.c
M spursrc/vm/cogitMIPSEL.c
M spursrc/vm/cointerp.c
M spursrc/vm/gcc3x-cointerp.c
M spurstack64src/vm/gcc3x-interp.c
M spurstack64src/vm/interp.c
M spurstacksrc/vm/gcc3x-interp.c
M spurstacksrc/vm/interp.c
M src/vm/cogitARMv5.c
M src/vm/cogitIA32.c
M src/vm/cogitMIPSEL.c
M src/vm/cointerp.c
M src/vm/cointerpmt.c
M src/vm/gcc3x-cointerp.c
M src/vm/gcc3x-cointerpmt.c
M stacksrc/vm/gcc3x-interp.c
M stacksrc/vm/interp.c
Log Message:
-----------
Generate source as per VMMaker.oscog-nice.1985
Fix generation of signed32BitIntegerFor: for 64 bits VM.
signed32BitIntegerFor: must work for any 32bit int, but current version will overflow if this int is large, for example -16r80000000.
Indeed, not only constants must be extended to sqInt, but any expression whose type is shorter.
Also, use unsigned usqInt, rather than signed sqInt, because it's well defined behavior (sign extension will occur during the conversion).
Commit: de6f1fe556439da658ef627bd2b2173737e305a9
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/de6f1fe556439da658ef627bd2b2173737e305a9
Author: nicolas-cellier-aka-nice <nicolas.cellier.aka.nice at gmail.com>
Date: 2016-11-13 (Sun, 13 Nov 2016)
Changed paths:
M nsspur64src/vm/cointerp.c
M nsspur64src/vm/cointerp.h
M nsspur64src/vm/gcc3x-cointerp.c
M nsspursrc/vm/cointerp.c
M nsspursrc/vm/cointerp.h
M nsspursrc/vm/gcc3x-cointerp.c
M nsspurstack64src/vm/gcc3x-interp.c
M nsspurstack64src/vm/interp.c
M nsspurstacksrc/vm/gcc3x-interp.c
M nsspurstacksrc/vm/interp.c
M spur64src/vm/cointerp.c
M spur64src/vm/cointerp.h
M spur64src/vm/gcc3x-cointerp.c
M spursista64src/vm/cointerp.c
M spursista64src/vm/cointerp.h
M spursista64src/vm/gcc3x-cointerp.c
M spursistasrc/vm/cointerp.c
M spursistasrc/vm/cointerp.h
M spursistasrc/vm/gcc3x-cointerp.c
M spursrc/vm/cointerp.c
M spursrc/vm/cointerp.h
M spursrc/vm/gcc3x-cointerp.c
M spurstack64src/vm/gcc3x-interp.c
M spurstack64src/vm/interp.c
M spurstacksrc/vm/gcc3x-interp.c
M spurstacksrc/vm/interp.c
M src/vm/cointerp.c
M src/vm/cointerp.h
M src/vm/cointerpmt.c
M src/vm/cointerpmt.h
M src/vm/gcc3x-cointerp.c
M src/vm/gcc3x-cointerpmt.c
M stacksrc/vm/gcc3x-interp.c
M stacksrc/vm/interp.c
Log Message:
-----------
Generate code as per VMMaker.oscog-nice.1986
Like already the case for the #positive32BitIntegerFor: and #signed32BitIntegerFor: , #positive32BitValueOf: and #signed32BitValueOf: can be simplified with separate 32/64 bits branches.
Indeed, we know that any 32bits signed/unsigned int will fit into a SmallInteger when hasSixtyFourBitImmediates,.
No need to perform any superfluous testing...
The previous implementation produces a lot of dead code in 64bits VM and preve
Compare: https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/4812579a48ed^...de6f1fe55643
More information about the Vm-dev
mailing list