[parrot/parrot] ecd4ef: use PARROT_FLOATVAL_DIG for rounding, set i_quadma...

GitHub noreply at github.com
Fri Sep 14 19:42:38 UTC 2012


  Branch: refs/heads/native_pbc2
  Home:   https://github.com/parrot/parrot
  Commit: ecd4ef12d2f32bf3dee646bdfc183556407ccb45
      https://github.com/parrot/parrot/commit/ecd4ef12d2f32bf3dee646bdfc183556407ccb45
  Author: Reini Urban <rurban at cpanel.net>
  Date:   2012-09-14 (Fri, 14 Sep 2012)

  Changed paths:
    M config/auto/sizes.pm
    M config/gen/config_h/config_h.in

  Log Message:
  -----------
  use PARROT_FLOATVAL_DIG for rounding, set i_quadmath


  Commit: f98d38b202d138b29fbb92b666d5ff4f03d9dc0c
      https://github.com/parrot/parrot/commit/f98d38b202d138b29fbb92b666d5ff4f03d9dc0c
  Author: Reini Urban <rurban at cpanel.net>
  Date:   2012-09-14 (Fri, 14 Sep 2012)

  Changed paths:
    M include/parrot/bswap.h
    M include/parrot/packfile.h
    M src/packfile/pf_items.c
    M t/native_pbc/number.t

  Log Message:
  -----------
  [GH #807] Refactor native_pbc endianness, bswap64. Add header argument to converters

Convert endianness upfront does not work.
Some converters work on native floats, to do compiler casts. They
need to know the packfile byteorder.
Other bitfiddling converters work only on little-endian, so we also need
to know the packfile byteorder, and they also need to convert endianness
back to to the target format.

Refactor bswap64, as it only works with 64bit registers. Tested with HAS_INT64.
So there are two bswap64 API's, one for fast native conversion via a register
and one with two unsigned char * args, which might point to the same buffer,
for easier in-place conversion.

Added dummy ROUND_NUM_TO macro, which needs to round a long number down to the given
precision (when converting upwards). Can be done with sprintf, but need to find a
better way.

Simplify converter casts with unions.

Replace SWAB_12 with SWAB_10. TODO: Need to check the last two bytes.


Compare: https://github.com/parrot/parrot/compare/5f4222ddff30...f98d38b202d1


More information about the parrot-commits mailing list