fix tsizeof3 for aarch64 (#13169)
This commit is contained in:
parent
1b54be7779
commit
d245d4cf09
3 changed files with 22 additions and 20 deletions
|
|
@ -234,6 +234,8 @@ proc parseSpec*(filename: string): TSpec =
|
||||||
result.err = reDisabled
|
result.err = reDisabled
|
||||||
of "freebsd":
|
of "freebsd":
|
||||||
when defined(freebsd): result.err = reDisabled
|
when defined(freebsd): result.err = reDisabled
|
||||||
|
of "arm64":
|
||||||
|
when defined(arm64): result.err = reDisabled
|
||||||
else:
|
else:
|
||||||
result.parseErrors.addLine "cannot interpret as a bool: ", e.value
|
result.parseErrors.addLine "cannot interpret as a bool: ", e.value
|
||||||
of "cmd":
|
of "cmd":
|
||||||
|
|
|
||||||
|
|
@ -18,26 +18,6 @@ proc toByteArrayBE*[T: SomeInteger](num: T): ByteArrayBE[sizeof(T)]=
|
||||||
let a = 12345.toByteArrayBE
|
let a = 12345.toByteArrayBE
|
||||||
echo a[^2 .. ^1] # to make it work on both 32-bit and 64-bit
|
echo a[^2 .. ^1] # to make it work on both 32-bit and 64-bit
|
||||||
|
|
||||||
|
|
||||||
#-----------------------------------------------------------------
|
|
||||||
|
|
||||||
# bug #11792
|
|
||||||
type
|
|
||||||
m256d {.importc: "__m256d", header: "immintrin.h".} = object
|
|
||||||
|
|
||||||
MyKind = enum
|
|
||||||
k1, k2, k3
|
|
||||||
|
|
||||||
MyTypeObj = object
|
|
||||||
kind: MyKind
|
|
||||||
x: int
|
|
||||||
amount: UncheckedArray[m256d]
|
|
||||||
|
|
||||||
|
|
||||||
# The sizeof(MyTypeObj) is not equal to (sizeof(int) + sizeof(MyKind)) due to
|
|
||||||
# alignment requirement of m256d, make sure Nim understands that
|
|
||||||
doAssert(sizeof(MyTypeObj) > sizeof(int) + sizeof(MyKind))
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------
|
#---------------------------------------------------------------------
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
|
||||||
20
tests/misc/tsizeof4.nim
Normal file
20
tests/misc/tsizeof4.nim
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
discard """
|
||||||
|
disabled: "arm64"
|
||||||
|
"""
|
||||||
|
|
||||||
|
# bug #11792
|
||||||
|
type
|
||||||
|
m256d {.importc: "__m256d", header: "immintrin.h".} = object
|
||||||
|
|
||||||
|
MyKind = enum
|
||||||
|
k1, k2, k3
|
||||||
|
|
||||||
|
MyTypeObj = object
|
||||||
|
kind: MyKind
|
||||||
|
x: int
|
||||||
|
amount: UncheckedArray[m256d]
|
||||||
|
|
||||||
|
|
||||||
|
# The sizeof(MyTypeObj) is not equal to (sizeof(int) + sizeof(MyKind)) due to
|
||||||
|
# alignment requirement of m256d, make sure Nim understands that
|
||||||
|
doAssert(sizeof(MyTypeObj) > sizeof(int) + sizeof(MyKind))
|
||||||
Loading…
Add table
Add a link
Reference in a new issue