News for hackers. Stuff that matters.
Re:Show HN: A minimal C runtime for Linux i386 and x86_64 in... by chappar on Saturday January 31, 2015 @03:17AM (#8976224)
I am not familiar with embedded asm. Can someone explan what the following line does?

"register long r10 __asm__( "r10" ) = a3"

Re:Show HN: A minimal C runtime for Linux i386 and x86_64 in... by tjgq on Saturday January 31, 2015 @10:36AM (#8976948)
It declares a variable named r10 and instructs the compiler to store it in the r10 CPU register. It's a GCC extension; the farthest you can get in standards-compliant C is

    register long r10 = a3;
but the register keyword is advisory only (the compiler is free to ignore it) and you cannot specify the exact register you want to be used.

Reference: https://gcc.gnu.org/onlinedocs/gcc/Local-Reg-Vars.html