cil icon indicating copy to clipboard operation
cil copied to clipboard

Support for `ARM64` architectures that have `long double` as 64bit

Open michael-schwarz opened this issue 2 years ago • 3 comments

Currently, we do not have proper support for any architecture were float128 does not have the same size & alignment as long double. Unfortunately, this includes Apple's M1 architecture, which is gaining popularity as Mac users update their machines.

We should thus:

  • [ ] Expose float128 as a distinct fkind on machines that have it.

This is urgently needed as we have some students with recent versions of OS X in the practical course at TUM.

michael-schwarz avatar Oct 27 '22 14:10 michael-schwarz

I guess this is also why testrungcc/builtin_object_size fails on macos-homebrew-ocaml-4.14-arm64 in opam-repository CI:

# /opt/homebrew/Cellar/gcc/12.2.0/lib/gcc/current/gcc/aarch64-apple-darwin21/12/include/stddef.h:424: Error: float128 only supported on machines where it is an alias (w.r.t. to size and align) of long double: size: 8 align: 8 
# Error on A.TYPEDEF (GoblintCil__Errormsg.Error)
# Error: Cabs2cil had some errors
# Fatal error: exception GoblintCil__Errormsg.Error
# make: *** [testrungcc/builtin_object_size] Error 2

sim642 avatar Nov 23 '22 10:11 sim642

Yes!

michael-schwarz avatar Nov 23 '22 10:11 michael-schwarz

There is #119, but one would have to add support for that to Goblint.

michael-schwarz avatar Nov 23 '22 10:11 michael-schwarz

This needs to be checked in practice such that we can relax the opam package availability constraints again: https://github.com/goblint/cil/commit/5a3b7bb7f4d9b67678826ab7698f8a9048891553. I suppose arm64 might be one, but #110 has a list of others we had to disable. Although all of those contain other failures as well, so probably cannot be re-enabled.

sim642 avatar Feb 13 '23 10:02 sim642

I think if we aim to re-enable tests for other architectures, we would need to wrap some of the tests into #ifdefs, as some features will simply not be available on all architectures.

michael-schwarz avatar Feb 13 '23 11:02 michael-schwarz