From 320c55590cc30d4ef5b2c1a226f0f940a6bdb445 Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Sun, 25 Apr 2021 13:57:47 +0200 Subject: Support __builtin_unreachable Not yet used for optimizations. --- riscV/Asmexpand.ml | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'riscV') diff --git a/riscV/Asmexpand.ml b/riscV/Asmexpand.ml index e8c142e9..dc0ec184 100644 --- a/riscV/Asmexpand.ml +++ b/riscV/Asmexpand.ml @@ -646,8 +646,12 @@ let expand_builtin_inline name args res = (fun rl -> emit (Pmulw (rl, X a, X b)); emit (Pmulhuw (rh, X a, X b))) + (* No operation *) | "__builtin_nop", [], _ -> emit Pnop + (* Optimization hint *) + | "__builtin_unreachable", [], _ -> + () (* Catch-all *) | _ -> raise (Error ("unrecognized builtin " ^ name)) -- cgit