New Cog VMs available

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

New Cog VMs available

Eliot Miranda-2
... at http://www.mirandabanda.org/files/Cog/VM/VM.r3163/.

CogVM binaries as per VMMaker.oscog-eem.972/r3163

Fix a devilishly tricky bug with 32-bit Spur and PICs in the Cogit.  In 32-bit
Spur only zero is a valid cache tag, that for Characters, due to SmallIntegers
having both 2r11 and 2r01 as valid tags.  The cache check prolog collapses
these down onto 1 by anding with 1 and hence collapses Character's 2r10 to 0.

The cache tag is also tested in the PIC abort routine to distinguish between
an MNU abort and an interpret abort.  A PIC MNU entry jumps to code that first
zeros the cache tag (held in ClassReg) before calling the abort routine, which
tests ClassReg and selects the relevant abort processing.

Hence in 32-bit Spur if a send site is linked for Character and later extended
to a PIC with an interpret case, that interpret case will instead invoke MNU
processing.  This is rare; first there needs to be a send to a CHaracter, then
a send to something else which binds to something that must be interpreted.
Ouch.

The fix is simple; if a send site that was linked with a zero cache tag (which
can only happen in 32-bit Spur) link to an open PIC instead of to a closed PIC,
or in the case of an MNU do not link.

Add a debug lookup routine that only looks up (and follows forwarding pointers).

Add a -breakmnu vm argument that calls warning on an mnu of a specific selector.

Fix SmartSyntaxPlugin code generation for Spur of

- asOop: old code assumed 4 byte oops & headers
- Unsigned old code assumed 32-bit oops


Affects AsyncFilePlugin, BochsIA32Plugin & FT2Plgin.

Avoid duplication of effort in special selector send forwarding fault handling.

Improve stack trace printing for Newspeak and Glue by providing something that
assumes the penultimate literal is the selector or an AdditionalMethodState-like
thing containing it.

Reimplement primitiveCopyObject to work for both pointer and bits objects.
This to support a good Object>>clone for Spur.

Fix Spur's isWordsOrBytes[NonImm]:.  Old code answered true for CompiledMethods.
--
best,
Eliot


Reply | Threaded
Open this post in threaded view
|

Re: New Cog VMs available

Eliot Miranda-2
Oops, for http://www.mirandabanda.org/files/Cog/VM/VM.r3163/ read http://www.mirandabanda.org/files/Cog/VM/VM.r3164

On Sat, Dec 6, 2014 at 1:53 PM, Eliot Miranda <[hidden email]> wrote:
... at http://www.mirandabanda.org/files/Cog/VM/VM.r3163/.

CogVM binaries as per VMMaker.oscog-eem.972/r3163

Fix a devilishly tricky bug with 32-bit Spur and PICs in the Cogit.  In 32-bit
Spur only zero is a valid cache tag, that for Characters, due to SmallIntegers
having both 2r11 and 2r01 as valid tags.  The cache check prolog collapses
these down onto 1 by anding with 1 and hence collapses Character's 2r10 to 0.

The cache tag is also tested in the PIC abort routine to distinguish between
an MNU abort and an interpret abort.  A PIC MNU entry jumps to code that first
zeros the cache tag (held in ClassReg) before calling the abort routine, which
tests ClassReg and selects the relevant abort processing.

Hence in 32-bit Spur if a send site is linked for Character and later extended
to a PIC with an interpret case, that interpret case will instead invoke MNU
processing.  This is rare; first there needs to be a send to a CHaracter, then
a send to something else which binds to something that must be interpreted.
Ouch.

The fix is simple; if a send site that was linked with a zero cache tag (which
can only happen in 32-bit Spur) link to an open PIC instead of to a closed PIC,
or in the case of an MNU do not link.

Add a debug lookup routine that only looks up (and follows forwarding pointers).

Add a -breakmnu vm argument that calls warning on an mnu of a specific selector.

Fix SmartSyntaxPlugin code generation for Spur of

- asOop: old code assumed 4 byte oops & headers
- Unsigned old code assumed 32-bit oops


Affects AsyncFilePlugin, BochsIA32Plugin & FT2Plgin.

Avoid duplication of effort in special selector send forwarding fault handling.

Improve stack trace printing for Newspeak and Glue by providing something that
assumes the penultimate literal is the selector or an AdditionalMethodState-like
thing containing it.

Reimplement primitiveCopyObject to work for both pointer and bits objects.
This to support a good Object>>clone for Spur.

Fix Spur's isWordsOrBytes[NonImm]:.  Old code answered true for CompiledMethods.
--
best,
Eliot



--
best,
Eliot


Reply | Threaded
Open this post in threaded view
|

Re: New Cog VMs available

douglas mcpherson
ARMv6 binaries updated accordingly.

On Dec 6, 2014, at 19:17 , Eliot Miranda wrote:

Oops, for http://www.mirandabanda.org/files/Cog/VM/VM.r3163/ read http://www.mirandabanda.org/files/Cog/VM/VM.r3164

On Sat, Dec 6, 2014 at 1:53 PM, Eliot Miranda <[hidden email]> wrote:
... at http://www.mirandabanda.org/files/Cog/VM/VM.r3163/.

CogVM binaries as per VMMaker.oscog-eem.972/r3163

