Here is good tutorial for SPARC Assembly Language including comping and running code with gcc also refer SPARC Assembly Language
SPARC and Pentium use a different byte ordering ("endianness") in memory and on storage: SPARC uses big-endian: the most-significant byte of the integer comes first Pentium uses little-endian: the least-significant byte of the integer comes first I.e. when the file is transferred to machine with a different endianness, the bytes...
You are right, your gcc is not set up for SPARC. If you are running Windows, the computer you are running on has an ISA other than SPARC (most likely x86). Your ISA is the hardware interface and can not be changed by a software upgrade. To compile SPARC programs,...
From the SPARC Assembly Language Reference Manual (https://docs.oracle.com/cd/E26502_01/html/E28387/toc.html) 6.2 Register Usage The global registers %g0-%g7 are more complicated. The %g0 register is always zero. The %g6 and %g7 are always reserved for the operating system, so assembly code should not modify them. The other global registers, %g1-%g5, are caller saves,...
I know that %o2 register in main section becomes %i2 in called procedure but why I can't set directly the value of %i2 into %o1 register with this "mov" instruction ? %o registers only become %i after doing save, usually at the beginning of a function being called. In...
Starting with elf-em.h, we see the following (cherry-picked) entries: #define EM_SPARC 2 #define EM_SPARC32PLUS 18 /* Sun's "v8plus" */ #define EM_SPARCV9 43 /* SPARC v9 64-bit */ Some Googling led me to this reference page for Sun Studio 12, which says: v8plus Compile for the V8plus version of the SPARC-V9...