[Libre-soc-isa] [Bug 608] New: Add JavaScript ToInt32 instruction (f64 -> i32 with wrapping)

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Tue Mar 2 20:10:10 GMT 2021


https://bugs.libre-soc.org/show_bug.cgi?id=608

            Bug ID: 608
           Summary: Add JavaScript ToInt32 instruction (f64 -> i32 with
                    wrapping)
           Product: Libre-SOC's first SoC
           Version: unspecified
          Hardware: Other
                OS: Linux
            Status: CONFIRMED
          Severity: enhancement
          Priority: ---
         Component: Specification
          Assignee: lkcl at lkcl.net
          Reporter: programmerjake at gmail.com
                CC: libre-soc-isa at lists.libre-soc.org
   NLnet milestone: ---

Created attachment 127
  --> https://bugs.libre-soc.org/attachment.cgi?id=127&action=edit
example implementation in C

Arm v8.3A added an instruction for accelerating JavaScript's ToInt32 operation.
OpenPower could also benefit from adding something like that too, since the
required operation can be easily implemented in hardware but there isn't any
existing instruction sequence that can as efficiently implement that in
software, since the existing instructions all saturate (iirc) instead of
wrapping.

http://lists.libre-soc.org/pipermail/libre-soc-dev/2021-March/002055.html
http://lists.libre-soc.org/pipermail/libre-soc-dev/2021-March/002064.html

Example implementation in C:
https://gcc.godbolt.org/z/4KPxxh

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Libre-SOC-ISA mailing list