mailing list of musl libc
 help / color / mirror / code / Atom feed
From: <sidneym@codeaurora.org>
To: <musl@lists.openwall.com>
Subject: [musl] sigsetjmp
Date: Sun, 7 Jun 2020 20:45:11 -0500	[thread overview]
Message-ID: <036c01d63d36$73c42110$5b4c6330$@codeaurora.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 990 bytes --]

Wanting to make sure I'm reading the requirements correctly.

 

Looks like this routine only needs to save the link register and env, call
setjmp then restore the link register and env followed by the tail call.

 

Hexagon was out of date so I did this:

 

.balign 4

.type sigsetjmp,@function

sigsetjmp:

        // if savemask is 0 sigsetjmp behaves like setjmp

        {

                p0 = cmp.eq(r1, #0)

                if (p0.new) jump:t ##setjmp

        }

        {   

                memw(r0+#64+4) = r16  // save r16 in __ss[0]

                memw(r0+#64)   = r31  // save linkregister in __fl

                r16 = r0

        }   

                call ##setjmp

        {   

                r0  = r16             // restore r0

                r31 = memw(r16+#64)   // restore linkregister

                r16 = memw(r16+#64+4) // restore r16 from __ss[0]

        }

.hidden __sigsetjmp_tail

        jump ##__sigsetjmp_tail

 

.size   sigsetjmp, .-sigsetjmp


[-- Attachment #2: Type: text/html, Size: 4422 bytes --]

             reply	other threads:[~2020-06-08  1:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-08  1:45 sidneym [this message]
2020-06-08 17:10 ` Rich Felker
2020-06-09  1:01   ` sidneym
2020-06-09  1:12     ` Rich Felker
2020-06-10 17:44       ` sidneym

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='036c01d63d36$73c42110$5b4c6330$@codeaurora.org' \
    --to=sidneym@codeaurora.org \
    --cc=musl@lists.openwall.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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).