• Tim-Philipp Müller's avatar
    orcc: program-c: fix 64-bit parameter loading (loadpq) on big-endian systems · 463295f6
    Tim-Philipp Müller authored
    When passing 64-bit parameters through OrcExecutor, we
    have to split them up into two 32-bit parameters for
    backwards compatibility reasons. When generating C code,
    make sure that we split up 64-bit parameters in the same
    way as loadpq will read them back later. The lower 32 bits
    should end up in params[ORC_VAR_D1+i] and the higher bits
    should end up in params[ORC_VAR_T1+i]. The way it was done
    so far, the higher/lower bits ended up swapped on big endian
    systems, and then got deserialised in swapped order by loadpq.
    This resulted in bogus parameters being used.
    In particular, this broke the gstreamer volume element and
    its unit tests on big endian systems when handling samples
    in F64 format (i.e. doubles).
orcc.c 40.4 KB