<div dir="ltr"><div>Hello</div><div>I get following errors:</div><div>=========================================================<br></div><div>$ riscv-rtems5-sis -riscv -nouartrx -gdb<br><br> SIS - SPARC/RISCV instruction simulator 2.13,  copyright Jiri Gaisler 2019<br> Bug-reports to <a href="mailto:jiri@gaisler.se">jiri@gaisler.se</a><br><br>unknown option -riscv<br>usage: sis [-uart1 uart_device1] [-uart2 uart_device2]<br>[-m <n>] [-dumbio] [-v] <br>[-nfp] [-freq frequency] [-c batch_file] [files]</div><div>=========================================================</div><div>$ riscv-rtems5-sis -gdb<br><br> SIS - SPARC/RISCV instruction simulator 2.13,  copyright Jiri Gaisler 2019<br> Bug-reports to <a href="mailto:jiri@gaisler.se">jiri@gaisler.se</a><br><br>unknown option -gdb<br>usage: sis [-uart1 uart_device1] [-uart2 uart_device2]<br>[-m <n>] [-dumbio] [-v] <br>[-nfp] [-freq frequency] [-c batch_file] [files]</div><div><div>=========================================================</div><div><br></div><div>Vaibhav Gupta<br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 14, 2019 at 5:14 PM Joel Sherrill <<a href="mailto:joel@rtems.org">joel@rtems.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">Thank you.<div dir="auto"><br></div><div dir="auto">Do you see anything wrong with the riscv fenv implementation? His program runs under Linux and hangs on both Qemu and sis.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 14, 2019, 2:18 AM Jiri Gaisler <<a href="mailto:jiri@gaisler.se" target="_blank">jiri@gaisler.se</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF">
    <pre class="gmail-m_8259771743051112012m_-4400014926013136113moz-quote-pre">I have attached the sis manual. Page 17:

"SIS can be connected to gdb through a network socket using the gdb remote interface.
Either start SIS with -gdb, or issue the ’gdb’ command inside SIS, and connect gdb with
’target extended-remote localhost:1234’. The port can be changed using the -port option."

You still need all other options, so to start on a windows host do:

$ riscv-rtems-sis -riscv -nouartrx -gdb

To start gdb, do:

$ riscv-rtems-gdb app.exe

(gdb) target extended-remote localhost:1234

(gdb) load

(gdb) run

To re-run the application, issue a new load command first.

