* beneficial refactoring; use system.Endianness

* closes #18433
This commit is contained in:
Andreas Rumpf 2021-07-13 12:44:29 +02:00 • committed by GitHub
commit b3aca78e22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 42 additions and 6 deletions

View file

@ -196,13 +196,11 @@ type
cpuSparc64, cpuMips64, cpuMips64el, cpuRiscV32, cpuRiscV64, cpuEsp, cpuWasm32
type
TEndian* = enum
littleEndian, bigEndian
TInfoCPU* = tuple[name: string, intSize: int, endian: TEndian,
TInfoCPU* = tuple[name: string, intSize: int, endian: Endianness,
floatSize, bit: int]
const
EndianToStr*: array[TEndian, string] = ["littleEndian", "bigEndian"]
EndianToStr*: array[Endianness, string] = ["littleEndian", "bigEndian"]
CPU*: array[succ(low(TSystemCPU))..high(TSystemCPU), TInfoCPU] = [
(name: "i386", intSize: 32, endian: littleEndian, floatSize: 64, bit: 32),
(name: "m68k", intSize: 32, endian: bigEndian, floatSize: 64, bit: 32),