<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 6:22 PM Hesham Almatary <<a href="mailto:heshamelmatary@gmail.com">heshamelmatary@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">On Sun, 11 Aug 2019 at 16:49, Vaibhav Gupta <<a href="mailto:vaibhavgupta40@gmail.com" target="_blank">vaibhavgupta40@gmail.com</a>> wrote:<br>
><br>
> Configure command I used to build BSP:<br>
> ==============================================<br>
> $ /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<br>
> ==============================================<br>
> .<br>
RISCV_ENABLE_HTIF_SUPPORT=1 should only be used if you're going to run<br>
on a Spike platform. I see you're using virt below<br></blockquote><div>Yah this was the time I was doing all kind of experiments to run the hello world thing.</div><div>I have disabled HTIF now.<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> .<br>
> .<br>
> .<br>
> Qemu command I used to run test:<br>
> ==============================================<br>
> $ qemu-system-riscv32 -no-reboot -nographic -machine virt -m 256M -kernel psxfenv01.exe<br>
> ==============================================<br>
> .<br>
> .<br>
> .<br>
> .<br>
> Makefile.am<br>
> ==============================================<br>
> + 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<br>
> +<br>
> ==============================================<br>
><br>
> On Sun, Aug 11, 2019 at 8:36 PM Vaibhav Gupta <<a href="mailto:vaibhavgupta40@gmail.com" target="_blank">vaibhavgupta40@gmail.com</a>> wrote:<br>
>><br>
>> My code of testsuite:<br>
>> ===============================================<br>
>> /* 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 ) );<br>
>> ==============================================<br>
>> OUTPUT<br>
>> ==============================================<br>
>> 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>
>> ==============================================<br>
>> EXPECTED OUTPUT<br>
>> ==============================================<br>
>> Divide by zero and confirm fetestexcept().<br>
>><br>
>> 8<br>
>> 8<br>
>> 0<br>
>> ==============================================<br>
>> - fetestexcept( FE_DIVBYZERO ), should return a non-zero value as division-by-zero was performed.<br>
>> .<br>
>> - feraiseexcept(FE_DIVBYZERO); is also not working. It should return zero when successful<br>
>> .<br>
>> ==============================================<br>
>><br>
>> Thank You<br>
>> Vaibhav Gupta<br>
>><br>
> _______________________________________________<br>
> devel mailing list<br>
> <a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
> <a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
<br>
-- <br>
Hesham<br>
</blockquote></div></div>