aboutsummaryrefslogtreecommitdiff
path: root/libiberty/floatformat.c
AgeCommit message (Collapse)AuthorFilesLines
2017-01-04Update copyright years.Jakub Jelinek1-2/+1
From-SVN: r244052
2015-05-22libiberty.h (asprintf): Don't declare if HAVE_DECL_ASPRINTF is not defined.Yunlian Jiang1-1/+3
include/: * libiberty.h (asprintf): Don't declare if HAVE_DECL_ASPRINTF is not defined. libiberty/: * configure.ac: Add AC_GNU_SOURCE. * Makefile.in (COMPILE.c): Add -D_GNU_SOURCE. * configure, config.in: Rebuild. * floatformat.c (_GNU_SOURCE): Don't define if already defined. From-SVN: r223589
2013-08-20floatformat.h (floatformat_ibm_long_double): Delete.Alan Modra1-2/+11
include/ * floatformat.h (floatformat_ibm_long_double): Delete. (floatformat_ibm_long_double_big): Declare. (floatformat_ibm_long_double_little): Declare. libiberty/ * floatformat.c (floatformat_ibm_long_double): Rename to.. (floatformat_ibm_long_double_big): ..this. (floatformat_ibm_long_double_little): New. From-SVN: r201869
2012-08-17floatformat.c (floatformat_to_double): Correctly handle numbers between 1 and 2.Andreas Schwab1-24/+14
* floatformat.c (floatformat_to_double): Correctly handle numbers between 1 and 2. Simplify handling of denormal number. (main): Test with 1.1. From-SVN: r190493
2011-01-03Update Copyright years for files modified in 2010.Jakub Jelinek1-1/+1
From-SVN: r168438
2010-07-06floatformat.h (floatformat_ieee_half_big): Add declaration.Ken Werner1-1/+17
include/ChangeLog: 2010-07-06 Ken Werner <ken.werner@de.ibm.com> * floatformat.h (floatformat_ieee_half_big): Add declaration. (floatformat_ieee_half_little): Likewise. libiberty/ChangeLog: 2010-07-06 Ken Werner <ken.werner@de.ibm.com> * floatformat.c (floatformat_ieee_half_big): New variable. (floatformat_ieee_half_little): Likewise. From-SVN: r161867
2007-11-13floatformat.c (floatformat_ibm_long_double_is_valid): Fix compiler warnings.Joseph Myers1-7/+4
* floatformat.c (floatformat_ibm_long_double_is_valid): Fix compiler warnings. (floatformat_ibm_long_double): Use floatformat_ibm_long_double_is_valid. From-SVN: r130131
2007-11-08floatformat.h (struct floatformat): Add split_half field.Joseph Myers1-39/+170
include: 2007-11-07 Joseph Myers <joseph@codesourcery.com> Daniel Jacobowitz <dan@codesourcery.com> * floatformat.h (struct floatformat): Add split_half field. (floatformat_ibm_long_double): New. libiberty: 2007-11-07 Joseph Myers <joseph@codesourcery.com> Daniel Jacobowitz <dan@codesourcery.com> * floatformat.c (mant_bits_set): New. (floatformat_to_double): Use it. Note no special handling of split formats. (floatformat_from_double): Note no special handing of split formats. (floatformat_ibm_long_double_is_valid, floatformat_ibm_long_double): New. (floatformat_ieee_single_big, floatformat_ieee_single_little, floatformat_ieee_double_big, floatformat_ieee_double_little, floatformat_ieee_double_littlebyte_bigword, floatformat_vax_f, floatformat_vax_d, floatformat_vax_g, floatformat_i387_ext, floatformat_m68881_ext, floatformat_i960_ext, floatformat_m88110_ext, floatformat_m88110_harris_ext, floatformat_arm_ext_big, floatformat_arm_ext_littlebyte_bigword, floatformat_ia64_spill_big, floatformat_ia64_spill_little, floatformat_ia64_quad_big, floatformat_ia64_quad_little): Update for addition of split_half field. Co-Authored-By: Daniel Jacobowitz <dan@codesourcery.com> From-SVN: r129977
2006-11-07floatformat.c (get_field): Fix segfault with little-endian word order on ↵Julian Brown1-60/+49
64-bit hosts. * floatformat.c (get_field): Fix segfault with little-endian word order on 64-bit hosts. (put_field): Likewise. (min): Move definition. From-SVN: r118552
2006-04-24floatformat.c (floatformat_to_double): Fix (biased) exponent=0 case.Julian Brown1-1/+1
* floatformat.c (floatformat_to_double): Fix (biased) exponent=0 case. From-SVN: r113228
2006-02-11re PR bootstrap/16787 (NAN constant "(0.0/0.0)" cannot be compiled by Tru64 cc)Roger Sayle1-1/+10
2006-02-11 Roger Sayle <roger@eyesopen.com> R. Scott Bailey <scott.bailey@eds.com> Bill Northcott <w.northcott@unsw.edu.au> PR bootstrap/16787 * floatformat.c: Include <float.h> where available. (NAN): Use value of DBL_QNAN if defined, and NAN isn't. Co-Authored-By: Bill Northcott <w.northcott@unsw.edu.au> Co-Authored-By: R. Scott Bailey <scott.bailey@eds.com> From-SVN: r110873
2005-12-17floatformat.c (floatformat_i387_ext_is_valid): Use explicit cast to convert ↵Gabriel Dos Reis1-3/+3
from "from". * floatformat.c (floatformat_i387_ext_is_valid): Use explicit cast to convert from "from". (floatformat_to_double): Likewise. (floatformat_from_double): Use explicit cast to convert from "to". From-SVN: r108717
2005-10-31from Mark Kettenis <kettenis@gnu.org>Mark Kettenis1-0/+24
* floatformat.c (floatformat_vax_aingle, floatformat_vax_double): New variables. * floatformat.h (enum floatformat_byteorders): Add floatformat_vax. (floatformat_vax_aingle, floatformat_vax_double): Declare. From-SVN: r106281
2005-08-17floatformat.c (floatformat_always_valid): Change type of last argument to ↵Mark Kettenis1-17/+17
`void *'. [libiberty] * floatformat.c (floatformat_always_valid): Change type of last argument to `void *'. (floatformat_i387_ext_is_valid): Likewise. (floatformat_to_double): Change type of second argument to `const void *'. (floatformat_from_double): Change type of last argument to `void *'. (floatformat_is_valid): Change type of last argument to `const void *'. (ieee_test): Remove redundant casts. [include] * floatformat.h (struct floatformat): Change type of large argument for is_valid member to `const void *'. (floatformat_to_double): Change type of second argument to `const void *'. (floatformat_from_double): Change type of last argument to `void *'. (floatformat_is_valid): Change type of last argument to `const void *'. From-SVN: r103218
2005-07-12floatformat.c (floatformat_to_double): Add a comment about a potential ↵Ben Elliston1-0/+7
source of warnings when compiling this file. * floatformat.c (floatformat_to_double): Add a comment about a potential source of warnings when compiling this file. From-SVN: r101914
2005-05-10Update the address and phone number of the FSF organization.Nick Clifton1-1/+1
From-SVN: r99519
2005-03-27md5.h: Remove definition and uses of __P.Gabriel Dos Reis1-46/+28
include/ 2005-03-27 Gabriel Dos Reis <gdr@integrable-solutions.net> * md5.h: Remove definition and uses of __P. * dyn-string.h: Remove uses of PARAMS. * fibheap.h: Likewise. * floatformat.h: Likewise. * hashtab.h: Likewise. libiberty/ 2005-03-27 Gabriel Dos Reis <gdr@integrable-solutions.net> Convert libiberty to use ISO C prototype style 4/n. * hashtab.c (higher_prime_index, hash_pointer, eq_pointer, htab_size, htab_elements, htab_mod_1, htab_mod, htab_mod_m2, htab_create_alloc, htab_set_functions_ex, htab_create, htab_try_create, htab_delete, htab_empty, find_empty_slot_for_expand, htab_expand, htab_find_with_hash, htab_find, htab_find_slot_with_hash, htab_find_slot, htab_remove_elt, htab_remove_elt_with_hash, htab_clear_slot, htab_traverse_noresize, htab_traverse, htab_collisions, htab_hash_string, iterative_hash): Use ISO C prototype. * hex.c (hex_init): Likewise. * index.c (index): Likewise. * insque.c (insque, remque): Likewise. * lbasename.c (lbasename): Likewise. * lrealpath.c (lrealpath): Likewise. * make-relative-prefix.c (save_string, split_directories, free_split_directories, make_relative_prefix): Likewise. * make-temp-file.c (try, choose_tmpdir, make_temp_file): Likewise. * md5.c (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream, md5_buffer, md5_process_bytes, md5_process_block): Likewise. * memchr.c (memchr): Likewise. * memcpy.c (memcpy): Likewise. * memmove.c (memmove): Likewise. * gettimeofday.c (gettimeofday): Likewise. * getruntime.c (get_run_time): Likewise. * getpwd.c (getpwd, getpwd): Likewise. * getpagesize.c (getpagesize): Likewise. * getopt1.c (getopt_long, getopt_long_only, main): Likewise. * getopt.c (my_index, exchange, _getopt_initialize, _getopt_internal, getopt, main): Likewise. * getcwd.c (getcwd): Likewise. * fnmatch.c (fnmatch): Likewise. * floatformat.c (floatformat_always_valid, floatformat_i387_ext_is_valid, get_field, floatformat_to_double, put_field, floatformat_from_double, floatformat_is_valid, ieee_test, main): Likewise. * fibheap.c (fibheap_new, fibnode_new, fibheap_compare, fibheap_comp_data, fibheap_insert, fibheap_min, fibheap_min_key, fibheap_union, fibheap_extract_min, fibheap_replace_key_data, fibheap_replace_key, fibheap_replace_data, fibheap_delete_node, fibheap_delete, fibheap_empty, fibheap_extr_min_node, fibheap_ins_root, fibheap_rem_root, fibheap_consolidate, fibheap_link, fibheap_cut, fibheap_cascading_cut, fibnode_insert_after, fibnode_remove): Likewise. * ffs.c (ffs): Likewise. * fdmatch.c (fdmatch): Likewise. * dyn-string.c (dyn_string_init, dyn_string_new, dyn_string_delete, dyn_string_release, dyn_string_resize, dyn_string_clear, dyn_string_copy, dyn_string_copy_cstr, dyn_string_prepend, dyn_string_prepend_cstr, dyn_string_insert, dyn_string_insert_cstr, dyn_string_insert_char, dyn_string_append, dyn_string_append_cstr, dyn_string_append_char, dyn_string_substring, dyn_string_eq): Likewise. From-SVN: r97113
2003-12-03floatformat.c: Include "config.h" and <string.h> if available.Ian Lance Taylor1-38/+145
* floatformat.c: Include "config.h" and <string.h> if available. (INFINITY, NAN): Define if not defined by <math.h>. (floatformat_to_double): Handle NaN, infinity, and denormalized numbers. (floatformat_from_double): Likewise. (ieee_test): In debugging code, use little endian rather than big endian. Correct tests to handle NaN and to check correct sign of zero. Omit m68k extended test. (main): Add more debugging cases. From-SVN: r74237
2003-10-31* floatformat.c (floatformat_always_valid): Add unused attribute.Andreas Jaeger1-2/+2
From-SVN: r73119
2003-09-22floatformat.h (struct floatformat): Add field "is_valid".Andrew Cagney1-46/+74
2003-09-22 Andrew Cagney <cagney@redhat.com> * floatformat.h (struct floatformat): Add field "is_valid". 2003-09-22 Andrew Cagney <cagney@redhat.com> * floatformat.c (floatformat_i387_ext_is_valid): New function. (floatformat_always_valid): New function. (floatformat_i387_ext): Initialize new "is_valid" field to "floatformat_i387_ext_is_valid". (floatformat_ieee_single_little): Initialize "is_valid" field to floatformat_always_valid. (floatformat_ieee_double_big): Ditto. (floatformat_ieee_double_little): Ditto. (floatformat_ieee_double_little): Ditto. (floatformat_ieee_double_littlebyte_bigword): Ditto. (floatformat_i960_ext): Ditto. (floatformat_m88110_ext): Ditto. (floatformat_m88110_harris_ext): Ditto. (floatformat_arm_ext_big): Ditto. (floatformat_arm_ext_littlebyte_bigword): Ditto. (floatformat_ia64_spill_big): Ditto. (floatformat_ia64_spill_little): Ditto. (floatformat_ia64_quad_big): Ditto. (floatformat_ia64_quad_little): Ditto. (floatformat_ia64_quad_little): Ditto. (floatformat_is_valid): Call "is_valid". From-SVN: r71659
2003-09-16Index: include/ChangeLogAndrew Cagney1-7/+7
2003-09-15 Andrew Cagney <cagney@redhat.com> * floatformat.h (floatformat_to_double): Make input buffer constant. (floatformat_from_double, floatformat_is_valid): Ditto. Index: libiberty/ChangeLog 2003-09-15 Andrew Cagney <cagney@redhat.com> * floatformat.c (get_field): Make "data" constant. (floatformat_is_valid, floatformat_to_double): Make "from" constant, fix casts. (floatformat_from_double): Make "from" constant. From-SVN: r71422
2003-09-15floatformat.c (floatformat_is_valid): New function.Daniel Jacobowitz1-3/+36
* floatformat.c (floatformat_is_valid): New function. (get_field, put_field): Correct comments. From-SVN: r71405
2003-04-15argv.c: Fix comments.Kaveh R. Ghazi1-1/+2
* argv.c: Fix comments. * calloc.c: Don't unnecessarily include "libiberty.h". (bzero): Add prototype. * floatformat.c: Include "ansidecl.h", rely on ANSI_PROTOTYPES. * getcwd.c (getcwd): Use standard definition to avoid conflicts with system headers. * hashtab.c (htab_traverse): Delete unused variables. * rename.c: Include "ansidecl.h". (rename): Use standard definition to avoid conflicts with system headers. * strsignal.c: Rely on ANSI_PROTOTYPES. * strstr.c: Check GNUC >= 2, not GNUC == 2. * vfprintf.c: Include "ansidecl.h", rely on ANSI_PROTOTYPES. * vprintf.c: Include "ansidecl.h" earlier, rely on ANSI_PROTOTYPES. * vsprintf.c: Include "ansidecl.h" earlier, rely on ANSI_PROTOTYPES and possibly include <stdarg.h>. * Makefile.in: Regenerate dependencies. From-SVN: r65659
2002-03-06Remove floatformat_arm_ext.Andrew Cagney1-7/+0
From-SVN: r50345
2001-08-21floatformat.h (floatformat_arm_ext): Document as deprecated.Andrew Cagney1-7/+45
* floatformat.h (floatformat_arm_ext): Document as deprecated. (floatformat_arm_ext_big, floatformat_arm_ext_littlebyte_bigword) (floatformat_ia64_spill_little, floatformat_ia64_quad_little) (floatformat_ia64_spill_big, floatformat_ia64_quad_big) (floatformat_m88110_harris_ext): Declare. From-SVN: r45065
2001-08-14floatformat.c (floatformat_ieee_double_littlebyte_bigword): Fix name.Andrew Cagney1-1/+1
* floatformat.c (floatformat_ieee_double_littlebyte_bigword): Fix name. From-SVN: r44878
2000-05-31Add field ``name'' to floatformat.Andrew Cagney1-12/+29
From-SVN: r34292
2000-03-24merge from bfdlandIan Lance Taylor1-5/+5
From-SVN: r32729
1998-12-22Warning fixes:Kaveh R. Ghazi1-4/+6
* argv.c (buildargv): Cast the result of alloca in assignment. * choose-temp.c: Include stdlib.h. * cplus-dem.c (demangle_arm_pt): Remove unused prototype. (snarf_numeric_literal): Constify first parameter. (code_for_qualifier): Avoid a gcc extension, make the parameter an int, not a char. (demangle_qualifier): Likewise. (demangle_signature): Cast the argument of a ctype function to unsigned char. (arm_pt): Add parens around assignment used as truth value. (demangle_arm_hp_template): Constify variable `args'. (do_hpacc_template_const_value): Cast the argument of a ctype function to unsigned char. (do_hpacc_template_literal): Remove unused variable `i'. (snarf_numeric_literal): Constify parameter `args'. Cast the argument of a ctype function to unsigned char. * floatformat.c (floatformat_to_double): Add explicit braces to avoid ambiguous `else'. * fnmatch.c (fnmatch): Change type of variables `c', `c1', `cstart' and `cend' to unsigned char. Cast the argument of macro `FOLD', which uses ctype functions, to unsigned char. * objalloc.c (free): Add prototype. From-SVN: r24392
1998-12-14choose-temp.c: Don't check IN_GCC anymore.Kaveh R. Ghazi1-1/+1
* choose-temp.c: Don't check IN_GCC anymore. * floatformat.c (floatformat_from_double): Use `const', not `CONST'. * memchr.c (memchr): Likewise. * memcpy.c (memcpy): Likewise. * memmove.c (memmove): Likewise. * mkstemp.c: Don't check IN_GCC anymore. * pexecute.c: Likewise. * splay-tree.c: Likewise. * strchr.c (strchr): Use `const', not `CONST'. * strrchr.c (strrchr): Likewise. * strtol.c (strtol): Likewise. * strtoul.c (strtoul): Likewise. From-SVN: r24307
1997-08-21Initial revisionJason Merrill1-0/+401
From-SVN: r14877