Commit Graph

7 Commits

Author SHA1 Message Date
Taiju Yamada
ae034d6f08 Use _byteswap_ushort etc for WIN32
Signed-off-by: Taiju Yamada <tyamada@bi.a.u-tokyo.ac.jp>
2024-11-21 15:30:27 +00:00
Greg Troxel
0231d314f5 Extend FreeBSD conditional about byte ordering to NetBSD
NetBSD has the same byte-ordering idioms as FreeBSD.

Signed-off-by: Greg Troxel <gdt@lexort.com>
2024-06-06 12:33:54 +01:00
Marcel Cornu
fa5b8baf84 include: reformat using new code style
Signed-off-by: Marcel Cornu <marcel.d.cornu@intel.com>
2024-04-22 11:35:03 +02:00
Ilya Leoshkevich
d3cfb2fb77 Fix s390 build
The goal of this patch is to make isa-l testsuite pass on s390 with
minimal changes to the library. The one and only reason isa-l does not
work on s390 at the moment is that s390 is big-endian, and isa-l
assumes little-endian at a lot of places.

There are two flavors of this: loading/storing integers from/to
memory, and overlapping structs. Loads/stores are already helpfully
wrapped by unaligned.h header, so replace the functions there with
endianness-aware variants. Solve struct member overlap by reversing
their order on big-endian.

Also, fix a couple of usages of uninitialized memory in the testsuite
(found with MemorySanitizer).

Fixes s390x part of #188.

Change-Id: Iaf14a113bd266900192cc8b44212f8a47a8c7753
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
2022-01-04 11:06:17 -07:00
Roy Oursler
aae6e29d28 igzip: Remove unaligned stores
Change-Id: I8d351c8b7153178d26d6fc702ee3036b71165b93
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2019-03-07 09:27:50 -07:00
Roy Oursler
a3169750b5 mem: Remove unaligned loads in base function
Change-Id: I8fb0f2e2e372485c864d5c60f816b661a865b707
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2019-03-07 09:27:50 -07:00
Roy Oursler
5be1ba2215 igzip: Remove undefined unaligned loads
Change-Id: I02591d958f8691d07b261218cf5ab361e8ad36c9
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2019-03-07 09:27:50 -07:00