9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Kenny Lasse Hoff Levinsen <kennylevinsen@gmail.com>
To: 9fans@9fans.net
Cc: lucio@proxima.alt.za
Subject: Re: [9fans] Go: FP in note handler
Date: Tue, 23 Feb 2016 09:26:21 +0100	[thread overview]
Message-ID: <93ADCA66-EE37-44E9-BD39-72DE7E5119F6@gmail.com> (raw)
In-Reply-To: <83031ee52a34de15facd95dcbcabbad9@proxima.alt.za>

Well, avoiding XMM registers in duffcopy/duffzero is one solution, but I was thinking of working around them entirely in code called from the note handler, so that duffcopy/duffzero can operate as intended on plan9, rather than littering the compiler with OS conditionals.

It puts some restrictions on the note handling code, such as no copy(), make() or even an on-stack var b [n]byte. Due to sighandler disabling write barriers, we can't currently allocate on the heap, meaning that we might need either locked global buffers (which can be duffzeroed) or more assembly so we can use on-stack buffers (which could be zeroed if we wanted to, they just can't use duffzero for it).

To fix the duffzero, we'd have to fix runtime.goexitsall's buffer usage, but to reenable duffcopy, we'd have to look at the much bigger runtime.sighandler.

Best regards,
Kenny Levinsen

On 23. feb. 2016, at 08.20, lucio@proxima.alt.za wrote:

>> Duffcopy is disabled from plan9 after the last bug report on the
>> matter, but duffzero was later optimized to use XMM registers, causing
>> goexitsall, which use an on-stack byte array to make a new note, to
>> call duffzero and trip the fp in note handler message.
> 
> I had to re-read this to understand this because you tend to put at
> the end what I would find easier to understand if it was at the
> beginning.  No offence meant, different punctuation would have perhaps
> helped my understanding.
> 
> So, we need a duffcopy and duffzero that do not use XMM registers,
> rather than stop invoking them, if I read your comment correctly?
> 
> I also have an open issue (I see David has offered to look into it
> soon) involving syscalls and their error messages, it seems these are
> all Plan 9 specific issues that could be addressed together.
> 
> I really would like to take a more active role in Go for Plan 9, but I
> can't yet give it the priority I'd like.  Still, I like hearing from
> others who take this to heart.
> 
> Lucio.
> 



       reply	other threads:[~2016-02-23  8:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <83031ee52a34de15facd95dcbcabbad9@proxima.alt.za>
2016-02-23  8:26 ` Kenny Lasse Hoff Levinsen [this message]
     [not found] <e115154c5bab8971d7b88f64ba5d4402@proxima.alt.za>
2016-02-23 10:17 ` Kenny Lasse Hoff Levinsen
2016-02-23 15:27   ` erik quanstrom
2016-02-23 15:52     ` Kenny Lasse Hoff Levinsen
2016-02-23 17:02       ` erik quanstrom
2016-02-23 17:14         ` Kenny Lasse Hoff Levinsen
2016-02-23 17:31           ` lucio
2016-02-23 17:56             ` Kenny Lasse Hoff Levinsen
     [not found] <fb16aa69c6b73a2e8f0260b4e6ee025c@hamnavoe.com>
2016-02-22 21:56 ` Kenny Lasse Hoff Levinsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=93ADCA66-EE37-44E9-BD39-72DE7E5119F6@gmail.com \
    --to=kennylevinsen@gmail.com \
    --cc=9fans@9fans.net \
    --cc=lucio@proxima.alt.za \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).