After speaking with Craig Topper about some recent defects, he pointed
out that _ExtInts should be passed indirectly if larger than the largest
int register, and like ints when smaller than that. This patch
implements that.
Note that this changed the way vaargs worked quite a bit, but they still
work.
Asking silly questions because I don't stand a chance of understanding either the code or the tests...
In the x86-64 ABI, an ordinary 16-byte struct would be passed in rdi/rsi and returned in rdx/rax. An ordinary 17-byte struct would be passed by hidden reference and returned by hidden reference.
Is your intent here that _ExtInt will follow the same convention, i.e., _ExtInt(128) will be passed in rdi/rsi and returned in rdx/rax? and _ExtInt(129) will be passed and returned by hidden reference?
Clang trunk currently passes _ExtInt(256) in rdi/rsi/rdx/rcx/r8/r9/stack as if it were a series of uint64_ts. (I hadn't noticed until now.) That's kind of cute. Is the current PR motivated by performance concerns with the multi-uint64_t approach, or just trying to be consistent with the struct rules?