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
0
votes
1 answer

Vim Block Comments Syntax Coloring Inconsistent

I am writing SPARC assembly code in Vim and there is sometimes a bug when vim applies syntax coloring to block comments ( /* ... */ style comments ). For example: Vim seems to ignore the comment syntax coloring after line 42, although it is…
rish987
  • 143
  • 7
0
votes
0 answers

Sparc Assembly - Put address into register or Put value at the adress contained in register

I just want to understand a detail with Sparc Assembly : if do : .data s0: .asciz "foo %s\n" s1: .asciz "bar" .text .global main main: save %sp, -96, %sp set s0, %o0 set s1, %o1 then have I the address of s0 and s1 strings into…
user1773603
0
votes
0 answers

Understanding about a little code snippet in Sparc Assembly

From this SPARC code, I would like someone to confirm a confusion that I may do about the set instruction into SPARC assembly: main: /* I := J */ ! Store address of J into local register %l7 set J, %l7 ! Load…
user1773603
0
votes
0 answers

SPARC: Segfault error when using a store instruction

I need to update an element in a long array passed as an argument for this routine by a number also passed as an argument. /* * Function Prototype: * updateNumber( long * numberAr, long newNumber); */ updateNumber: save %sp, -96,…
Rez
  • 187
  • 12
0
votes
1 answer

What's the proper way to update a value passed in assembly?

I'm using the SPARC architecture. I have to update the number of a long passed as an argument without returning it, but I don't know how to do that because the input registers are used for both the parameters and for returning a value. I've seen…
Rez
  • 187
  • 12
0
votes
1 answer

SPARC Assembly if/else if not working

I'm translating a C method with two if statements to assembly. I'm having trouble getting a branch to work. I need two branches to be part of the same comparison, and one branch to be on its own. The two grouped branches work, but the lone third one…
Rez
  • 187
  • 12
0
votes
0 answers

Checking contents of a register in SPARC Assembly

Is there a way to print the contents of a register if I'm expecting numbers? I know of printf, but I've been told and seen that it uses the first char of a string as an argument. What I want to do for debugging (for things such as loop iterations)…
Rez
  • 187
  • 12
0
votes
1 answer

XChangeProperty uses long for 32-bits

The pid variable that is passed to XChangeProperty() is not a long. The libX11 code deferences the variable as a long and on a 64-bit sparc this must be aligned on a 8-byte boundary. Because it is an int, it gets aligned on a 4-byte boundary,…
geo
  • 193
  • 1
  • 1
  • 8
0
votes
1 answer

SPARC cpu VS thread VS core

I'm not sure if anyone has really asked this in this forum before. Initial search in the form didn't really dig out substantial info. Trying to pace together some information from a product licensing view. Where can i find information and the…
user2967267
  • 147
  • 1
  • 1
  • 10
0
votes
0 answers

How to concatenate two registers in assembly? SPARC

I want two registers to be combined as one unit. I am learning new multiplication by adding and shifting. So is this a wrong way to do? 1stmul: set 0x04ee67b7, %l1 !multiplicand set 0x072e8b8c, %l2 …
user432297
  • 121
  • 1
  • 6
0
votes
0 answers

SPARC assembly Relocation Overflow when doing btst

When compiling the following code with gcc I get a Relocation Overflow error pointing to this line: btst 0x8000, %l0 This is being compiled on a 32 bit machine so there should be no reason bit 15 (the 16th bit) should overflow a 32 bit…
Nodnarb3
  • 27
  • 6
0
votes
1 answer

How to install MySQL 5.5 on a Solaris 11 SPARC machine

I had MySQL 5.1 up and running on my SPARC Solaris 11 Sun Fire T2000. The software I want to use needs MySQL 5.5. I uninstalled the mysql-51 package and installed the mysql-55 package. When I try to run mysql I get the error: root:~# mysql -bash:…
frank
  • 1
  • 1
0
votes
2 answers

Writing a function for C program using assembly language

I have to implement set_bit function which should be a atomic operation. I found assembly code for this in linux source. (I'm using sparc) and want to change it to a function that can be used in C program. static void set_bit(unsigned int nr,…
Chan Kim
  • 5,177
  • 12
  • 57
  • 112
0
votes
0 answers

Difference betwen TSO/RMO/PSO and Power/ARM

This question is about memory consistency. There is an example below that might help if it's unclear. A problem I am looking at asks for code that can do something when executed on Power/ARM that it could not on the Sparc under RMO. Is this…
Joe Huha
  • 548
  • 3
  • 16
0
votes
0 answers

Assembly - Extract a field from a register

I have an assembly assignment and are having issues trying t work the problem's logic. I was hoping that someone could help me get started in this. The program has to be written in assembly code. PROBLEM: Write assembly program to extract a field…
user3521205
  • 41
  • 1
  • 1
  • 7