aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-expr.h
diff options
context:
space:
mode:
authorArthur Cohen <arthur.cohen@embecosm.com>2022-08-11 12:01:10 +0200
committerArthur Cohen <arthur.cohen@embecosm.com>2022-08-11 14:52:40 +0200
commit8899dc9bf70b193dc59dbc8e81400de22c203e8f (patch)
treed9972cf5dfca4299cfebf9f9eb4958372b3c923e /gcc/rust/backend/rust-compile-expr.h
parenteca2ac2c23e0c8b438fd696d4f85e35c9210d8dd (diff)
downloadgcc-8899dc9bf70b193dc59dbc8e81400de22c203e8f.zip
gcc-8899dc9bf70b193dc59dbc8e81400de22c203e8f.tar.gz
gcc-8899dc9bf70b193dc59dbc8e81400de22c203e8f.tar.bz2
intrinsics: Add wrapping_{add, sub, mul}
Since wrapping arithmetics are guaranteed in Rust, we turn on the -fwrapv and simply desugar wrapping_{add, sub, mul} to their non-checked inner operations. This is the only difference between a wrapping add and a regular addition: The regular addition will gain some checks for overflows, which are simply not used for the wrapping version.
Diffstat (limited to 'gcc/rust/backend/rust-compile-expr.h')
0 files changed, 0 insertions, 0 deletions