Issue #6

0 up
0 down
Created by Nyan (Edited )

inventory of compatibility issues

I'm not sure you care about these issues, but I thought I'd point them out anyway.

  • _mm_extract_epi64 is not available in 32-bit mode, so compilation will fail in that case. A workaround is to disable SSE4 and CLMUL
  • there are a number of instances of double semi-colons in the code, that compilers like MSVC don't like. Should be trivial to fix. Example instance:
    gf_w16_split_4_16_lazy_sse_multiply_region(gf_t *gf, void *src, void *dest, gf_val_32_t val, int bytes, int xor)
    #ifdef INTEL_SSSE3
      uint64_t i, j, *s64, *d64, *top64;;
      uint64_t c, prod;
      uint8_t low[4][16];
  • bzero is not available in all compilers, suggest using memset instead
  • there a few cases where variables aren't declared at the top of a block - for maximum portability, I suggest just moving the declaration to the top, for example:
void gf_w16_group_4_4_region_multiply(gf_t *gf, void *src, void *dest, gf_val_32_t val, int bytes, int xor)
  uint16_t p, l, ind, r, a16, p16;
  struct gf_w16_group_4_4_data *d44;
  gf_region_data rd;
  uint16_t *s16, *d16, *top;

  if (val == 0) { gf_multby_zero(dest, bytes, xor); return; }
  if (val == 1) { gf_multby_one(src, dest, bytes, xor); return; }

  gf_internal_t *h = (gf_internal_t *) gf->scratch;

Hope this is useful, and thank you very much for the awesome library! :)

Assignee: None
Milestone: None
1 participant
  • Eec633b4322a1884e5bd1861f08b6112?s=40&d=identicon
    Nyan @Nyan

    I've fixed all but the last point in my fork here

    MSVC didn't like variables that weren't declared at the top of a block, but doesn't seem to mind it now (probably after I upgraded), so I haven't bothered trying to look for them.
    I'm not entirely confident with the workarounds for extract/insert_epi64, though they seem to pass gf_unit.

    Not sure how to make a merge request here, so just leaving the code there if anyone's interested in merging it.

    Choose File ...   File name...
  • Eec633b4322a1884e5bd1861f08b6112?s=40&d=identicon
    Nyan @Nyan

    mentioned in merge request !15

    Choose File ...   File name...