What is the format of the x86_64 va_list structure?

The x86-64 System V ABi doc may help. It’s a reference, albeit lightweight. The Variable Argument List reference starts on page 54, then it goes on, page 56-57 documents va_list: The va_list Type The va_list type is an array containing a single element of one structure containing the necessary information to implement the va_arg macro. … Read more

GCC ABI compatibility

Since gcc-3.4.0, the ABI is forward compatible. I.E. a library made using an older release can be linked with a newer one and it should work (the reverse doesn’t). Obviously, there could be bugs, but there is only one mentionned in the documentation: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33678

Differences between arm “versions?” (ARMv7 only)

I would assume that it’s indicating packages compiled for little-endian and hard-float ABI as appropriate – i.e. it’s a software thing and only tangentially related to the hardware. In other words, you don’t actually have an “armv7l” processor – you have an ARMv7 processor which may well have a hardware FPU (and can run big-endian … Read more

Why does the Mac ABI require 16-byte stack alignment for x86-32?

From “Intel®64 and IA-32 Architectures Optimization Reference Manual”, section 4.4.2: “For best performance, the Streaming SIMD Extensions and Streaming SIMD Extensions 2 require their memory operands to be aligned to 16-byte boundaries. Unaligned data can cause significant performance penalties compared to aligned data.” From Appendix D: “It is important to ensure that the stack frame … Read more

why is data structure alignment important for performance?

Alignment helps the CPU fetch data from memory in an efficient manner: less cache miss/flush, less bus transactions etc. Some memory types (e.g. RDRAM, DRAM etc.) need to be accessed in a structured manner (aligned “words” and in “burst transactions” i.e. many words at one time) in order to yield efficient results. This is due … Read more

Why is address 0x400000 chosen as a start of text segment in x86_64 ABI?

Bottom line: some technical limitations that amd64 has in using large addresses suggest dedicating the lower 2GiB of address space to code and data for efficiency. Thus the stack has been relocated out of this range. In i386 ABI1 stack is located before the code, growing from just under 0x8048000 downwards. Which provides “a little … Read more

Does libcxxabi makes sense under linux? What are the benefits?

You should not use libcxxabi directly. To my understanding it is a kind of platform abstraction library, providing low level functions needed to implement libcxx. If you are asking about using libcxx or libstdc++, the differences are mostly the license, newer standard version completeness (the clang project seems slightly faster in implementing recent C++ revisions) … Read more

tech