mirror of
https://github.com/rui314/mold.git
synced 2024-11-10 10:57:55 +03:00
Add a comment
This commit is contained in:
parent
ce78dfd4b2
commit
c1bdbe2327
@ -1,3 +1,20 @@
|
||||
// SPARC is a RISC ISA developed by Sun Microsystems.
|
||||
//
|
||||
// The byte order of the processor is big-endian. Anything larger than a
|
||||
// byte is stored in the "reverse" order compared to little-endian
|
||||
// processors such as x86-64.
|
||||
//
|
||||
// All instructions are 4 bytes long and aligned to 4 bytes boundaries.
|
||||
//
|
||||
// A notable feature of SPARC is that, unlike other RISC ISAs, it doesn't
|
||||
// need range extension thunks. It is because the SPARC's CALL instruction
|
||||
// contains a 30 bits immediate. The processor scales it by 4 to extend it
|
||||
// to 32 bits (this is doable because all instructions are aligned to 4
|
||||
// bytes boundaries, so the least significant two bits are always zero).
|
||||
// That means CALL's reach is PC ± 2 GiB, elinating the need of range
|
||||
// extension thunks. It comes with the cost that the CALL instruction alone
|
||||
// takes 1/4th of the instruction encoding space, though.
|
||||
|
||||
#include "mold.h"
|
||||
|
||||
namespace mold::elf {
|
||||
|
Loading…
Reference in New Issue
Block a user