[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#657157: marked as done (Produces NEON code on armhf even when explicitly asked not to)



Your message dated Sat, 07 Apr 2012 14:21:02 +0200
with message-id <4F80312E.6030008@debian.org>
and subject line Re: Bug#657157: Produces NEON code on armhf even when explicitly asked not to
has caused the Debian Bug report #657157,
regarding Produces NEON code on armhf even when explicitly asked not to
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
657157: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=657157
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: gcc-4.6
Version: 4:4.6.2-12
Severity: important

Hi,

Looking at a FTBFS bug on armhf in the pytables package. gcc-4.6 seems
to be emitting NEON code even when explicitly told not to:

(sid)93sam@harris:~$ gcc -c typeconv.c -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -mthumb -o typeconv.o
(sid)93sam@harris:~$ objdump -D typeconv.o | grep vldr
  a8:   ed93 6b00       vldr    d6, [r3]
  ae:   ed93 7b00       vldr    d7, [r3]
  be:   ed9f 7b44       vldr    d7, [pc, #272]  ; 1d0 <conv_float64_timeval32+0x1d0>
 118:   ed9f 7b2f       vldr    d7, [pc, #188]  ; 1d8 <conv_float64_timeval32+0x1d8>

There's other NEON code in the assembly output too, the grep is just
to show an example...

The single small source file is attached.
/***********************************************************************
 *
 *      License: BSD
 *      Created: December 21, 2004
 *      Author:  Ivan Vilata i Balaguer - reverse:net.selidor@ivan
 *      Modified:
 *        Function inlining and some castings for 64-bit adressing
 *        Francesc Alted 2004-12-27
 *
 *      $Source: /cvsroot/pytables/pytables/src/typeconv.c,v $
 *      $Id$
 *
 ***********************************************************************/

/* Type conversion functions for PyTables types which are stored
 * with a different representation between numpy and HDF5.
 */

#define PY_LONG_LONG long long

#include <math.h>
#include <assert.h>

#if (!defined _ISOC99_SOURCE && !defined __USE_ISOC99)
long int lround(double x)
{
  double trunx;

  if (x > 0.0) {
    trunx = floor(x);
    if (x - trunx >= 0.5)
      trunx += 1;
  } else {
    trunx = ceil(x);
    if (trunx - x >= 0.5)
      trunx -= 1;
  }

  return (long int)(trunx);
}
#endif  /* !_ISOC99_SOURCE && !__USE_ISOC99 */


void conv_float64_timeval32(void *base,
			    unsigned long byteoffset,
			    unsigned long bytestride,
			    PY_LONG_LONG nrecords,
			    unsigned long nelements,
			    int sense)
{
  PY_LONG_LONG  record;
  unsigned long  element, gapsize;
  double  *fieldbase;
  union {
    PY_LONG_LONG  i64;
    double  f64;
  } tv;

  assert(bytestride > 0);
  assert(nelements > 0);

  /* Byte distance from end of field to beginning of next field. */
  gapsize = bytestride - nelements * sizeof(double);

  fieldbase = (double *)((unsigned char *)(base) + byteoffset);

  for (record = 0;  record < nrecords;  record++) {
    for (element = 0;  element < nelements;  element++) {
      if (sense == 0) {
	/* Convert from float64 to timeval32. */
	tv.i64 = (((PY_LONG_LONG)(*fieldbase) << 32)
		  | (lround((*fieldbase - (int)(*fieldbase)) * 1e+6)
		     & 0x0ffffffff));
	*fieldbase = tv.f64;
      } else {
	/* Convert from timeval32 to float64. */
	tv.f64 = *fieldbase;
	/* the next computation is 64 bit-platforms aware */
	*fieldbase = 1e-6 * (int)tv.i64 + (tv.i64 >> 32);
      }
      fieldbase++;
    }

    fieldbase = (double *)((unsigned char *)(fieldbase) + gapsize);

    /* XXX: Need to check if this works on platforms which require
       64-bit data to be aligned.  ivb(2005-01-07) */
  }

  assert(fieldbase == (base + byteoffset + bytestride * nrecords));
}


--- End Message ---
--- Begin Message ---
closing. this is vfp code, not NEON code.


--- End Message ---

Reply to: