<p dir="ltr">I think that the best way to implement setjmp and friends is using inline assembly.</p>
<br><div class="gmail_quote"><div dir="ltr">On Fri, Jun 2, 2017, 11:28 PM via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send llvm-dev mailing list submissions to<br>
        <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:llvm-dev-request@lists.llvm.org" target="_blank">llvm-dev-request@lists.llvm.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:llvm-dev-owner@lists.llvm.org" target="_blank">llvm-dev-owner@lists.llvm.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of llvm-dev digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. Re: setjmp in llvm (Tim Northover via llvm-dev)<br>
   2. Backend implementation for an architecture with only majority<br>
      operation instruction (Sreejita saha via llvm-dev)<br>
   3. Question regarding to learn LLVM (Amit Ghadge via llvm-dev)<br>
   4. Re: Failed to build libunwind the libcxx's __config       header<br>
      (Dmitry Golovin via llvm-dev)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Fri, 2 Jun 2017 19:21:33 -0700<br>
From: Tim Northover via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>><br>
To: Wael Yehia <<a href="mailto:wmyehia2001@yahoo.com" target="_blank">wmyehia2001@yahoo.com</a>>,  LLVM Developers Mailing List<br>
        <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>><br>
Subject: Re: [llvm-dev] setjmp in llvm<br>
Message-ID:<br>
        <<a href="mailto:CAFHTzfJS9pFePXEo2-BaK91hxnFEC8qCAOoQpdBjtSRQeV-Y3Q@mail.gmail.com" target="_blank">CAFHTzfJS9pFePXEo2-BaK91hxnFEC8qCAOoQpdBjtSRQeV-Y3Q@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="UTF-8"<br>
<br>
(Adding the list back in, especially as other people have taken an<br>
interest in really immobile intrinsics before).<br>
<br>
On 2 June 2017 at 18:33, Wael Yehia <<a href="mailto:wmyehia2001@yahoo.com" target="_blank">wmyehia2001@yahoo.com</a>> wrote:<br>
> Thank you Tim. The C spec never stops enlightening me with new quirks.<br>
> Out of curiousity, did you know about this or grep'ed the spec for setjmp?<br>
<br>
I've got a standing interest in both threading (a canonical place<br>
where volatile is definitely not what you want) and OS programming<br>
(the extra 0.5 where it is, for memory mapped I/O) so I've read lots<br>
and lots about it. The final standards-blessed use is for reading<br>
variables in a signal handler.<br>
<br>
> BTW, how confident are you about the statement you made:<br>
>  "This is pretty much impossible in LLVM if you mean instructions LLVM<br>
>    considers side-effect free (e.g. a simple "add")."<br>
> Because I was tempted for a while to just ask the community about it, after having<br>
> spent few weeks experimenting, with a hope that there's a way to actually prevent<br>
> all instructions (including the side-effect free ones) from moving across calls.<br>
<br>
Pretty sure, I'm afraid. Even the strongest property, HasSideEffects<br>
which is basically a "this does stuff you don't understand"<br>
instruction to LLVM doesn't prevent that kind of code motion. Because<br>
even though the intrinsic might do things LLVM doesn't understand,<br>
"add" doesn't.<br>
<br>
Cheers.<br>
<br>
Tim.<br>
<br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Thu, 1 Jun 2017 21:13:52 -0600<br>
From: Sreejita saha via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>><br>
To: "<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>" <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>><br>
Subject: [llvm-dev] Backend implementation for an architecture with<br>
        only majority operation instruction<br>
