iphone + LDC, a new ARM adventure

Dan Olson zans.is.for.cans at yahoo.com
Wed Jan 15 08:31:52 PST 2014


I finally stubbed and hacked enough places (mostly thread and exception
handling) to build druntime and phobos.  The only LDC hack was to
disable use of TLS.

I am building everthing with -march thumb.  

I linked the resulting druntime into an xcode project to try some
things out on an iphone.  

However, this call sequence appears often (D caling D).

	mov	lr, pc
	bx	r7

When the function called returns, exectution is no longer in thumb mode
because of the way the link register was loaded.  I think it is
generated by an llvm fastcc call, but haven't narrowed it down yet.  I
will try to create a simple D function to be sure.

I am thinking it should just be a blx r7 call.

I am referring to:

http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042e/IHI0042E_aapcs.pdf

Thoughts of where to look for the culprit?

note: I am have been using thumb because -march arm fails an assertion
in llvm.

Dan


More information about the digitalmars-d-ldc mailing list