[PATCH 2/2] ARC: Use intrinsics for __builtin_sub_overflow*()

2023-09-06 Thread Shahab Vahedi via Gcc-patches
This patch covers signed and unsigned subtractions. The generated code would be something along these lines: signed: sub.f r0, r1, r2 b.v @label unsigned: sub.f r0, r1, r2 b.c @label gcc/ChangeLog: * config/arc/arc.md (subsi3_v): New insn. (subvsi4): New

[PATCH 1/2] ARC: Use intrinsics for __builtin_add_overflow*()

2023-09-06 Thread Shahab Vahedi via Gcc-patches
This patch covers signed and unsigned additions. The generated code would be something along these lines: signed: add.f r0, r1, r2 b.v @label unsigned: add.f r0, r1, r2 b.c @label gcc/ChangeLog: * config/arc/arc-modes.def: Add CC_V mode. *