arm64 / iOS support

Attached is a working patch set for llvm to be able to emit arm64 (currently as triple aarch64-apple-ios) mach-o object files, in case someone is interested. I'm not sure if the llvm maintainers want the patch given the previous message that there's going to be an official patch set from apple to support this, but here is mine.

What works (tested on an iPhone 5S):
* objc strings, selectors, class refs
* defining classes
* regular strings, int64 constants
* exception handling
* emitting debug info: I couldn't test this yet due to no support for it in lldb.

What doesn't work yet:
* varargs, need to figure out how to do that

Some things that work but aren't right yet:
* The decision on if to emit a symbol for a label or not are currently done by section type, there has to be a way to tell llvm to always generate a symbol when it uses a label between a section, but I haven't found it yet.

If this is of interest suggestions on improvements are welcome.

made with a lot of help from Tim Northover and others in the irc channel.

arm64.patch (41 KB)

Carlo Kok schreef op 9/25/2013 8:32 PM:

Attached is a working patch set for llvm to be able to emit arm64
(currently as triple aarch64-apple-ios) mach-o object files, in case
someone is interested. I'm not sure if the llvm maintainers want the
patch given the previous message that there's going to be an official
patch set from apple to support this, but here is mine.

What works (tested on an iPhone 5S):
* objc strings, selectors, class refs
* defining classes
* regular strings, int64 constants
* exception handling
* emitting debug info: I couldn't test this yet due to no support for it
in lldb.

What doesn't work yet:
* varargs, need to figure out how to do that

Varargs are fixed in the attached patch. If anyone knows a better way to determine from the td if an argument is part of the vararg signature let me know.

varargs_macho.patch (4.31 KB)