Message-ID: <<a href="mailto:5930d7e8.4bfdca0a.4a191.2e43@mx.google.com" target="_blank">5930d7e8.4bfdca0a.4a191.2e43@mx.google.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hello everyone,<br>
<br>
I was trying to create an LLVM backend for a processor with a very simple architecture and that does all instructions like load, store, arithmetic and logical instructions using a bunch of majority functions. The processor has only one instruction(majority function) in its ISA and breaks down all other instructions into a number of majority instructions depending on what instruction it is. All the instructions have different combinations of majority operations. Is there any way to implement this without creating a new Selection DAG node for the majority operation?<br>
I was thinking of creation of a new Selection DAG node and mapping all the other instructions like loads, stores as pseudo instructions and breaking them up. Can someone please help me with this?<br>
<br>
Thanks!<br>
Sreejita<br>
<br>
<br>
Sent from Mail for Windows 10<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.llvm.org/pipermail/llvm-dev/attachments/20170601/2fd71477/attachment.html" rel="noreferrer" target="_blank">http://lists.llvm.org/pipermail/llvm-dev/attachments/20170601/2fd71477/attachment.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Fri, 2 Jun 2017 16:10:17 +0530<br>
From: Amit Ghadge via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>><br>
To: LLVM Dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>><br>
Subject: [llvm-dev] Question regarding to learn LLVM<br>
Message-ID:<br>
        <<a href="mailto:CALRcH8Dfe5pZDWfEsH6KrFkgG7C1XGy9wKL89ELPYATL3vQidA@mail.gmail.com" target="_blank">CALRcH8Dfe5pZDWfEsH6KrFkgG7C1XGy9wKL89ELPYATL3vQidA@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="UTF-8"<br>
<br>
Hi,<br>
<br>
I have basic knowledge about LLVM. I want to make expertise in it and<br>
also start contributing.<br>
So,<br>
How do I start?<br>
Where do I start?<br>
What basic fundamental knowledge is required?<br>
Any study material(books, link).<br>
<br>
Thanks,<br>
Amit G<br>
<br>
<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Fri, 02 Jun 2017 18:30:17 +0300<br>
From: Dmitry Golovin via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>><br>
To: Tim Northover <<a href="mailto:t.p.northover@gmail.com" target="_blank">t.p.northover@gmail.com</a>><br>
Cc: Dmitry Golovin via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>><br>
Subject: Re: [llvm-dev] Failed to build libunwind the libcxx's<br>
        __config        header<br>
Message-ID: <<a href="mailto:3956711496417417@web16j.yandex.ru" target="_blank">3956711496417417@web16j.yandex.ru</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hi Tim,<br>
<br>
You can find the preprocessed UnwindLevel1.c and UnwindLevel1-gcc-ext.c attached.<br>
<br>
Regards,<br>
Dmitry<br>
<br>
02.06.2017, 18:06, "Tim Northover" <<a href="mailto:t.p.northover@gmail.com" target="_blank">t.p.northover@gmail.com</a>>:<br>
> Hi Dmitry,<br>
><br>
> On 2 June 2017 at 07:49, Dmitry Golovin via llvm-dev<br>
> <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
>>  Does anyone else have this problem? What can possibly cause such error?<br>
><br>
> G++ doesn't support __has_feature, so it should be picking up the<br>
> default "#define __has_feature(__x) 0" further up in __config. The<br>
> preprocessed output (via "-E -dD") would be interesting to diagnose<br>
> the issue, if no-one else has seen it before.<br>
><br>
> Cheers.<br>
><br>
> Tim.<br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: UnwindLevel1-gcc-ext.c.pp<br>
Type: application/octet-stream<br>
Size: 160363 bytes<br>
Desc: not available<br>
URL: <<a href="http://lists.llvm.org/pipermail/llvm-dev/attachments/20170602/77fee23e/attachment.obj" rel="noreferrer" target="_blank">http://lists.llvm.org/pipermail/llvm-dev/attachments/20170602/77fee23e/attachment.obj</a>><br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: UnwindLevel1.c.pp<br>
Type: application/octet-stream<br>
Size: 173121 bytes<br>
Desc: not available<br>
URL: <<a href="http://lists.llvm.org/pipermail/llvm-dev/attachments/20170602/77fee23e/attachment-0001.obj" rel="noreferrer" target="_blank">http://lists.llvm.org/pipermail/llvm-dev/attachments/20170602/77fee23e/attachment-0001.obj</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
llvm-dev mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
<br>
<br>
------------------------------<br>
<br>
End of llvm-dev Digest, Vol 156, Issue 13<br>
*****************************************<br>
</blockquote></div>