Regards, Jiri.
</pre>
    <div class="gmail-m_8259771743051112012m_-4400014926013136113moz-cite-prefix">On 8/14/19 12:37 AM, Vaibhav Gupta
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">
        <div dir="ltr"><br>
        </div>
        <br>
        <div class="gmail_quote">
          <div dir="ltr" class="gmail_attr">On Wed, Aug 14, 2019 at 4:04
            AM Joel Sherrill <<a href="mailto:joel@rtems.org" rel="noreferrer" target="_blank">joel@rtems.org</a>> wrote:<br>
          </div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
            <div dir="ltr">
              <div dir="ltr"><br>
              </div>
              <br>
              <div class="gmail_quote">
                <div dir="ltr" class="gmail_attr">On Tue, Aug 13, 2019
                  at 5:09 PM Vaibhav Gupta <<a href="mailto:vaibhavgupta40@gmail.com" rel="noreferrer" target="_blank">vaibhavgupta40@gmail.com</a>>
                  wrote:<br>
                </div>
                <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                  <div dir="ltr">
                    <div dir="ltr"><br>
                    </div>
                    <br>
                    <div class="gmail_quote">
                      <div dir="ltr" class="gmail_attr">On Mon, Aug 12,
                        2019 at 11:50 PM Joel Sherrill <<a href="mailto:joel@rtems.org" rel="noreferrer" target="_blank">joel@rtems.org</a>>
                        wrote:<br>
                      </div>
                      <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                        <div dir="ltr">
                          <div>Can you post or email me privately the
                            full patch? I can try to see what I spot.</div>
                        </div>
                      </blockquote>
                      <div>I have sent you the patch. <br>
                      </div>
                      <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                        <div dir="ltr">
                          <div><br>
                          </div>
                          <div>Can you check with objdump or gdb that
                            the methods which don't appear to work </div>
                          <div>are actually the RISC-V implementation?
                            Look at the disassembly and see if it</div>
                          <div>looks like you expect.</div>
                        </div>
                      </blockquote>
                      <div>I am exploring for this.</div>
                    </div>
                  </div>
                </blockquote>
                <div><br>
                </div>
                <div>Since I don't know how to attach gdb to the new sis
                  for griscv, I emailed Jiri privately.</div>
                <div>Your program works as expected on Linux. Perhaps
                  Jiri has some advice for my</div>
                <div>debugging setup ignorance and fenv on RISC-V.</div>
              </div>
            </div>
          </blockquote>
          <div>Okay, I will wait. Till then I can work with porting for
            other architecture. :) <br>
          </div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
            <div dir="ltr">
              <div class="gmail_quote">
                <div><br>
                </div>
                <div>Do you happen to have fenv support for another
                  architecture queued up? It would be</div>
                <div>interesting to see if it works on other targets.</div>
              </div>
            </div>
          </blockquote>
          <div>Yup, they were in my to do list. Till testsuite method is
            solved, I will work on them now.</div>
          <div><br>
          </div>
          <div>- Vaibhav Gupta<br>
          </div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
            <div dir="ltr">
              <div class="gmail_quote">
                <div><br>
                </div>
                <div>--joel</div>
                <div> </div>
                <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                  <div dir="ltr">
                    <div class="gmail_quote">
                      <div><br>
                      </div>
                      <div>- Vaibhav Gupta<br>
                      </div>
                      <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                        <div dir="ltr">
                          <div><br>
                          </div>
                          <div>Does this require a patch to newlib as
                            well?</div>
                          <div><br>
                          </div>
                          <div>--joel</div>
                          <br>
                          <div class="gmail_quote">
                            <div dir="ltr" class="gmail_attr">On Sun,
                              Aug 11, 2019 at 10:49 AM Vaibhav Gupta
                              <<a href="mailto:vaibhavgupta40@gmail.com" rel="noreferrer" target="_blank">vaibhavgupta40@gmail.com</a>>
                              wrote:<br>
                            </div>
                            <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                              <div dir="ltr">
                                <div>Configure command I used to build
                                  BSP:</div>
                                <div>
                                  <div>==============================================</div>
                                </div>
                                <div>$
                                  /home/varodek/development/rtems/kernel/rtems/configure
