1 2006-01-23 Ben Elliston <bje@au.ibm.com>
3 * dfp.c (dfp_byte_swap): Change type of u.i to uint32_t.
5 2006-01-20 Ben Elliston <bje@au.ibm.com>
7 * calls.c (emit_library_call_value_1): Use SYMBOL_REF_DECL to pass
8 the function decl, not get_identifier.
10 2006-01-19 Ben Elliston <bje@au.ibm.com>
12 * config/i386/i386.c (classify_argument): Pass SDmode, DDmode and
13 TDmode values in XMM registers.
14 (ix86_libcall_value): Return values in XMM registers.
16 * dfp.c (dfp_byte_swap): Make param a uint32_t. Return uint32_t.
17 * varasm.c (assemble_real): Initialise data array.
19 2006-01-18 Ben Elliston <bje@au.ibm.com>
21 * config/i386/i386.h (ALIGN_MODE_128): Remove TDmode.
22 * config/i386/i386.c (classify_argument): Omit decimal modes.
23 (function_arg_advance): Do not handle SDmode, DDmode.
24 (function_arg): Likewise, do not handle SDmode, DDmode.
25 (ix86_return_in_memory): No special treatment for TDmode.
26 (ix86_value_regno): Tidy.
27 (print_operand): Omit SDmode handling.
28 (ix86_hard_regno_mode_ok): Remove decimal float mode handling.
30 2006-01-17 Ben Elliston <bje@au.ibm.com>
32 * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): Reject
33 decimal float modes for all floating point registers.
35 2006-01-16 Ben Elliston <bje@au.ibm.com>
37 * config/rs6000/predicates.md (reg_or_mem_operand): Pair up
38 match_code "mem" with match_test "macho_lo_sum_memory_operand" so
39 that subreg'ed mem expressions are not rejected by this predicate.
41 2006-01-12 Ben Elliston <bje@au.ibm.com>
43 * config/i386/t-linux (TARGET_LIBGCC2_CFLAGS): Remove.
44 * config/i386/t-linux64 (TARGET_LIBGCC2_CFLAGS): Likewise.
45 * config/i386/i386.c (ALIGN_MODE_128): Include TDmode.
47 2006-01-12 Ben Elliston <bje@au.ibm.com>
49 * expr.c (emit_move_insn_1): If unable to move decimal floats via
50 integer, use a multi word move.
52 * doc/tm.texi (Data Output): Add REAL_VALUE_TO_TARGET_DECIMAL32,
53 REAL_VALUE_TO_TARGET_DECIMAL64 and REAL_VALUE_TO_TARGET_DECIMAL128
56 * config/i386/i386.c (ix86_scalar_mode_supported): Revert patch
59 2006-01-11 Ben Elliston <bje@au.ibm.com>
61 * config/i386/i386.c (ix86_scalar_mode_supported_p): Return false
62 for DFP modes > 64 bits in size on 32-bit targets.
64 2006-01-11 Ben Elliston <bje@au.ibm.com>
66 * config/i386.c (ix86_must_pass_in_stack): Pass TDmode in stack.
67 (classify_argument): Treat DDmode like DImode, TImode like TDmode.
68 (function_arg_advance): Handle DDmode like DImode. Remove TDmode.
69 (function_arg): Handle SDmode like SImode, DDmode like DImode.
70 (ix86_return_in_memory): Return true for TDmode.
71 (ix86_value_regno): Clean up. Use DECIMAL_FLOAT_MODE_P predicate.
72 (ix86_hard_regno_mode_ok): Likewise.
74 2006-01-11 Ben Elliston <bje@au.ibm.com>
76 * config/i386/i386.c (TARGET_DECIMAL_FLOAT_SUPPORTED_P): Remove.
77 (override_options): Do not force SSE support on if decimal
78 floating point support is enabled.
79 (ix86_decimal_float_supported_p): Remove; use default hook.
80 * config/i386/i386.h (VALID_SSE_REG_MODE): Remove TDmode.
81 (SSE_REG_MODE_P): Likewise.
83 2006-01-10 Ben Elliston <bje@au.ibm.com>
85 * config/i386/i386.md (mode): Remove SD, DD, TD values.
87 2006-01-10 Ben Elliston <bje@au.ibm.com>
89 * expr.c (emit_move_change_mode): When reload not in progress,
90 adjust addresses using adjust_address, not adjust_address_nv.
93 2006-01-10 Ben Elliston <bje@au.ibm.com>
95 * config/i386/decimal.md: Remove.
96 * config/i386/i386.md: Don't include it.
98 2006-01-10 Ben Elliston <bje@au.ibm.com>
100 * expr.c (emit_move_insn_1): Pass true for the `force' parameter
101 when calling emit_move_via_integer.
103 * expr.c (emit_move_change_mode): Always adjust addresses, not
104 just during reload. Copy replacements only during reload.
105 (emit_move_insn_1): Move MODE_DECIMAL_FLOAT modes by invoking
106 emit_move_via_integer.
107 (emit_move_change_dfp_mode): Remove.
108 (emit_move_decimal_float): Likewise.
110 2006-01-09 Ben Elliston <bje@au.ibm.com>
112 * expr.c (emit_move_decimal_float): Assert MODE_DECIMAL_FLOAT.
113 Update the function comment accordingly.
115 * expr.c (emit_move_change_dfp_mode): New.
116 (emit_move_decimal_float): New.
117 (emit_move_insn_1): Handle decimal floating point modes by calling
118 emit_move_decimal_float.
119 * config/rs6000/decimal.md: Remove.
120 * config/rs6000/rs6000.md: Do not include "decimal.md".
121 * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): Omit SDmode.
122 (rs6000_legitimize_address): Likewise for TDmode.
123 (rs6000_legitimize_reload_address): Likewise.
124 (rs6000_legitimate_address): Likewise.
125 (rs6000_legitimate_offset_address_p): Remove special handling for
127 (rs6000_emit_move): Likewise for SDmode, DDmode and TDmode.
128 (USE_FP_FOR_ARG): Exclude all decimal float modes for now.
129 (rs6000_return_in_memory): Exclude TDmode.
130 (function_arg_advance): Likewise for DDmode and TDmode.
131 (function_arg): Likewise for DDmode and TDmode.
132 (rs6000_pass_by_reference): Exclude TDmode.
133 (rs6000_gimplify_va_arg): Likewise for DDmode and TDmode.
134 (rs6000_register_move_cost): Exclude TDmode.
135 (rs6000_function_value): Use GP_ARG_RETURN for all decimal modes.
136 (rs6000_libcall_value): Likewise.
138 2006-01-05 Ben Elliston <bje@au.ibm.com>
140 * config/rs6000/rs6000.c (debug_stack_info): Revert trivial hunk.
142 2006-01-04 Ben Elliston <bje@au.ibm.com>
144 * config/fp-bit.h: Use top-of-file comment from libgcc2.c.
145 * config/fp-bit.c: Likewise.
147 2005-12-21 Janis Johnson <janis187@us.ibm.com>
149 * config/rs6000/rs6000.c: Remove rs6000_decimal_float_supported_p
152 2005-12-21 Ben Elliston <bje@au.ibm.com>
154 * targhooks.h (default_decimal_float_supported_p): Declare.
155 * targhooks.c (default_decimal_float_supported_p): Non-static.
157 * targhooks.c (default_decimal_float_supported_p): New.
158 * target-def.h (TARGET_DECIMAL_FLOAT_SUPPORTED_P): Define as
159 default_decimal_float_supported_p, not hook_bool_void_false.
160 * config/rs6000/rs6000.c (TARGET_DECIMAL_FLOAT_SUPPORTED_P):
162 (rs6000_decimal_float_supported_p): Likewise.
164 2005-12-21 Ben Elliston <bje@au.ibm.com>
166 * config/rs6000/rs6000.c (rs6000_scalar_mode_supported_p): Return
167 true for decimal float modes regardless of the front-end language.
169 2005-12-20 Ben Elliston <bje@au.ibm.com>
171 * config/i386/i386.c (override_options): Turn on SSE support if
172 decimal floating point support is enabled.
174 2005-12-20 Ben Elliston <bje@au.ibm.com>
176 * doc/install.texi (Configuration): Document --enable-decimal-float.
178 2005-12-20 Ben Elliston <bje@au.ibm.com>
180 * config/i386/i386.md: Move mov?d patterns to ..
181 * config/i386/decimal.md: .. here.
183 2005-12-20 Ben Elliston <bje@au.ibm.com>
185 * config/i386/i386.md (movsd, movdd, movtdd): Make these expanders
186 conditional on ENABLE_DECIMAL_FLOAT.
187 (*movsd_constant, *movsd_gprs, *movdd_sse, *movtd_sse): Likewise.
189 2005-12-20 Ben Elliston <bje@au.ibm.com>
191 * config/rs6000/rs6000.md: Move mov?d patterns to ..
192 * config/rs6000/decimal.md: .. here.
194 2005-12-20 Ben Elliston <bje@au.ibm.com>
196 * configure.ac: Match i?86, not ?86 for --enable-decimal-float.
197 * configure: Regenerate.
199 2005-12-19 Ben Elliston <bje@au.ibm.com>
201 * config/rs6000/rs6000.md (movsd, *movsd_gpr, movdd,
202 *movdd_fprs32, *movdd_fprs64, movtd, *movtd_internal): Make
203 conditional on ENABLE_DECIMAL_FLOAT.
205 2005-12-16 Ben Elliston <bje@au.ibm.com>
207 * c-cppbuiltin.c (builtin_define_decimal_float_constants): Rename
208 from builtin_define_decfloat_constants. Add name_prefix, suffix
209 and type parameters. Compute all of the __DEC_x__ macros using
210 struct real_format fields.
211 (c_cpp_builtins): Define __DEC_EVAL_METHOD__ alongside the
212 existing __FLT_EVAL_METHOD__. Replace single call to
213 builtin_define_decimal_float_constants with three parameterised
216 2005-12-16 Ben Elliston <bje@au.ibm.com>
218 * real.c (decimal_quad_format): Correct the values for emin and
219 emax, as some digits in the values were incorrectly transposed.
221 2005-12-15 Ben Elliston <bje@au.ibm.com>
224 * c-cppbuiltin.c (builtin_define_decfloat_constants): Remove.
225 (c_cpp_builtins): Remove call to the above. Register a builtin
226 __DEC_EVAL_METHOD__ define.
227 * ginclude/decfloat.h: Replace preprocessor defines produced by
228 calls in builtin_define_decfloat_constants above with #defines.
230 2005-12-14 Ben Elliston <bje@au.ibm.com>
232 * ginclude/decfloat.h (FLT_EPSILON): Remove.
233 (DEC32_EPSILON): Define as __DEC32_EPSILON__.
235 2005-12-13 Ben Elliston <bje@au.ibm.com>
237 * c-cppbuiltin.c (builtin_define_decfloat_constants): Remove.
238 (c_cpp_builtins): Remove call to the above. Register a builtin
239 __DEC_EVAL_METHOD__ define.
240 * ginclude/decfloat.h: Replace preprocessor defines produced by
241 calls in builtin_define_decfloat_constants above with #defines.
243 2005-12-07 Ben Elliston <bje@au.ibm.com>
245 * config/rs6000/rs6000.c: Break long lines.
247 2005-12-06 Ben Elliston <bje@au.ibm.com>
249 * optabs.c (init_optabs): Add floatun libfuncs for decimal float.
250 * convert.c (convert_to_real): Formatting.
251 * emit-rtl.c (init_emit_once): Formatting.
253 2005-12-06 Ben Elliston <bje@au.ibm.com>
255 * doc/extend.texi (Decimal Float): New node.
256 (Constructing Calls): Document decimal float built-ins.
258 2005-12-06 Ben Elliston <bje@au.ibm.com>
260 * c-lex.c (interpret_float): Remove stray '>' from format string.
261 * c-decl.c (declspecs_add_type): Improve diagnostic. No version
262 of ISO C supports decimal floating point.
264 2005-12-05 Ben Elliston <bje@au.ibm.com>
266 * ginclude/decfloat.h: Update FSF office address.
268 2005-12-02 Ben Elliston <bje@au.ibm.com>
270 * Makefile.in: Discard residual differences against the trunk.
272 2005-12-01 Ben Elliston <bje@au.ibm.com>
274 * real.c (real_from_string3): Improve leading comment. Inline the
275 body of decimal_real_from_string.
276 * dfp.h: Add more comments.
277 (decimal_real_from_string): Update prototype due to renaming.
278 (decimal_real_convert): Remove formal parameter names from prototype.
279 * dfp.c: Improve comments throughout.
280 (decimal_from_decnumber): Improve comments. Rename "set"
281 parameter to "context".
282 (decimal_real_from_string): Remove.
283 (decimal_from_string): Rename to decimal_real_from_string.
284 (decimal_from_binary): Call decimal_real_from_string.
285 (decimal_real_maxval): Likewise.
287 2005-11-29 Ben Elliston <bje@au.ibm.com>
289 * dfp.h: Reorder prototypes. Tidy.
290 * dfp.c (decode_decimal32): Implement.
291 (decode_decimal64, decode_decimal128): Likewise.
293 2005-11-29 Ben Elliston <bje@au.ibm.com>
295 * dfp.h: Improve comment.
296 * dfp.c (dfp_byte_swap): New static function.
297 (encode_decimal32): Call dfp_byte_swap, not __dec_byte_swap.
298 (encode_decimal64): Likewise.
299 (encode_decimal128): Likewise.
301 2005-11-29 Ben Elliston <bje@au.ibm.com>
303 * dfp.h (ENCODE_DECIMAL_SINGLE, ENCODE_DECIMAL_DOUBLE,
304 ENCODE_DECIMAL_QUAD, DECODE_DECIMAL_SINGLE, DECODE_DECIMAL_DOUBLE,
305 DECODE_DECIMAL_SINGLE, DECIMAL_DO_COMPARE,
306 REAL_OR_DECIMAL_FROM_STRING): Remove macros.
307 * real.c: Update all macro uses.
308 * dfp.c (decimal_from_string): Use decNumber, decContext locals.
309 (decimal_to_decnumber): Likewise.
310 (encode_decimal32, encode_decimal64, encode_decimal128): Likewise.
311 (decimal_to_binary, decimal_from_binary): Likewise.
312 (decimal_do_compare, decimal_do_add): Likewise.
313 (decimal_do_multiply, decimal_do_divide): Likewise.
314 (decimal_real_to_integer, decimal_real_to_integer2): Likewise.
315 (decimal_real_maxval): Update comment.
317 2005-11-29 Ben Elliston <bje@au.ibm.com>
319 * mklibgcc.in: Refer to libdecnumber, not decnumber.
320 * Makefile.in: Likewise.
322 2005-11-25 Ben Elliston <bje@au.ibm.com>
324 * decimal32.h, decimal64.h, decimal128.h: Move to top-level.
325 * decimal32.c, decimal64.c, decimal128.c: Likewise.
326 * decContext.c, decContext.h: Likewise.
327 * decUtility.c, decUtility.h: Likewise.
328 * decNumber.c, decNumber.h, decNumberLocal.h: Likewise.
329 * decDPD.h: Likewise.
330 * decLibrary.c, decRound.c: Likewise.
331 * mklibgcc.in (decnumber_dep): Update relative paths. Likewise
332 for the looping code that outputs make targets for libgcc.
333 * Makefile.in (VPATH): Add @srcdir@/../decnumber.
334 (DECNUMINC): New variable.
337 2005-11-25 Ben Elliston <bje@au.ibm.com>
339 * mklibgcc.in: Rename some shell variables for clarity.
341 2005-11-24 Ben Elliston <bje@au.ibm.com>
343 * real.h (REAL_VALUE_TO_TARGET_DECIMAL32): Use mode_for_size
344 rather than hardwiring the mode in call to real_to_target.
345 (REAL_VALUE_TO_TARGET_DECIMAL64): Likewise.
346 (REAL_VALUE_TO_TARGET_DECIMAL128): Likewise.
348 2005-11-24 Ben Elliston <bje@au.ibm.com>
350 * dfp.h, dfp.c: Update FSF copyright notice.
352 2005-11-24 Ben Elliston <bje@au.ibm.com>
354 * dfp.h, dfp.c: Tidy.
356 2005-11-24 Ben Elliston <bje@au.ibm.com>
358 * config/i386/i386.h (ALIGN_MODE_128): Revert branch change.
359 * config/i386/i386.md: Tidy.
361 2005-11-23 Ben Elliston <bje@au.ibm.com>
365 2005-11-22 Ian Lance Taylor <ian@airs.com>
366 * optabs.c (expand_unop): Call SCALAR_FLOAT_MODE_P on a mode, not
368 (prepare_cmp_insn): Likewise.
370 * optabs.c (expand_unop): Remove unused variable `class'.
372 2005-11-23 Ben Elliston <bje@au.ibm.com>
374 * configure: Regenerate.
376 2005-11-22 Janis Johnson <janis187@us.ibm.com>
378 * configure.ac: Add --enable-decimal-float.
379 * configure: Regenerate.
380 * config.in: Regenerate.
381 * mklibgcc.in: Include DFP support if enable_decimal_float, and
383 * config/i386/i386.c (ix86_decimal_float_supported_p): Only if
384 decimal float is enabled.
385 * config/rs6000/rs6000.c (rs6000_decimal_float_supported_p): Only if
386 decimal float is enabled.
388 2005-11-22 Ben Elliston <bje@au.ibm.com>
390 * decUtility.c, decNumber.c: GNU coding standard fixes.
391 * decimal32.c, decimal64.c, decimal128.c: Likewise.
392 * decimal32.h: Likewise.
393 * dwarf2.h: Synchronise with trunk.
395 2005-11-16 Ben Elliston <bje@au.ibm.com>
397 * DEV-PHASE: Refresh merge date.
399 2005-10-20 Ben Elliston <bje@au.ibm.com>
401 Not to be merged (probably):
402 * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): Use a GP
404 (rs6000_emit_move): Likewise.
405 (function_arg_advance): Exclude SDmode.
406 (function_arg): Likewise.
407 (rs6000_gimplify_va_arg): Handle DDmode, TDmode.
408 (rs6000_function_value): Return SDmode values in GPRs.
409 (rs6000_libcall_value): Likewise.
410 * config/rs6000/rs6000.md (*movsd_fprs): Remove pattern.
411 (*movsd_gpr): Reinstate pattern.
413 2005-10-18 Ben Elliston <bje@au.ibm.com>
415 * config/i386/i386.md (*pushsd2): New pattern.
416 (*movsd_constant): Likewise.
417 * config/i386/i386.c (print_operand): Handle SDmode constants.
418 * config/i386/i386.h (ALIGN_MODE_128): TDmode handling is subsumed
421 2005-10-14 Ben Elliston <bje@au.ibm.com>
423 * config/dfp-bit.h (CONTEXT_INIT): Choose the right DEC_INIT macro
424 based on the value of WIDTH.
426 2005-10-14 Ben Elliston <bje@au.ibm.com>
428 * decLibrary.c (isinfd32): Convert host words to IEEE byte order
429 before converting to a decNumber.
430 (isinfd64, isinfd128): Likewise.
432 2005-10-13 Ben Elliston <bje@au.ibm.com>
434 * decLibrary.c (isinfd32, isinfd64, isinfd128): Prototype.
435 (__dfp_enable_traps, __dfp_raise): Likewise.
436 * config/dfp-bit.c (__dec_byte_swap): Likewise.
438 2005-10-11 Ben Elliston <bje@au.ibm.com>
440 * config/i386/i386.h (LIBGCC2_WORDS_BIG_ENDIAN): Define.
442 2005-10-11 Ben Elliston <bje@au.ibm.com>
444 * config/dfp-bit.h: Include "tconfig.h", "coretypes.h", "tm.h".
445 (LIBGCC2_FLOAT_WORDS_BIG_ENDIAN): Define, if not already.
446 * config/dfp-bit.c: Don't include the aforementioned headers.
447 (LIBGCC_FLOAT_WORDS_BIG_ENDIAN): Remove.
449 2005-10-10 Ben Elliston <bje@au.ibm.com>
451 * config/rs6000/rs6000.md (*movsd_no_fprs): Remove.
452 (*movdd_nofprs32): Likewise.
453 (*movdd_nofprs64): Likewise.
455 2005-10-10 Ben Elliston <bje@au.ibm.com>
457 * config/dfp-bit.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Define.
458 (LIBGCC2_HAS_XF_MODE): Likewise.
460 2005-10-07 Ben Elliston <bje@au.ibm.com>
462 Brought in from mainline to assist AIX builds:
464 2005-10-03 David Edelsohn <edelsohn@gnu.org>
465 * config/rs6000/t-aix43 (LDFLAGS): New.
466 * config/rs6000/t-aix52 (LDFLAGS): New.
468 2005-10-05 Janis Johnson <janis187@us.ibm.com>
470 * Makefile.in (decUtility.o): Add new dependencies.
472 2005-10-04 Ben Elliston <bje@au.ibm.co>
474 * config/dfp-bit.c: Replace calls to __ieee_byte_order with
475 __dec_byte_swap to indicate that the function always swaps.
477 * Makefile.in (D32PBIT_FUNCS): Add _conv_sd.
478 (D64PBIT_FUNCS): Likewise, add _conv_dd.
479 (D128PBIT_FUNCS): Likewise, add _conv_td.
480 * decUtility.h (__ieee_byte_order): Prototype.
481 * decUtility.c (__ieee_byte_order): Implement.
482 * dfp.c (encode_decimal32): Put word(s) into IEEE byte order.
483 (encode_decimal64): Likewise.
484 (encode_decimal128): Likewise.
485 * config/dfp-bit.h (HOST_TO_IEEE): Define for various widths.
486 (IEEE_TO_HOST): Likewise.
487 (IEEE_TO_HOST_TO): Likewise.
488 * config/dfp-bit.c (LIBGCC2_FLOAT_WORDS_BIG_ENDIAN): Define.
489 (dfp_unary_op): Swap words to/from IEEE byte order when invoking
491 (dfp_binary_op, dfp_compare_op): Likewise.
492 (__host_to_ieee_32): New.
493 (__ieee_to_host_32): Likewise.
494 (__swap64): Likewise.
495 (__host_to_ieee_64): New.
496 (__ieee_to_host_64): Likewise.
497 (__swap128): Likewise.
498 (__host_to_ieee_128): New.
499 (__ieee_to_host_128): Likewise.
500 (DFP_TO_DFP): Swap words to/from IEEE byte order when invoking
502 (DFP_TO_INT, INT_TO_DFP, DFP_TO_BFP, BFP_TO_DFP: Likewise.
503 (DFP_UNORD): Likewise.
505 2005-10-03 Janis Johnson <janis187@us.ibm.com>
507 * decContext.h: Prepend underscores to global symbols for libgcc.
508 * decNumber.h: Ditto.
509 * decUtility.h: Ditto.
510 * decimal128.h: Ditto.
511 * decimal32.h: Ditto.
512 * decimal64.h: Ditto.
513 * config/dfp-bit.h: Prepend underscores to decNumber functions.
515 * decUtility.c: New file.
516 * decUtility.h: New file.
517 * decimal32.c: Use it.
518 * decimal64.c (decDensePackCoeff, decDenseUnpackCoeff): Move to
519 new file, include new header file.
520 * decimal128.c: Use it.
521 * Makefile.in: Depend on new header file, build new file.
522 * mklibgcc.in: Build new file.
524 * decContext.c: Run file through indent.
525 * decContext.h: Ditto.
527 * decNumber.c: Ditto.
528 * decNumber.h: Ditto.
529 * decNumberLocal.h: Ditto.
530 * decimal128.c: Ditto.
531 * decimal128.h: Ditto.
532 * decimal32.c: Ditto.
533 * decimal32.h: Ditto.
534 * decimal64.c: Ditto.
535 * decimal64.h: Ditto.
537 2005-09-28 Ben Elliston <bje@au.ibm.com>
539 * DEV-PHASE: Refresh datestamp.
541 2005-09-19 Ben Elliston <bje@au.ibm.com>
543 Brought in from mainline:
545 2005-09-14 Andrew Pinski <pinskia@physics.uc.edu>
546 * config/i386/i386.c (contains_128bit_aligned_vector_p): Add break
547 in the ARRAY_TYPE case.
549 2005-09-13 Ben Elliston <bje@au.ibm.com>
551 * decLibrary.c (__dfp_traps): New variable.
552 (__dfp_enable_traps): New.
553 (__dfp_raise): Likewise.
554 * config/dfp-bit.h (CONTEXT_TRAPS): Use alternative defintion.
555 (DFP_RAISE): Likewise.
556 (CONTEXT_ERRORS): New macro.
557 * config/dfp-bit.c (dfp_unary_op): Do not set context.traps
558 (always leave it set to 0), but raise an FP exception if signaling
559 NaNs are enabled and the arithmetic produces an exception.
560 (dfp_binary_op): Likewise.
561 (dfp_compare_op): Likewise.
562 (DFP_TO_DFP, DFP_TO_INT, INT_TO_DFP, BFP_TO_DFP): Do not set
563 context.traps. Raise DEC_Inexact for inexact rounding.
565 2005-09-12 Ben Elliston <bje@au.ibm.com>
567 * doc/rtl.texi (Machine Modes): Document MODE_DECIMAL_FLOAT.
568 * doc/libgcc.texi (Decimal float library routines): New node.
570 2005-09-09 Ben Elliston <bje@au.ibm.com>
572 * decLibrary.c (isinfd32, isinfd64, isinfd128): Remove redundant
575 * dfp.c: Whitespace fix.
577 2005-09-09 Ben Elliston <bje@au.ibm.com>
580 * mklibgcc.in: Include decLibrary.c in libgcc.
582 2005-09-07 Janis Johnson <janis187@us.ibm.com>
584 * c-common.c (handle_mode_addtribute): Handle MODE_DECIMAL_FLOAT.
585 * combine.c (simplify_comparison): Remove unneeded assert.
586 * cse.c (cse_insn): Use GET_MODE_WIDER_MODE.
587 * decRound.c (__dfp_rounding_mode): Add comment.
588 * emit-rtl.c (init_emit_once): Don't check for DECIMAL_FLOAT_MODE_P,
589 handle MODE_DECIMAL_FLOAT separately.
590 * expmed.c (init_expmed, expand_divmod): Use GET_MODE_WIDER_MODE.
591 * expr.c (init_expr_once): Don't check INCOMPATIBLE_MODES_P.
592 (convert_move): Check that exactly one mode is decimal float; use
594 (compress_float_constant): Don't check INCOMPATIBLE_MODES_P.
595 * genmodes.c (struct mode_data): Update comment for format.
596 (complete_mode): Handle MODE_DECIMAL_FLOAT, update check for mode
598 (make_complex_modes: Remove FIXME comment, disabled code which are
599 not needed without support for complex decimal float types.
600 (DECIMAL_FLOAT_MODE, FRACTIONAL_DECIMAL_FLOAT_MODE): New.
601 (make_decimal_float_mode): New.
602 (reset_float_format): Handle MODE_DECIMAL_FLOAT.
603 (emit_format_for_mode): Support formats for decimal floats.
604 * genopinit.c (gen_insn): Handle MODE_DECIMAL_FLOAT.
605 * machmode.def (DECIMAL_FLOAT_MODE): Document;, use it to define
607 * machmode.h (FLOAT_MODE_P, SCALAR_FLOAT_MODE_P, MODES_WIDEN_P):
608 Include MODE_DECIMAL_FLOAT.
609 (DECIMAL_FLOAT_MODE_P): Redefine, update comment.
610 (INCOMPATIBLE_MODES_P): Remove.
611 (GET_MODE_COMPATIBLE_WIDER_MODE): Remove.
612 * mode-classes.def (MODE_DECIMAL_FLOAT): Define.
613 * optabs.c (expand_binop, expand_twoval_unop, expand_twoval_binop,
614 widen_clz, expand_parity, expand_unop, can_compare_p,
615 emit_cmp_and_jump_insn_1, prepare_float_lib_cmp, expand_float,
616 expand_fix): Use GET_MODE_WIDER_MODE.
617 (init_floating_libfuncs): Handle decimal float modes.
618 (init_optabs): Handle libfuncs for decimal float.
619 * real.h (real_format): Change size, update documentation.
620 (REAL_MODE_FORMAT): Update for to handle float, decimal float.
621 * reg-stack.c (reg_to_stack): Remove check for DECIMAL_FLOAT_MODE_P.
622 * regclass.c (choose_hard_reg_mode): Ditto.
623 * simplify-rtx.c (simplify_immed_subreg): Handle MODE_DECIMAL_FLOAT.
624 * stor-layout.c (int_mode_for_mode): Handle MODE_DECIMAL_FLOAT.
625 (get_mode_compatible_wider_mode): Remove.
626 * targhooks.c (default_scalar_mode_supported_p): Handle
627 MODE_DECIMAL_FLOAT separately.
628 * var-tracking.c (emit_note_insn_var_location): Use
630 * varasm.c (output_constant_pool_2): Handle MODE_DECIMAL_FLOAT.
631 * config/dfp-bit.h: Change names of functions for MODE_FLOAT and
632 MODE_DECIMAL_FLOAT, which are no longer in the same class.
634 2005-09-05 Ben Elliston <bje@au.ibm.com>
636 * config/dfp-bit.c (dfp_binary_op): Remove unused variable.
638 2005-09-05 Ben Elliston <bje@au.ibm.com>
640 * config/dfp-bit.h (__decWorkingPrec): Remove.
641 (CONTEXT_DIGITS): Likewise.
642 * config/dfp-bit.c (dfp_unary_op): Don't set context.digits.
643 (dfp_binary_op): Likewise.
644 (dfp_compare_op): Likewise.
645 (DFP_TO_DFP): Likewise.
646 (INT_TO_DFP): Likewise.
647 (BFP_TO_DFP): Likewise.
649 2005-09-05 Ben Elliston <bje@au.ibm.com>
651 * decRound.c (__dfp_set_working_prec): Remove.
652 (__decWorkingPrec): Likewise.
653 (__dfp_working_prec): Likewise.
655 2005-08-31 Ben Elliston <bje@au.ibm.com>
657 * dfp.c (decimal_real_arithmetic): Always return true to prevent
660 2005-08-30 Ben Elliston <bje@au.ibm.com>
662 * decRound.c (__dfp_set_working_prec): New function.
663 (__decWorkingPrec): Likewise.
664 (__dfp_working_prec): New static variable.
665 * config/dfp-bit.h (__decWorkingPrec): Provide extern declaration.
666 (CONTEXT_DIGITS): Define.
667 * config/dfp-bit.c (dfp_unary_op): Set context.digits.
668 (dfp_binary_op): Likewise.
669 (dfp_compare_op): Likewise.
670 (DFP_TO_DFP): Likewise.
671 (INT_TO_DFP): Likewise.
672 (BFP_TO_DFP): Likewise.
674 2005-08-25 Ben Elliston <bje@au.ibm.com>
676 * Makefile.in (D32PBIT_FUNCS): Add _unord_sd.
677 (D64PBIT_FUNCS): Likewise for _unord_dd.
678 (D128PBIT_FUNCS): Likewise for _unord_td.
679 * config/dfp-bit.h (DFP_UNORD): Define for each WIDTH (32/64/128).
680 (DFP_UNORD): Prototype for L_unord_sd, L_unord_dd, L_unord_td.
681 * config/dfp-bit.c (DFP_UNORD): Implement.
683 2005-08-22 Ben Elliston <bje@au.ibm.com>
685 * real.c (real_maxval): Clear *r before filling in the structure.
686 Simplify logic in this function somewhat.
688 2005-08-17 Janis Johnson <janis187@us.ibm.com>
689 Ben Elliston <bje@au.ibm.com>
692 * mklibgcc.in: Include decRound.c in libgcc.
693 * config/dfp-bit.h (CONTEXT_ROUND): Redefine as call to __decGetRound.
695 2005-08-17 Janis Johnson <janis187@us.ibm.com>
697 * machmode.h (MODES_WIDEN_P): New.
698 * optabs.c (expand_binop, expand_twoval_unop, widen_clz, expand_parity,
699 expand_unop, emit_cmp_and_jump_insn_1): Use it.
701 * c-common.c (handle_vector_size_attribute): Use SCALAR_FLOAT_MODE_P.
702 * cse.c (find_comparison_args, fold_rtx): Ditto.
703 * dwarf2out.c (add_const_value_attribute): Ditto.
704 * emit-rtl.c (gen_lowpart_common): Ditto.
705 * expmed.c (expand_mult): Ditto.
706 * expr.c (convert_move): Ditto.
707 * genopinit.c (gen_insn): Ditto.
708 * loop.c (load_mems): Ditto.
709 * optabs.c ( expand_abs_nojump, prepare_cmp_insn): DItto.
710 * recog.c (general_operand, register_operand): Ditto.
711 * reg-stack.c (replace_reg): Ditto.
712 * reload.c (find_equiv_reg): Ditto.
713 * rtlanal.c (may_trap_p, canonicalize_condition): Ditto.
714 * simplify-rtx.c (simplify_const_unary_operation,
715 simplify_binary_operation_1, simplify_const_binary_operation,
716 simplify_relational_operation, simplify_const_relational_operation,
717 simplify_immed_subreg): Ditto.
718 * config/i386/i386.c (ix86_value_regno, ix86_cc_mode
719 ix86_expand_compare): Ditto.
720 * config/rs6000/linux64.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Ditto.
721 * config/rs6000/predicates.md (easy_fp_constant, zero_fp_constant,
722 input_operand): Ditto.
723 * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok, rs6000_emit_move,
724 function_arg_advance, rs6000_emit_cmove,
725 rs6000_output_function_epilogue, rs6000_libcall_value): Ditto.
726 * config/rs6000/rs6000.h (MODES_TIEABLE_P, SELECT_CC_MODE): Ditto.
727 * config/rs6000/sysv4.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Ditto.
728 * config/rs6000/xcoff.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Ditto.
730 2005-08-16 Ben Elliston <bje@au.ibm.com>
732 * config/dfp-bit.h (BFP_VIA_TYPE): Use double not DFtype.
734 2005-08-15 Ben Elliston <bje@au.ibm.com>
736 * config/i386/i386.c (function_arg_advance): Handle SDmode, DDmode
737 and TDmode appropriately.
739 2005-08-15 Ben Elliston <bje@au.ibm.com>
741 * config/dfp-bit.h (BFP_VIA_TYPE): Define for BFP_KIND XFmode.
742 (SFtype, DFtype, XFtype): Declare these typedefs unconditionally.
743 * config/dfp-bit.c (BFP_TO_DFP): Cast input value to BFP_VIA_TYPE,
746 2005-08-15 Ben Elliston <bje@au.ibm.com>
748 * config.gcc (i[34567]86-*-linux*): Append t-linux to $tmake_file.
749 * config/i386/t-linux: New file.
751 2005-08-15 Ben Elliston <bje@au.ibm.com>
753 * config/i386/i386.md (*movdd_sse): Silence fall-through warning.
755 * config/i386/t-linux64 (TARGET_LIBGCC2_CFLAGS): Use the +=
756 operator to append options to this variable, not = to override it.
758 * config/i386/t-linux64 (TARGET_LIBGCC2_CFLAGS): Pass -msse.
759 (D32PBIT, D64PBIT, D128PBIT): Define.
760 (dfp32-bit.c, dfp64-bit.c dfp128-bit.c): New targets.
762 2005-08-15 Ben Elliston <bje@au.ibm.com>
764 * config/i386/i386.c (ix86_decimal_float_supported_p): Return true
765 only when TARGET_SSE is true.
767 * config/i386/i386.md (*movdd_gprs): Remove.
768 (*movdd_sse): Apply to TARGET_SSE systems, not just 64-bit
769 systems. Use movaps instructiosn to move x->x.
770 (*movtd_sse): Likewise, apply to any TARGET_SSE target.
771 * config/i386/i386.c (classify_argument): Hold DDmode arguments in
772 the SSE register class.
773 (function_arg): Handle DDmode, TDmode.
774 (ix86_libcall_value): Treat DDmode like TDmode, using SSE.
775 (ix86_value_regno): Correct the logic for decimal float modes: put
776 SDmode into GPRs, but DDmode and TDmode values into SSE registers.
777 (ix86_hard_regno_mode_ok): Only SSE registers are okay for DDmode
780 2005-08-11 Janis Johnson <janis187@us.ibm.com>
782 * config/dfp-bit.h (TO_ENCODED_TO): Replace redefinition of TO_ENCODED
783 for DFP to DFP convertions.
785 (BPF macros): Don't define for XF mode if target does not support it.
786 (DFP_TO_BFP, BFP_TO_DFP): Skip prototypes for XF mode if target
788 * config/dfp-bit.c (DFP_TO_DFP): Use TO_ENCODED_TO.
789 (INT_TO_DFP): Use CAST_FOR_FMT.
790 (DFP_TO_BFP, BFP_TO_DFP): Skip definitions for XF mode if target
793 2005-08-11 Ben Elliston <bje@au.ibm.com>
795 * config/i386/t-linux: Remove.
797 2005-08-11 Ben Elliston <bje@au.ibm.com>
799 * Makefile.in (D32PBIT_FUNCS, D64PBIT_FUNCS, D128_BIT_FUNCS):
800 Add BFP<->DFP runtime conversions for XFmode.
801 * config/dfp-bit.h (BFP_KIND): Handle a value of 3 for XFmode.
802 (BFP_TO_DFP, DFP_TO_BFP): Add __routine names for XFmode.
803 Define BFP_KIND to 3 when L_{sd,dd,td}_to_xf or L_xf_to_{sd,dd,td}
805 * config/dfp-bit.c (DFP_TO_BFP): Include when L_{sd,dd,td}_to_XF.
806 (BFP_TO_DFP): Likewise, include when L_xf_to_{sd,dd,td} is set.
808 2005-08-11 Ben Elliston <bje@au.ibm.com>
810 * config/dfp-bit.h (SItype, DItype, USItype, UDItype): Declare
811 these typedefs unconditionally, not based on INT_KIND.
812 (CMPtype): New macro.
813 (DFP_EQ, DFP_NE, DFP_LT, DFP_GT, DFP_LE, DFP_GE): Return CMPtype.
814 * config/dfp-bit.c (DFP_EQ, DFP_NE, DFP_LT, DFP_GT, DFP_LE,
815 DFP_GE): Set the return type to CMPtype, which is defined in
818 2005-08-11 Ben Elliston <bje@au.ibm.com>
820 * config/dfp-bit.c (DFP_PLUS, DFP_MINUS): Remove unused functions.
822 2005-08-11 Ben Elliston <bje@au.ibm.com>
824 * config/dfp-bit.h (DFP_TYPE): Rename to IEEE_TYPE.
825 (DFP_TYPE_TO): Likewise, rename to IEEE_TYPE_TO.
826 * config/dfp-bit.c: Update all users.
828 2005-08-11 Ben Elliston <bje@au.ibm.com>
830 * dfp.c (encode_decimal64): d64 is already correctly encoded, so
831 no not perform endian conversion.
832 (encoding_decimal128): Likewise for d128.
834 2005-08-09 Janis Johnson <janis187@us.ibm.com>
836 * Makefile.in (D32PBIT_FUNCS, D64PBIT_FUNCS, D128_BIT_FUNCS):
837 Add DFP<->DFP runtime conversions.
838 * config/dfp-bit.h (DFP_TO_DFP): Fix errors in definitions.
840 2005-08-09 Ben Elliston <bje@au.ibm.com>
842 * i386.h (ALIGN_MODE_128): Add TDmode.
843 (VALID_SSE_REG): Likewise.
844 (SSE_REG_MODE): Likewise.
845 * i386.c (ix86_decimal_float_supported_p): Add prototype.
846 (TARGET_DECIMAL_FLOAT_SUPPORTED_P): Define.
847 (classify_argument): Handle SDmode, DDmode and TDmode.
848 (ix86_libcall_value): Handle TDmode.
849 (ix86_value_regno): Handle decimal float modes.
850 (ix86_hard_regno_mode_ok): Likewise.
851 (ix86_decimal_float_supported_p): Implement.
852 * i386.md (movsd, movdd, movtd): New expanders.
853 (movsd_gprs, movdd_gprs, movdd_sse, movtd_sse): New insns.
855 2005-08-09 Ben Elliston <bje@au.ibm.com>
857 * dfp.c (encode_decimal32): Type pun via uint32_t.
858 (encode_decimal64, encode_decimal128): Likewise.
860 2005-08-09 Ben Elliston <bje@au.ibm.com>
863 * gdbinit.in: Don't set complaints.
865 2005-08-08 Janis Johnson <janis187@us.ibm.com>
867 * c-typeck.c (c_common_type): Fix checks for DFP types.
869 * c-common.c (shorten_compare): Convert DFP/BFP operands to a
872 2005-08-03 Ben Elliston <bje@au.ibm.com>
874 * config/i386/t-linux: New.
876 Revert this incorrect patch:
878 2005-04-08 Ben Elliston <bje@au.ibm.com>
879 * config/i386/t-linux64 (D32PBIT, D64PBIT, D128PBIT): Define.
880 (dfp32-bit.c, dfp64-bit.c dfp128-bit.c): New targets.
882 2005-08-02 Janis Johnson <janis187@us.ibm.com>
884 * Makefile.in (D32PBIT_FUNCS, D64PBIT_FUNCS, D128PBIT_FUNCS):
885 Add to the list of functions.
886 * config/dfp-bit.c (DFP_TO_DFP, DFP_TO_INT, INT_TO_DFP, DFP_TO_BFP,
887 BFP_TO_DFP): New template functions.
888 * config/dfp-bit.h (FROM_STRING, TO_STRING): New.
889 (WIDTH_TO, DFP_C_TYPE_TO, DFP_TYPE_TO, TO_ENCODED_TO): New.
890 (INT_KIND, INT_TYPE, INT_FMT, STR_TO_INT): New.
891 (BFP_KIND, BFP_TYPE, BFP_FMT, STR_TO_BFP): New.
892 (DFP_TO_DFP, INT_TO_DFP, DFP_TO_INT, BFP_TO_DFP, DFP_TO_BFP): Define
895 * dfp-bit.h (CONTEXT_INIT): Define.
896 (CONTEXT_ROUND): Define.
897 (CONTEXT_TRAPS): Define.
898 * dfp-bit.c (dfp_unary_op): Use them.
899 (dfp_binary_op): Ditto.
900 (dfp_compare_op): Ditto.
902 2005-07-28 Ben Elliston <bje@au.ibm.com>
904 * real.h (REAL_VALUE_TO_TARGET_DECIMAL128): New.
905 (REAL_VALUE_TO_TARGET_DECIMAL64): Likewise.
906 (REAL_VALUE_TO_TARGET_DECIMAL32): Likewise.
907 * config/rs6000/rs6000.c (output_toc): Output TOC entries for
910 2005-07-27 Ben Elliston <bje@au.ibm.com>
912 * real.c (real_maxval): decimal_real_maxval has no return value.
913 Return explicitly in the base 10 case.
915 2005-07-27 Ben Elliston <bje@au.ibm.com>
917 * genmodes.c (blank_mode): Initialise counter member to 0.
919 2005-07-25 Ben Elliston <bje@au.ibm.com>
921 * config/dfp-bit.c (dfp_unary_op): Don't trap (C adopted qNaNs).
922 (dfp_binary_op): Likewise.
923 (dfp_compare_op): Likewise.
925 * config/rs6000/predicates.md (easy_fp_constant): Return 0 (false)
926 for decimal floating point types.
928 2005-07-23 Janis Johnson <janis187@us.ibm.com>
930 * optabs.c (expand_binop, can_compare_p, emit_cmp_and_jump_insn_1,
931 prepare_float_lib_cmp): Try compatible wider modes.
933 * config/dfp-bit.c (DFP_EQ, DFP_NE, DFP_LT, DFP_GT, DFP_LE, DFP_GE):
934 Return the correct value for this particular function.
936 2005-07-21 Janis Johnson <janis187@us.ibm.com>
938 * optabs.c (init_optabs): Initialize ufloat_optab.
940 * c-cppbuiltin.c (bultin_define_float_constants): Add assert.
941 * combine.c (combine-simplify-rtx): Skip optimizations for DFP.
942 (simplify_comparison): Add assert.
943 * cse.c (cse_insn): Loop through compatible modes.
944 * emit-rtl.c (gen_const_vector): Add assert.
945 (init_emit_once): Skip loop for DFP.
946 * expmed.c (init_expmed): Process compatible modes.
947 (extract_high_half, expand_mult_highpart_optab,
948 expand_mult_highpart): Add assert.
949 (expand_divmod): Process compatible modes.
950 * expr.c (init_expr_once): Skip DFP modes.
951 (convert_move): Process compatible modes; use the correct conversion
952 for fp modes of the same size.
953 (compress_float_constant): Process compatible modes.
954 * machmode.h (INCOMPATIBLE_MODES_P): New.
955 (GET_MODE_COMPATIBLE_WIDER_MODE): New.
956 (get_mode_compatatible_wider_mode): Define.
957 * optabs.c (expand_binop, expand_twoval_unop, widen_clz, expand_parity,
958 expand_unop, expand_float, expand_fix): Process compatible modes.
959 * reg_stack.c (reg_to_stack): Skip DFP modes.
960 * regclass.c (choose_hard_reg_mode): Skip DFP modes.
961 * stor-layout.c (get_mode_compatible_wider_mode): New.
962 * var-tracking.c (emit_note_insn_var_location): Process compatible
965 * real.c (round_for_format): Assert float radix is not 10.
966 (significand_size): Handle coefficient with decimal radix.
968 2005-07-17 Ben Elliston <bje@au.ibm.com>
970 * dwarf2.h (enum dwarf_type): Rename DW_ATE_GNU_decimal_float back
971 to DW_ATE_decimal float now that it exists in DWARF 3.
972 * dwarf2out.c (base_type_die): Use the new enumeration.
974 2005-07-11 Ben Elliston <bje@au.ibm.com>
978 2005-06-13 Janis Johnson <janis187@us.ibm.com>
980 * c-decl.c (declspecs_add_type): Pedwarn for decimal float.
982 * c-decl.c (declspecs_add_type): Error if decimal float not supported.
984 * c-format.h (FMT_LEN_H, FMT_LEN_D, FMT_LEN_DD): New.
985 * c-format.c (printf_length_specs, scanf_length_specs): Add entries
987 (print_char_table, scan_char_table): Use new entries.
988 (asm_fprintf_char_table, gcc_diag_char_table, gcc_cdiag_char_table,
989 gcc_cxxdiag_char_table): Adjust for longer length arrays.
991 * target.h (struct gcc_target): New hook decimal_float_supported_p.
992 * target-def.h: Define its default.
993 * config/rs6000/rs6000.c: Define it for this target.
994 * doc/tm.texi: Document it.
996 * doc/extend.texi (Decimal Float): New.
998 2005-06-08 Janis Johnson <janis187@us.ibm.com>
1000 * config/rs6000/rs6000.c (rs6000_handle_altivec_attribute):
1001 reject decimal floating point types as AltiVec types.
1003 * config/rs6000/rs6000.c (rs6000_scalar_mode_supported_p):
1004 decimal floating point types are supported only for C.
1006 * c-typeck.c (convert_arguments): Don't promote _Decimal32.
1008 * config/rs6000/t-linux64: Copy DFP support from t-linux.
1010 2005-06-07 Ben Elliston <bje@au.ibm.com>
1012 * config.gcc (powerpc-*-linux*): Add rs6000/t-linux to tmake_file.
1013 * config/t-linux: Move contents from here ..
1014 * config/rs6000/t-linux: .. to here.
1016 2005-06-07 Ben Elliston <bje@au.ibm.com>
1017 David Edelsohn <dje@watson.ibm.com>
1019 * config/rs6000/rs6000.md (movsd, movdd, movtd): New insns.
1021 2005-06-07 Ben Elliston <bje@au.ibm.com>
1023 * testsuite/gcc.dg/dfp/constants.c: Improve comments.
1025 2005-06-01 Ben Elliston <bje@au.ibm.com>
1027 * config/rs6000/rs6000.c (rs6000_legitimize_address): Add TDmode.
1028 (rs6000_legitimate_offset_address_p): Ditto.
1029 (rs6000_legitimize_reload_address): Ditto.
1030 (rs6000_legitimate_address): Ditto.
1031 (rs6000_emit_move): Ditto.
1032 (rs6000_return_in_memory): Ditto.
1033 (function_arg_advance): Ditto.
1034 (function_arg): Ditto.
1035 (rs6000_pass_by_reference): Ditto.
1036 (rs6000_gimplify_va_arg): Ditto.
1037 (rs6000_register_move_cost): Ditto.
1039 2005-05-26 Jon Grimm <jgrimm2@us.ibm.com>
1041 * dfp.c (decimal_do_fix_trunc): New.
1042 (decimal_real_to_integer): New.
1043 (decimal_real_to_integer2): New.
1044 * dfp.h: Add prototypes for new dfp.c functions.
1045 * real.c (do_fix_trunc): Call dfp helper.
1046 (real_identical): Make decimal not identical to binary floats,
1048 (real_to_integer): Call dfp helper.
1049 (real_to_integer2): Call dfp helper.
1051 2005-05-24 Jon Grimm <jgrimm2@us.ibm.com>
1053 * dfp.c (decimal_real_from_string): Remove now untrue FIXME comment.
1054 (decimal_to_decnumber): Missing break statement.
1056 2005-05-24 Ben Elliston <bje@au.ibm.com>
1058 * config/rs6000/rs6000.c (rs6000_emit_move): Handle TDmode.
1060 * config/rs6000/predicates.md (easy_fp_constant): Use the macro
1061 DECIMAL_FLOAT_MODE_P for convenience.
1063 2005-05-20 Jon Grimm <jgrimm2@us.ibm.com>
1065 * ginclude/decfloat.h: New file.
1066 * Makefinle.in: Install decfloat.h.
1068 2005-05-19 Jon Grimm <jgrimm2@us.ibm.com>
1070 * cpp-builtin.c (builtin_define_decfloat_constants):
1071 Add __DEC_EVAL_METHOD__.
1072 * defaults.h (TARGET_DEC_EVAL_METHOD): Add hook and default
1075 2005-05-18 David Edelsohn <dje@watson.ibm.com>
1076 Ben Elliston <bje@au.ibm.com>
1078 * config/rs6000/rs6000.c (rs6000_legitimate_offset_address_p):
1080 (rs6000_emit_move): Handle SDmode and DDmode.
1081 (function_arg_advance): Likewise.
1082 (function_arg): Likewise.
1083 (rs6000_gimplify_va_arg): Likewise.
1085 2005-05-18 Ben Elliston <bje@au.ibm.com>
1087 * dfp.c (decimal_real_from_string): Use DECIMAL_FLOAT_MODE_P.
1089 2005-05-17 Ben Elliston <bje@au.ibm.com>
1091 * dwarf2.h (enum dwarf_type): Rename DW_ATE_decimal_float to
1092 DW_ATE_GNU_decimal float and move it into the user-defined
1094 * dwarf2out.c (base_type_die): Use the new enumeration.
1096 2005-05-16 Jon Grimm <jgrimm2@us.ibm.com>
1098 * builtins.c (fold_builtin_1): Channel dfp finite builtins
1099 to common fold function.
1100 * builtins.def (BUILT_IN_FINITED32, BUILT_IN_FINITED64,
1101 BUILT_IN_FINITED128): Add dfp finite builtins.
1103 2005-05-16 Jon Grimm <jgrimm2@us.ibm.com>
1105 * builtins.c (fold_builtin_1): Rename builtins to match C
1107 * builtins.def: Rename macro names for dfp inf/nan builtins
1108 to match C extension names.
1110 2005-05-16 Jon Grimm <jgrimm2@us.ibm.com>
1112 * builtins.c (fold_builtin_1): Channel dfp isnan builtins
1113 to common fold function.
1114 * builtins.def (BUILT_IN_ISNANDF, BUILT_IN_ISNANDD,
1115 BUILT_IN_ISNANDL): Add builtins for dfp isnans.
1117 2005-05-16 Jon Grimm <jgrimm2@us.ibm.com>
1119 * builtin-types.h: Add function types for NaN builtins.
1120 * builtins.c (fold_builtin_1): Channel dfp NaN builtins to
1121 common fold function.
1122 * builtins.def (BUILT_IN_NANDF, BUILT_IN_NANDDD,
1123 BUILT_IN_NANDL): Add builtins for dfp NaNs.
1125 2005-05-16 Ben Elliston <bje@au.ibm.com>
1127 * dwarf2out.c (base_type_die): Emit a DW_ATE_decimal_float
1128 encoding value when the type has a decimal float mode.
1130 2005-05-13 Ben Elliston <bje@au.ibm.com>
1132 * machmode.h (DECIMAL_FLOAT_MODE_P): Change "mode" to "MODE"
1133 throughout this macro to match with the macro's argument.
1135 2005-05-12 Jon Grimm <jgrimm2@us.ibm.com>
1137 * builtin-types.def: Add BUILTIN_FNs needed for dfp versions
1139 * builtins.c (fold_builtin_1): Channel dfp isinf builtins to
1141 * builtins.def: Add dfp isinf builtins.
1143 2005-05-11 Jon Grimm <jgrimm2@us.ibm.com>
1145 * c-typeck.c (convert_arguments): The arguments to warning
1146 changed, but last merge didn't account for. Fixed.
1148 2005-05-11 Jon Grimm <jgrimm2@us.ibm.com>
1150 * c-typeck.c (c_common_type): Fix typo.
1152 2005-05-11 Jon Grimm <jgrimm2@us.ibm.com>
1154 * c-common.c (c_common_nodes_and_builtins): Only
1155 register dfp C type names, if target supports.
1156 * machmode.def: Add dfp modes.
1157 * machmode.h (DECIMAL_FLOAT_MODE_P): Add.
1158 * targhooks.c (default_scalar_mode_supported_p): Default
1159 decimal float modes as unsupported.
1160 * config/i386/i386-modes.def: Remove dfp modes.
1161 * config/i386/i386.c (ix86_scalar_mode_supported_p): Add and
1163 * config/rs6000/rs6000-modes.def: Remove dfp modes.
1164 * config/rs6000/rs6000.c: (rs6000_scalar_mode_supported_p): Add
1165 and support dfp modes.
1167 2005-05-10 Jon Grimm <jgrimm2@us.ibm.com>
1169 * config/t-linux (D32PBIT, D64PBIT, D128PBIT): Comment out
1171 * Makefile.in (LIBGCC_DEPS): Add dependencies on D32PBIT,
1172 D64PBIT, and D128PBIT.
1174 2005-05-10 Ben Elliston <bje@au.ibm.com>
1176 * config/t-linux (D32PBIT, D64PBIT, D128PBIT): Define.
1177 (dfp32-bit.c, dfp64-bit.c, dfp128-bit.c): New targets.
1179 2005-05-03 Ben Elliston <bje@au.ibm.com>
1181 * config/dfp-bit.h: Include "decNumber.h" after including the
1182 appropriate "decimal<n>.h" header, based on the value of WIDTH.
1183 Update comments about DFP_TYPE and DFP_C_TYPE macros.
1184 (DFP_PLUS, DFP_MINUS): Remove these unused runtime routines.
1186 2005-04-22 Jon Grimm <jgrimm2@us.ibm.com>
1188 * builtins.c (fold_builtin_1): Add builtins for dfp infinity.
1189 * builtins.def: Add builtins for dfp infinity.
1190 * dfp.c (decimal_from_decnumber): Handle non-number cases better.
1191 (decimal_to_decnumber): New function.
1192 (encode_decimal32, encode_decimal64, encode_decimal128,
1193 decimal_round_for_format, decimal_do_add, decimal_do_multiply,
1194 decimal_do_divide): Use new decimal_to/from_decnumber utility
1195 functions, so non-numeric values get accounted for.
1196 (decimal_real_max_value): Return largest finite value for type.
1197 * dfp.h (decimal_real_max_value): Prototype.
1198 * real.c (real_max_value): Call helper for decimal floats.
1200 2005-04-19 Ben Elliston <bje@au.ibm.com>
1202 * real.h (REAL_VALUE_TYPE_SIZE): Revert changes from 2004-04-04.
1204 2005-04-18 Ben Elliston <bje@au.ibm.com>
1206 * config/dfp-bit.h (DFP_C_TYPE): New.
1207 (DFP_MULTIPLY, DFP_ADD, DFP_SUB): Use DFP_C_TYPE for args and
1208 reverse the sense of return values (truth = 0).
1209 (DFP_PLUS, DFP_MINUS): Likewise.
1210 (DFP_EQ, DFP_NE, DFP_LT, DFP_GT, DFP_LE, DFP_GE): Likewise.
1211 * config/dfp-bit.c (dfp_unary_op): Overhaul implementation.
1212 (dfp_binary_op): Likewise.
1213 (dfp_compare_op): Likewise.
1214 (DFP_ADD, DFP_SUB, DFP_MULTIPLY, DFP_DIVIDE): Likewise.
1215 (DFP_PLUS, DFP_MINUS): Likewise.
1216 (DFP_EQ, DFP_NE, DFP_LT, DFP_GT, DFP_LE, DFP_GE): Likewise.
1218 2005-04-16 Jon Grimm <jgrimm2@us.ibm.com>
1220 * dfp.c (decimal_from_decnumber): New function.
1221 (decimal_from_string): Call decimal_from_decnumber.
1222 (encode_decimal32, encode_decimal64, encode_decimal128,
1223 decimal_from_binary, decimal_do_compare): Remove FIXME
1224 for fix up sign hack.
1225 (decimal_real_convert): Formatting.
1226 (decimal_do_add, decimal_do_multiply, decimal_do_divide,
1227 decimal_do_fix_trunc, decimal_real_arithmetic): New functions.
1228 * dfp.h (decimal_real_arithmetic): Prototype.
1229 * real.c (real_arithmetic): Call decimal_real_arithmetic.
1231 2005-04-14 Jon Grimm <jgrimm2@us.ibm.com>
1233 * dfp.c (decimal_real_convert, decimal_round_for_format): Add
1235 (decimal_real_to_decimal): New function.
1236 * dfp.h (decimal_real_to_decimal): Prototype.
1237 * real.c (real_to_decimal): Handle dfp types by calling helper.
1238 (real_to_hexadecimal): Handle dfp types by not printing in this
1241 2005-04-13 Jon Grimm <jgrimm2@us.ibm.com>
1243 * c-typeck.c (c_common_type): Usual arithmetic conversions.
1244 * convert.c (convert_to_real): Add consideration for decimal float
1245 types to a fold optimization here.
1246 * dfp.c (decimal_from_string): Fix memset. Formatting.
1247 (decimal_to_binary, decimal_round_for_format,
1248 decimal_real_convert): New functions.
1249 * dfp.h (decimal_round_for_format, decimal_real_convert): Prototype.
1250 * real.c (normalize): Short circuit for dfp types.
1251 (round_for_format): Call dfp type support functions.
1252 (real_convert): Call dfp type support functions.
1253 * config/predicates.md (easy_fp_constant): Decimal float types are
1256 2005-04-12 Ben Elliston <bje@au.ibm.com>
1258 * mklibgcc.in: Only build decimal32.c, decimal64.c or decimal128.c
1259 if $D32PBIT, $D64PBIT or $D128PBIT are defined, to limit libgcc
1262 2005-04-12 Ben Elliston <bje@au.ibm.com>
1264 * mklibgcc.in: Output make(1) targets for the decNumber support
1265 library files if $D32PBIT, $D64PBIT or $D128PBIT are defined in
1267 (decnumber_dep): Define.
1269 2005-04-12 Ben Elliston <bje@au.ibm.com>
1271 * config/dfp-bit.h (DFP_ADD): Correct typo for 128-bit case.
1273 2005-04-12 Ben Elliston <bje@au.ibm.com>
1275 * mklibgcc.in: Fix #! sequence on line 1.
1277 2005-04-11 Ben Elliston <bje@au.ibm.com>
1279 * dfp-bit.c (DFP_PLUS, DFP_MINUS): #if 0 out for now.
1280 * dfp-bit.h (DFP_ADD, DFP_SUB, DFP_MULTIPLY, DFP_DIVIDE, DFP_EQ,
1281 DFP_NE, DFP_LT, DFP_GT, DFP_LE, DFP_GE): Map to GCC-produced
1283 (DFP_PLUS, DFP_MINUS): #if 0 out for now.
1285 2005-04-11 Ben Elliston <bje@au.ibm.com>
1287 * Makefile.in (D32PBIT_FUNCS): Add to the list of functions.
1288 (D64PBIT_FUNCS): Likewise.
1289 (D128PBIT_FUNCS): Likewise.
1290 * config/dfp-bit.h: Document some macros.
1291 (DFP_ADD, DFP_SUB, etc): Define and prototype.
1292 * config/dfp-bit.c (dfp_func_ptr): Rename typedef from this ..
1293 (dfp_binary_func): .. to this.
1294 (dfp_unary_func): New typedef.
1295 (dfp_op): Rename from this ..
1296 (dfp_binary_op): .. to this. Update all callers.
1297 (dfp_unary_op, dfp_compare_op): New functions.
1298 (DFP_ADD, DFP_SUB, DFP_DIVIDE, DFP_PLUS, DFP_MINUS, DFP_EQ,
1299 DFP_NE, DFP_LT, DFP_GT, DFP_LE, DFP_GE): New function "templates".
1301 2005-04-11 Ben Elliston <bje@au.ibm.com>
1303 * config/dfp-bit.h: Largely rewrite.
1304 (DFP_TYPE, TO_INTERNAL, TO_ENCODED): New macros.
1305 (DFP_MULTIPLY): Define and prototype for 32, 64 and 128 bit
1307 * config/dfp-bit.c: Include "config/dfp-bit.h".
1308 (dfp_func_ptr): New typedef.
1309 (dfp_op): New function.
1310 (dfp_multiply): Replace ..
1311 (DFP_MULTIPLY): .. with this.
1313 2004-04-09 Jon Grimm <jgrimm2@us.ibm.com>
1315 * c-typeck.c (convert_arguments): More conservative check for
1316 decimal float related prototype conversion warnings.
1318 2004-04-08 Jon Grimm <jgrimm2@us.ibm.com>
1320 * c-typeck.c (convert_arguments): Warn on conversion due to prototype.
1322 2005-04-08 Jon Grimm <jgrimm2@us.ibm.com>
1324 * config/dfp-bit.h: Remove extra "*/".
1326 2005-04-08 Ben Elliston <bje@au.ibm.com>
1328 * Makefile.in (D32PBIT_FUNCS): Define.
1329 (D64PBIT_FUNCS): Likewise.
1330 (D128PBIT_FUNCS): Likewise.
1331 (libgcc.mk): Pass D32PBIT, D32PBIT_FUNCS, D64PBIT, D64PBIT_FUNCS,
1332 D128PBIT and D128PBIT_FUNCS to mklibgcc.
1333 * mklibgcc.in: Process D32PBIT, D64PBIT and D128PBIT variables.
1334 * config/i386/t-linux64 (D32PBIT, D64PBIT, D128PBIT): Define.
1335 (dfp32-bit.c, dfp64-bit.c dfp128-bit.c): New targets.
1336 * config/dfp-bit.h: New file.
1337 * config/dfp-bit.c: New file.
1339 2005-04-06 Jon Grimm <jgrimm2@us.ibm.com>
1341 * Makefile.in: Remove HAVE_DECNUMBER scaffolding.
1342 * c-cppbuiltin.c (builtin_define_decfloat_constants): New.
1343 (c_cpp_builtins): Call builtin_define_decfloat_constants.
1344 * dfp.c: Fix preamble and formatting fixes.
1345 (decimal_real_from_string): Fix bug marking all reals as decimal.
1346 * dfp.h: Remove HAVE_DECNUMBER scaffolding.
1347 (decNumberNegate): Remove.
1349 2005-04-06 Jon Grimm <jgrimm2@us.ibm.com>
1351 Change file preambles. Convert c++ style comments to c style comments.
1352 * decContext.c (decContextStatusToString): Return const.
1353 * decContext.h (decContextStatusToString): Likewise.
1354 * decDPD.h: Change preamble and comment cleanup.
1355 * decNumber.c (decNumberVersion): Return const.
1356 * decNumber.h (decNumberNegate): Add.
1357 (decNumberVersion): Return const.
1358 * decNumberLocal.h: Change preamble and comment cleanup.
1359 * decimal128.c: Likewise.
1360 * decimal128.h: Likewise.
1361 * decimal32.c: Likewise.
1362 * decimal32.h: Likewise.
1363 * decimal64.c: Likewise.
1364 * decimal64.h: Likewise.
1366 2005-04-06 Jon Grimm <jgrimm2@us.ibm.com>
1368 * decContext.c: New file.
1369 * decContext.h: Likewise.
1370 * decDPD.h: Likewise.
1371 * decNumber.c: Likewise.
1372 * decNumber.h: Likewise.
1373 * decNumberLocal.h: Likewise.
1374 * decimal128.c: Likewise.
1375 * decimal128.h: Likewise.
1376 * decimal32.c: Likewise.
1377 * decimal32.h: Likewise.
1378 * decimal64.c: Likewise.
1379 * decimal64.h: Likewise.
1381 2005-04-04 Jon Grimm <jgrimm2@us.ibm.com>
1383 * c-common.c (shorten_compare): For now, if decimal types involved,
1384 bypass narrow to smallest comparable precision.
1385 * dfp.c (decimal_from_string): Don't bother setting real_value.uexp.
1386 (decimal_real_from_string): Set real_value.decimal bit.
1387 (encode_decimal64, decode_decimal64, encode_decimal128,
1388 decode_decimal128): Formatting fixes.
1389 (decimal_from_binary): Helper to convert from internal binary to
1390 internal decimal encoding.
1391 (decimal_do_compare): Callout from real.c when decimal floats are
1392 involved in the comparison.
1393 * dfp.h (decimal_do_compare): New.
1394 * real.c (do_compare): Call out to decimal_do_compare() when decimal.
1395 (real_convert): For now, don't convert when decimal floats are
1397 (decode_decimal_double): Formatting fix.
1398 * real.h: Steal a bitfield for 'decimal' from real_value.uexp.
1400 2005-03-24 Ben Elliston <bje@au.ibm.com>
1402 Resolve merge conflicts:
1403 * BASE-VER: Include the branch name.
1404 * real.c (decimal_single_format): Add an initialiser for
1406 (decimal_double_format): Likewise.
1407 (decimal_quad_format): Likewise.
1409 2005-03-23 Ben Elliston <bje@au.ibm.com>
1411 * dwarf2.h (enum dwarf_type): Add DW_ATE_decimal_float.
1413 2005-03-23 Jon Grimm <jgrimm2@us.ibm.com>
1415 * Makefile.in: HAVE_DECNUMBER controls building in of decNumber
1417 * c-lex.c (interpret_float): real_from_string3 can handle binary
1419 * defaults.h: Add SIZE macros for decimal float types.
1420 * dfp.c: New file. Handle interfacing to decNumber routines.
1422 * real.c (real_from_string3): Initialize real based on mode and
1424 (round_for_format): Short circuit decimal float case.
1425 (real_convert): Short circuit for decimal float case.
1426 (encode_decimal_single, decode_decimal_single,
1427 encode_decimal_double, decode_decimal_double, encode_decimal_quad,
1428 decode_decimal_quad): Conditionally call out to dfp based
1429 function. As decNumber enters source this could go away.
1430 * real.h: Export real_from_string3.
1431 * tree.c (build_common_tree_nodes_2): Override type chosen by
1434 2005-03-15 Jon Grimm <jgrimm2@us.ibm.com>
1436 * c-pretty-print.c (pp_c_floating_constant): Print dfp suffixes.
1438 2005-03-14 Ben Elliston <bje@au.ibm.com>
1440 * doc/rtl.texi (Machine Modes): Document SDmode, DDmode and
1443 * config/i386/i386-modes.def: Add SDmode, DDmode, and TDmode.
1445 2005-03-11 Jon Grimm <jgrimm2@us.ibm.com>
1447 * c-lex.c (interpret_float): Decode dfp types from cpplib provided
1450 2005-03-09 Jon Grimm <jgrimm2@us.ibm.com>
1452 * builtin-types.def: Add new type_nodes for decimal float.
1453 * c-common.c (c_common_type_for_mode): Return type from DFP mode.
1454 (c_common_nodes_and_builtins): Record builtin dfp types.
1455 * c-common.h: Add RID_DFLOAT32, RID_DFLOAT64, RID_DFLOAT128.
1456 * c-decl.c (declspecs_add_type): Verify combos on qualifiers.
1457 (finish_declspecs): Return type from DFP typespec_word.
1458 * c-format.h: Add macros for dfp type format processing.
1459 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs,
1460 c_parser_declspecs, c_parser_attributes): Add _Decimal reserved
1462 * c-tree.h: Add enums for DFP typespec_words.
1463 * tree.c (build_common_tree_nodes_2): Make type nodes.
1464 * tree.h: Allocate storage for DFP type nodes.
1466 2005-03-07 Jon Grimm <jgrimm2@us.ibm.com>
1468 * genmodes.c (make_complex_modes): For now, don't create complex
1469 modes for the decimal floats.
1471 2005-02-17 Ben Elliston <bje@au.ibm.com>
1473 * version.c (version_string): Include the branch name.
1475 2005-02-17 Ben Elliston <bje@au.ibm.com>
1477 * genmodes.c (make_complex_modes): Initialise q to allay warning.
1479 2005-02-14 David Edelsohn <dje@watson.ibm.com>
1481 * config/rs6000/rs6000-modes.def: Add decimal floating point SDmode,
1483 * real.h (decimal_single_format): Declare.
1484 (decimal_double_format): Likewise.
1485 (decimal_quad_format): Likewise.
1486 * real.c (decimal_single_format): Define placeholder.
1487 (decimal_double_format): Likewise.
1488 (decimal_quad_format): Likewise.
1489 * genmodes.c (struct mode_data): Add counter field.
1490 (blank_mode): Clear counter field.
1491 (new_mode): Increment counter field for each mode defined.
1492 (make_complex_modes): Prepend D for user-specified complex
1494 (cmp_modes): Compare counter field if other characteristics similar.
1496 2005-02-14 Ben Elliston <bje@au.ibm.com>
1498 * Start this ChangeLog.
1502 change-log-default-name: "ChangeLog.dfp"