search for: fixsmul

Displaying 3 results from an estimated 3 matches for "fixsmul".

2018 Aug 22
2
Fixed Point Support in LLVM
...nsics called llvm.fixadd or llvm.fixmul or whatever with well-specified, target-independent semantics instead of a million target-specific intrinsics called something like llvm.supermips37.addfixvlq_16. Okay, then we're pretty much on the same page. In our implementation we have llvm.sat, llvm.fixsmul, llvm.add.sat, llvm.fixsmul.sat, etc. as described in Leonard's first mail in the thread. We have omitted many intrinsics that we don't need for our particular target/language (like unsigned multiplication, unsigned variations of saturating ops, and plain addition) but the basic design...
2018 Aug 22
2
Fixed Point Support in LLVM
...an argument that these ought to be > portable intrinsics, though. :) Can you clarify what you mean by portable? Portable from a target standpoint or from a language standpoint, or both? Either of these goals could be pretty tricky if the semantics of the intrinsics must be well defined ("fixsmul is equivalent to (trunc (lshr (mul (sext a), (sext b))))") rather than "fixsmul does a signed fixed-point multiplication". If a target or language has different semantics for their fixed-point operations, the intrinsics are useless to them. I would rather see them well defined th...
2018 Aug 21
4
Fixed Point Support in LLVM
If we were to create a new type down the line, I think the main features that would distinguish them from other types are the arbitrary width and scale. Saturation can be handled through instructions since saturation really only takes effect after an operation and doesn’t really describe anything about the bits in the resulting type. Signage can similarly be managed through operations and would be