--prefix=/home/varodek/development/rtems/5 --enable-maintainer-mode
                                  --target=riscv-rtems5
                                  --enable-rtemsbsp=rv32imac
                                  --enable-tests --enable-posix
                                  --disable-networking --enable-cxx
                                  RISCV_ENABLE_HTIF_SUPPORT=1</div>
                                <div>
                                  <div>==============================================</div>
                                  <div>.<br>
                                  </div>
                                  <div>.</div>
                                  <div>.</div>
                                  <div>.</div>
                                  <div>Qemu command I used to run test:</div>
                                  <div>
                                    <div>==============================================</div>
                                    <div>$ qemu-system-riscv32
                                      -no-reboot -nographic -machine
                                      virt -m 256M -kernel psxfenv01.exe</div>
                                    <div>
                                      <div>==============================================</div>
                                      <div>
                                        <div>.<br>
                                        </div>
                                        <div>.</div>
                                        <div>.</div>
                                        <div>.</div>
                                        <div>Makefile.am</div>
                                        <div>
                                          <div>==============================================</div>
                                          <div>+ if TEST_psxfenv01<br>
                                            + psx_tests += psxfenv01<br>
                                            + psxfenv01_SOURCES =
                                            psxfenv01/init.c<br>
                                            + psxfenv01_CPPFLAGS =
                                            $(AM_CPPFLAGS)
                                            $(TEST_FLAGS_psxfenv01) \<br>
                                            +       $(support_includes)<br>
                                            + psxfenv01_LDADD = -lm
                                            $(LDADD)<br>
                                            + endif</div>
                                          <div>+<br>
                                          </div>
                                          <div>
                                            <div>==============================================</div>
                                          </div>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                              </div>
                              <br>
                              <div class="gmail_quote">
                                <div dir="ltr" class="gmail_attr">On
                                  Sun, Aug 11, 2019 at 8:36 PM Vaibhav
                                  Gupta <<a href="mailto:vaibhavgupta40@gmail.com" rel="noreferrer" target="_blank">vaibhavgupta40@gmail.com</a>>
                                  wrote:<br>
                                </div>
                                <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                                  <div dir="ltr">
                                    <div>My code of testsuite:</div>
                                    <div>===============================================<br>
                                    </div>
                                    <div>  /* Test 'FE_DIVBYZERO' */<br>
                                        puts( "\nDivide by zero and
                                      confirm fetestexcept()." );<br>
                                        a = 0.0;<br>
                                        b = 1.0;<br>
                                        c = b/a;<br>
                                        printf("\n%d",FE_DIVBYZERO);<br>
                                       
                                      fegetexceptflag(&excepts,FE_ALL_EXCEPT);<br>
                                        printf("\n%d",excepts);<br>
                                        r = feraiseexcept(FE_DIVBYZERO);<br>
                                        printf("\n%d\n",r);<br>
                                        rtems_test_assert( fetestexcept(
                                      FE_DIVBYZERO ) );</div>
                                    <div>==============================================</div>
                                    <div>OUTPUT</div>
                                    <div>==============================================</div>
                                    <div>Divide by zero and confirm
                                      fetestexcept().<br>
                                      <br>
                                      8<br>
                                      0<br>
                                      1<br>
/home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/psxtests/psxfenv01/init.c:
                                      84 fetestexcept( FE_DIVBYZERO )<br>
                                    </div>
                                    <div>
                                      <div>==============================================</div>
                                      <div>EXPECTED OUTPUT</div>
                                      <div>
                                        <div>==============================================</div>
                                        <div>Divide by zero and confirm
                                          fetestexcept().<br>
                                          <br>
                                          8<br>
                                          8<br>
                                          0<br>
                                        </div>
                                        <div>
                                          <div>==============================================</div>
                                        </div>
                                      </div>
                                      <div>- fetestexcept( FE_DIVBYZERO
                                        ), should return a non-zero
                                        value as division-by-zero was
                                        performed.</div>
                                      <div>.</div>
                                      <div>-
                                        feraiseexcept(FE_DIVBYZERO); is
                                        also not working. It should
                                        return zero when successful</div>
                                      <div>.</div>
                                      <div>==============================================</div>
                                      <div><br>
                                      </div>
                                      <div>Thank You</div>
                                      <div>Vaibhav Gupta<br>
                                      </div>
                                      <div><br>
                                      </div>
                                    </div>
                                  </div>
                                </blockquote>
                              </div>
_______________________________________________<br>
                              devel mailing list<br>
                              <a href="mailto:devel@rtems.org" rel="noreferrer" target="_blank">devel@rtems.org</a><br>
                              <a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a></blockquote>
                          </div>
                        </div>
                      </blockquote>
                    </div>
                  </div>
                </blockquote>
              </div>
            </div>
          </blockquote>
        </div>
      </div>
      <br>
      <fieldset class="gmail-m_8259771743051112012m_-4400014926013136113mimeAttachmentHeader"></fieldset>
      <pre class="gmail-m_8259771743051112012m_-4400014926013136113moz-quote-pre">_______________________________________________
devel mailing list
<a class="gmail-m_8259771743051112012m_-4400014926013136113moz-txt-link-abbreviated" href="mailto:devel@rtems.org" rel="noreferrer" target="_blank">devel@rtems.org</a>
<a class="gmail-m_8259771743051112012m_-4400014926013136113moz-txt-link-freetext" href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a></pre>
    </blockquote>
  </div>

_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" rel="noreferrer" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a></blockquote></div>
</blockquote></div>