Fix a devilishly tricky bug with 32-bit Spur and PICs in the Cogit.  In 32-bit
Spur only zero is a valid cache tag, that for Characters, due to SmallIntegers
having both 2r11 and 2r01 as valid tags.  The cache check prolog collapses
these down onto 1 by anding with 1 and hence collapses Character's 2r10 to 0.

The cache tag is also tested in the PIC abort routine to distinguish between
an MNU abort and an interpret abort.  A PIC MNU entry jumps to code that first
zeros the cache tag (held in ClassReg) before calling the abort routine, which
tests ClassReg and selects the relevant abort processing.

Hence in 32-bit Spur if a send site is linked for Character and later extended
to a PIC with an interpret case, that interpret case will instead invoke MNU
processing.  This is rare; first there needs to be a send to a CHaracter, then
a send to something else which binds to something that must be interpreted.
Ouch.

The fix is simple; if a send site that was linked with a zero cache tag (which
can only happen in 32-bit Spur) link to an open PIC instead of to a closed PIC,
or in the case of an MNU do not link.

Add a debug lookup routine that only looks up (and follows forwarding pointers).

Add a -breakmnu vm argument that calls warning on an mnu of a specific selector.

Fix SmartSyntaxPlugin code generation for Spur of

- asOop: old code assumed 4 byte oops & headers
- Unsigned old code assumed 32-bit oops


Affects AsyncFilePlugin, BochsIA32Plugin & FT2Plgin.

Avoid duplication of effort in special selector send forwarding fault handling.

Improve stack trace printing for Newspeak and Glue by providing something that
assumes the penultimate literal is the selector or an AdditionalMethodState-like
thing containing it.

Reimplement primitiveCopyObject to work for both pointer and bits objects.
This to support a good Object>>clone for Spur.

Fix Spur's isWordsOrBytes[NonImm]:.  Old code answered true for CompiledMethods.
--
best,
Eliot



--
best,
Eliot




Reply | Threaded
Open this post in threaded view
|

Re: New Cog VMs available

Frank Shearar-3
In reply to this post by Eliot Miranda-2
On 7 December 2014 at 03:17, Eliot Miranda <[hidden email]> wrote:
> Oops, for http://www.mirandabanda.org/files/Cog/VM/VM.r3163/ read
> http://www.mirandabanda.org/files/Cog/VM/VM.r3164

Updated in the build scripts.

frank

Reply | Threaded
Open this post in threaded view
|

Re: New Cog VMs available

douglas mcpherson
In reply to this post by douglas mcpherson
ARMv7 binaries also updated. (These are compiled without fast BitBlt optimizations as they are still broken for ARMv7).

On Dec 7, 2014, at 19:09 , Douglas McPherson wrote:

ARMv6 binaries updated accordingly.

On Dec 6, 2014, at 19:17 , Eliot Miranda wrote:

Oops, for http://www.mirandabanda.org/files/Cog/VM/VM.r3163/ read http://www.mirandabanda.org/files/Cog/VM/VM.r3164

On Sat, Dec 6, 2014 at 1:53 PM, Eliot Miranda <[hidden email]> wrote:
... at http://www.mirandabanda.org/files/Cog/VM/VM.r3163/.

CogVM binaries as per VMMaker.oscog-eem.972/r3163

Fix a devilishly tricky bug with 32-bit Spur and PICs in the Cogit.  In 32-bit
Spur only zero is a valid cache tag, that for Characters, due to SmallIntegers
having both 2r11 and 2r01 as valid tags.  The cache check prolog collapses
these down onto 1 by anding with 1 and hence collapses Character's 2r10 to 0.

The cache tag is also tested in the PIC abort routine to distinguish between
an MNU abort and an interpret abort.  A PIC MNU entry jumps to code that first
zeros the cache tag (held in ClassReg) before calling the abort routine, which
tests ClassReg and selects the relevant abort processing.

Hence in 32-bit Spur if a send site is linked for Character and later extended
to a PIC with an interpret case, that interpret case will instead invoke MNU
processing.  This is rare; first there needs to be a send to a CHaracter, then
a send to something else which binds to something that must be interpreted.
Ouch.

The fix is simple; if a send site that was linked with a zero cache tag (which
can only happen in 32-bit Spur) link to an open PIC instead of to a closed PIC,
or in the case of an MNU do not link.

Add a debug lookup routine that only looks up (and follows forwarding pointers).

Add a -breakmnu vm argument that calls warning on an mnu of a specific selector.

Fix SmartSyntaxPlugin code generation for Spur of

- asOop: old code assumed 4 byte oops & headers
- Unsigned old code assumed 32-bit oops


Affects AsyncFilePlugin, BochsIA32Plugin & FT2Plgin.

Avoid duplication of effort in special selector send forwarding fault handling.

Improve stack trace printing for Newspeak and Glue by providing something that
assumes the penultimate literal is the selector or an AdditionalMethodState-like
thing containing it.

Reimplement primitiveCopyObject to work for both pointer and bits objects.
This to support a good Object>>clone for Spur.

Fix Spur's isWordsOrBytes[NonImm]:.  Old code answered true for CompiledMethods.
--
best,
Eliot



--
best,
Eliot