terralang / terra

Terra is a low-level system programming language that is embedded in and meta-programmed by the Lua programming language.
terralang.org
Other
2.72k stars 201 forks source link

Fix calling convention in AArch64 for large structs #595

Closed elliottslaughter closed 2 years ago

elliottslaughter commented 2 years ago

See #594 for reproducer. AArch64 does not use byval on parameters passed by memory and instead uses noundef (though the latter is probably just an optimization).

elliottslaughter commented 2 years ago

Test results in emulation (previous result https://github.com/terralang/terra/pull/593#issuecomment-1204677209):

=================
= FAILING tests
=================
vars.t
zeroreturn2.t
bf.t
class.t
globals.t
coverage3.t
atomicrmw.t
vars2.t
pthreads.t
luabridge2.t
defercond.t 
hasbeenfrozen.t
rvaluerecv.t
teststd.t
simpleglobal.t
vecarith.t
let2.t
class6.t
zeroreturn.t
vecobj.t
benchmark_fannkuchredux.t
=================

528 tests passed. 21 tests failed.
elliottslaughter commented 2 years ago

Test suite on Graviton 2 via Cirrus:

The following tests FAILED:
     90 - coverage3.t (Failed)
    121 - defercond.t (SEGFAULT)
    209 - let2.t (SEGFAULT)
    343 - simpleglobal.t (Failed)
    396 - teststd.t (SEGFAULT)
    412 - vars.t (SEGFAULT)
    413 - vars2.t (SEGFAULT)
    415 - vecarith.t (SEGFAULT)
    417 - vecobj.t (Failed)
    424 - zeroreturn.t (SEGFAULT)

Won't merge the CI yet since it fails, but at least we can track that now.

elliottslaughter commented 2 years ago

Test results on macOS M1 (previous results https://github.com/terralang/terra/pull/593#issuecomment-1205656581):

=================
= FAILING tests
=================
cconv_array.t
bug372.t
vararg.t
bug372b.t
class3.t
atomicrmw.t
bug372c.t
class6.t
coverage3.t
vecobj.t
class.t
fakeasm.t
printfarray.t
=================

536 tests passed. 13 tests failed.