Questions tagged [sparc]

SPARC(Scalable Processor Architecture) Sun Microsystems's specific CPU.

SPARC is a RISC instruction set architecture (ISA) developed by Sun Microsystems (now merged into Oracle), introduced in mid-1987.

SPARC hardware often runs Solaris, the Unix operating system, but other OSes run on SPARC hardware, and runs on more than just SPARC hardware.

SPARC doesn't allow unaligned loads, so SIGBUS (bus error) faults are a common problem when porting C or C++ to SPARC from x86 (for example).

In assembly, SPARC's 32 architectural registers are a sliding window onto a virtual register file. The save instruction that slides the window might or might not spill to memory, depending on whether the CPU microarchitecture is out of registers when it runs.

287 questions
1
vote
1 answer

Use sparc extended asm in global function

I am trying to write an assembly function without using c prototypes. For some reason it looks like the gcc doesn't allow to use extended asm in the global context. Please consider the following code that compiles succssefully: void *g_var; void…
Eytan Naim
  • 159
  • 14
1
vote
2 answers

Optimizing C code for Sparc for smaller image size using gcc

I have some C code that I trying to compile for a Sparc V8 based system with highly constrained resources. I am using gcc and I would like to ask the following questions. 1) Besides turning off debugging (-g flag) what other options do I have to…
Xofo
  • 1,256
  • 4
  • 18
  • 33
1
vote
0 answers

SPARC assembly btst

I have an assignment to do but all of the topics have not been thoroughly discussed in class. We are coding in assembly (SPARC). This is the assignment: Write an assembly program to test if the flag 0x10 is set in the register %l0. If it is set,…
boydf
  • 7
  • 3
1
vote
1 answer

error: unknown "%" symbol on SPARC

My program works fine on Ubuntu. It encounters error when I compile it with gcc on a Solaris SPARC system. I have several pieces of code like: printf("endian_convert: %s\n", endian_convert); asm("movl $8, %esi\n\t" "movl $.LC0,…
Patrick
  • 293
  • 1
  • 5
  • 14
1
vote
1 answer

GNU AS SPARC V8E partial WRPSR

The SPARC V8 Processor State Register (PSR) contains a bit to enable/disable traps (ET) as detailed in the SPARC Architecture Manual version 8 available at http://sparc.org/technical-documents/ Disabling traps is a non atomic operation as explicitly…
1
vote
1 answer

why __thread gives linker error when printf statement is used?

Here is my sample program, int main() { static __thread int a; printf("\n %d",a); return 0; } In this program, when printf statement is removed, it is linking fine. When printf statement is included, it gives the following linker…
VINOTH ENERGETIC
  • 1,775
  • 4
  • 23
  • 38
1
vote
0 answers

How to ingest log from remote solaris sparc 10 host to logstash on centos 7?

Logstash is install on Centos 7. Log file is on Solaris Sparc 10 remote host. What is the best way to ingest live log file from Sparc to Logstash?
user3469997
  • 31
  • 1
  • 4
1
vote
0 answers

How can I achieve remote ZFS snapshot and restoration with logical domains?

Hardware: Solaris SPARC with ZFS filesystems I have setup the primary domain(dom0) on machine 1 with a logical domain called test. Additionally I also have machine 2 where the test-backup is supposed to reside and act as a failover. test-backup is a…
shawn
  • 4,063
  • 7
  • 37
  • 54
1
vote
1 answer

Segfault error from printf?

I'm doing SPARC assembly. Here's some of my code: convert: save %sp, -96, %sp mov %i0, %l0 !%i0 has a long array mov %i1, %l1 !%i1 has a char array process: ld [%i0], %o0 !maps firstArray[0] to…
Rez
  • 187
  • 12
1
vote
1 answer

Building subversion 1.6.12 - make: *** [subversion/libsvn_subr/libsvn_subr-1.la] Error 1 - Solaris 10 Sparc

I get the following while trying to compile subversion 1.6.12 from source on Solaris 5.10 SPARC platform. I only need the svn client program on this machine so no need for Apache, Neon or Swig. My configure: $ ./configure --without-berkeley-db…
Johan
  • 11
  • 1
  • 2
1
vote
1 answer

Why would a program compiled for a SPARC ISA read an integer differently than on a Pentium ISA?

A program compiled for a SPARC ISA writes a 32-bit unsigned integer 0xABCDEF01 to a file, and reads it back correctly. The same program compiled for a Pentium ISA also works correctly. However, when the file is transferred, the program incorrectly…
Badger
  • 301
  • 3
  • 15
1
vote
1 answer

Just one source code can be used on Solaris 11 sparc and x86?

I've made some access control program with PAM, and it can be compiled on Solaris 11 sparc and x86 now. I know that the architecture is difference between sparc and x86. Would I test on each platform? or just one platform case? thank you, read it.
ggman
  • 23
  • 2
1
vote
1 answer

Compiling sparc code for x86 and arm

Let's say I've got a collection of source code written for second-generation sparc processors, and some of the C code is architecture-dependent. How can I compile this code for x86 and ARM processors? I initially thought it'd be easy to use GCC and…
OrangeCalx01
  • 806
  • 2
  • 7
  • 21
1
vote
2 answers

Sparc assembly - Global registers not consistent throughout functions call

I am currently working on a simple SPARC assembly code which computes the factorial of 5. I would like to know why the global registers that I used are not consistent througout function calls. With the traditionnal version using of local registers…
user1773603
1
vote
2 answers

Atomicity of a read on SPARC

I'm writing a multithreaded application and having a problem on the SPARC platform. Ultimately my question comes down to atomicity of this platform and how I could be obtaining this result. Some pseudocode to help clarify my question: // Global…
wlformyd
  • 237
  • 2
  • 12