1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/templates/native/float.h Thu Jul 12 00:15:16 2018 +0200
1.3 @@ -0,0 +1,48 @@
1.4 +/* Native functions for floating point operations.
1.5 +
1.6 +Copyright (C) 2018 Paul Boddie <paul@boddie.org.uk>
1.7 +
1.8 +This program is free software; you can redistribute it and/or modify it under
1.9 +the terms of the GNU General Public License as published by the Free Software
1.10 +Foundation; either version 3 of the License, or (at your option) any later
1.11 +version.
1.12 +
1.13 +This program is distributed in the hope that it will be useful, but WITHOUT
1.14 +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
1.15 +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
1.16 +details.
1.17 +
1.18 +You should have received a copy of the GNU General Public License along with
1.19 +this program. If not, see <http://www.gnu.org/licenses/>.
1.20 +*/
1.21 +
1.22 +#ifndef __NATIVE_FLOAT_H__
1.23 +#define __NATIVE_FLOAT_H__
1.24 +
1.25 +#include "types.h"
1.26 +
1.27 +/* Floating point operations. */
1.28 +
1.29 +__attr __fn_native_float_float_add(__attr __self, __attr self, __attr other);
1.30 +__attr __fn_native_float_float_sub(__attr __self, __attr self, __attr other);
1.31 +__attr __fn_native_float_float_mul(__attr __self, __attr self, __attr other);
1.32 +__attr __fn_native_float_float_div(__attr __self, __attr self, __attr other);
1.33 +__attr __fn_native_float_float_mod(__attr __self, __attr self, __attr other);
1.34 +__attr __fn_native_float_float_neg(__attr __self, __attr self);
1.35 +__attr __fn_native_float_float_pow(__attr __self, __attr self, __attr other);
1.36 +
1.37 +__attr __fn_native_float_float_le(__attr __self, __attr self, __attr other);
1.38 +__attr __fn_native_float_float_lt(__attr __self, __attr self, __attr other);
1.39 +__attr __fn_native_float_float_ge(__attr __self, __attr self, __attr other);
1.40 +__attr __fn_native_float_float_gt(__attr __self, __attr self, __attr other);
1.41 +__attr __fn_native_float_float_eq(__attr __self, __attr self, __attr other);
1.42 +__attr __fn_native_float_float_ne(__attr __self, __attr self, __attr other);
1.43 +
1.44 +__attr __fn_native_float_float_str(__attr __self, __attr self);
1.45 +__attr __fn_native_float_float_int(__attr __self, __attr self);
1.46 +
1.47 +/* Module initialisation. */
1.48 +
1.49 +void __main_native_float();
1.50 +
1.51 +#endif /* __NATIVE_FLOAT_H__ */