[M3devel] question re LONGINT
Tony Hosking
hosking at cs.purdue.edu
Tue Mar 15 00:50:24 CET 2011
On Mar 14, 2011, at 6:33 PM, Jay K wrote:
> - That error is likely from the frontend and will likely occur for any target. Tony's reply implies this as well.
>
> - LONGINT is believed to fully work on NT386. But more testing is welcome.
>
> - (atomics ditto -- believed to work, testing welcome -- and we should probably use them some, e.g. in MUTEX initialization)
They are still slightly broken. I have some fixes still to check in. If only I could find some time to test everything...
But, they will be essential if we ever do cooperative thread suspension.
> - I would be curious to see if threadtest only fails on 64bit Windows. I haven't tried 32bit yet but I will soon.
> - I was thinking more about this WOW64 GetThreadContext problem and ways to mitigate it, other than cooperative suspend.
> I had already suggested and started to implement scanning the entire stack -- i.e. not depending on an ability to get ESP from a suspended thread.
> Like how FreeBSD and OpenBSD work, albeit it is a significant deoptimization.
> Regarding the rest of the context, perhaps it is a reasonable assumption for now to declare that it doesn't matter? e.g. to know/assume
> that m3back never leaves a value only in registers, that anything in a register will also be on the stack? And to disable optimization on the
> hypothetical MINGW platforms. ?
> But still to confirm if there are no problems on 32bit, and to mull over implementing cooperative suspend..in the little time available...
> (Oh, and also, I wonder if SuspendThread can suspend a thread while in the kernel, probably, and if GetThreadContext returns
> the kernel context in that case; should be easy to determine via some experimentation -- which would imply a problem on 32bit Windows also.)
>
>
> - Jay
>
> From: hosking at cs.purdue.edu
> Date: Mon, 14 Mar 2011 17:21:01 -0400
> To: rcolebur at SCIRES.COM
> CC: m3devel at elegosoft.com
> Subject: Re: [M3devel] question re LONGINT
>
> This is a known problem which I am still to fix. I know what the issue is...
> You can probably make do by reading counts[i] to a variable, incrementing, and assigning.
>
> On Mar 14, 2011, at 5:14 PM, Coleburn, Randy wrote:
>
> I was making some local mods to Mika’s threadtest program to help me debug things a bit more on Windows.
>
> I am trying to do:
> INC(counts[i]);
> Where counts is REF ARRAY OF LONGINT
>
> The compiler is complaining:
> "..\src\Main.m3", line 189: ** INTERNAL CG ERROR *** unable to find integer type? type=Int.64 s/o/a=64/0/32
>
> I’m not sure what the status of LONGINT is on Windows. If it is not fully implemented, let me know and I’ll switch to REF ARRAY OF INTEGER, but I really need LONGINT.
>
> Regards,
> Randy Coleburn
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20110314/552f4ee8/attachment-0002.html>
More information about the M3devel
mailing list