Skip to content
Snippets Groups Projects
Commit d6d7700a authored by Patrick Baudin's avatar Patrick Baudin
Browse files

[Libc] Define bit_test in new __fc_integer.h

parent 46ccc81a
No related branches found
No related tags found
No related merge requests found
......@@ -202,6 +202,7 @@ share/libc/__fc_define_wchar_t.h: CEA_LGPL
share/libc/__fc_define_wint_t.h: CEA_LGPL
share/libc/__fc_gcc_builtins.h: CEA_LGPL
share/libc/__fc_inet.h: CEA_LGPL
share/libc/__fc_integer.h: CEA_LGPL
share/libc/__fc_machdep.h: CEA_LGPL
share/libc/__fc_machdep_linux_shared.h: CEA_LGPL
share/libc/__fc_runtime.c: CEA_LGPL
......
/**************************************************************************/
/* */
/* This file is part of Frama-C. */
/* */
/* Copyright (C) 2007-2019 */
/* CEA (Commissariat à l'énergie atomique et aux énergies */
/* alternatives) */
/* */
/* you can redistribute it and/or modify it under the terms of the GNU */
/* Lesser General Public License as published by the Free Software */
/* Foundation, version 2.1. */
/* */
/* It is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU Lesser General Public License for more details. */
/* */
/* See the GNU Lesser General Public License version 2.1 */
/* for more details (enclosed in the file licenses/LGPLv2.1). */
/* */
/**************************************************************************/
#ifndef Frama_C_INTEGER
#define Frama_C_INTEGER
#include "features.h"
__PUSH_FC_STDLIB
/*@
logic boolean bit_test(integer x, integer pos) = (boolean)(x & (1<<pos));
*/
__POP_FC_STDLIB
#endif
......@@ -161,8 +161,7 @@ let init =
"\\pointer_comparable", [], [], [("p1", fun_ptr);
("p2", object_ptr)];
"\\pointer_comparable", [], [], [("p1", object_ptr);
("p2", fun_ptr)];
"\\bit_test", [], [], ["x", Linteger; "pos", Linteger] ;
("p2", fun_ptr)];
];
(* functions *)
List.iter
......
......@@ -36,6 +36,7 @@
[kernel] Parsing share/libc/__fc_define_wint_t.h (with preprocessing)
[kernel] Parsing share/libc/__fc_gcc_builtins.h (with preprocessing)
[kernel] Parsing share/libc/__fc_inet.h (with preprocessing)
[kernel] Parsing share/libc/__fc_integer.h (with preprocessing)
[kernel] Parsing share/libc/__fc_machdep.h (with preprocessing)
skipping share/libc/__fc_machdep_linux_shared.h
[kernel] Parsing share/libc/__fc_select.h (with preprocessing)
......
#include "__fc_integer.h"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment