Jump to content

Joshua Landau

  • Content Count

  • Joined

  • Last visited

  • Days Won


Joshua Landau last won the day on May 25 2018

Joshua Landau had the most liked content!

About Joshua Landau

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi @vasu_c, thanks for finding this. The patch below should fix your issue if you want to try it out early. Apologies for the inconvenience. --- a/src/sysc/packages/qt/md/aarch64.s +++ b/src/sysc/packages/qt/md/aarch64.s @@ -59,8 +59,10 @@ qt_blocki: mov x0, sp // arg0 = old_sp mov sp, x3 // sp = new_sp + sub sp, sp, 160 // (*helper)(old_sp, a0, a1) blr x4 + add sp, sp, 160 // Callee-saved ldp x29, x30, [sp, #-16] // frame, link
  2. I don't have the test files on hand to double-check, but IIRC I believe it gets turned negative during the overflow step (called by cast, in turn called by sc_fxnum::sc_fxnum). Bear in mind that I'm new to SystemC, so I don't have a clear idea of what behaviours are expected or vice-versa.
  3. Thank you both. The explicit functions are implemented much the same way; static_cast<unsigned short>( m_rep->to_double() ) However, I expect you are right that doing the conversion before, rather than after, the multiplication by -1 is a better implementation than I gave. To elaborate, the code was invoking undefined behaviour before because b[i-1] was implicitly converting to double, which resulted in b[i-1] * i * -1 being a negative double, which was only then cast to ushort. An early cast would mean the multiplication results in an integral (likely of type in
  4. The regression suite, files systemc-regressions-2.3.1a/tests/systemc/datatypes/fx/constructors/array.cpp systemc-regressions-2.3.1a/tests/systemc/datatypes/fx/fast_constructors/array.cpp systemc-regressions-2.3.1a/tests/systemc/datatypes/misc/test02/test02.cpp invoke undefined behaviour by converting out-of-range doubles to unsigned integers directly. This is undefined in the C++ standard See http://stackoverflow.com/a/4752947/1763356 for further information. This happens multiple most prominently in the code sc_fxval *b = new sc_fxval[4]; b[0] = (ushort)
  • Create New...