Mill Computing, Inc. Forums The Mill Architecture Pipelining Reply To: Pipelining

c3d
Participant
Post count: 6

The compiler will still have to recognise it for what it is in order to know to use the Mill’s saturating opcodes in the emitted binary.

My suggestion was to use intrinsics for that part. Something like:

struct sat64 {
   sat64(u64 x): value(x) {}
   sat64(i64 x): value(x) {}
   sat64 &operator += (sat64 o) { value = __mill_sat64_add(value, o.value); }
   ...
private:
   u64 value;
};

No need of anything special for the compiler.

Regarding the comment that programs are written in C: are they written in C that is so bad that it won’t compile with a C++ compiler?