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

How to assign a number to a floating point register using sparc assembly?

For example, I want to assign 0x5 to %f1. How to achieve this?
programmer
  • 41
  • 2
0
votes
1 answer

Writing a loop for the sparc machine

I am trying to write the following code for the sparc machine. y=(x-7)(x-11) for the range 0<=x<=10 and I want to print out the following code like this for input of x=0 output y=77 and so on up to ten. I managed to make the loop. But my problem is…
0
votes
1 answer

Access high memory address (+13bits address) in ARC

I'm told I have to load information that is stored in the memory position 0xA033C000. That position in binary is written with more than 13 bits (10100000001100111100000000000000). Yet the instruction format for load in ARC states that if I were to…
Heathcliff
  • 3,048
  • 4
  • 25
  • 44
0
votes
1 answer

integer and float instructions in sparc

While working with SPARC-V9 instruction set, I am trying to classify some instructions as Integer or Float. I want to know do we categorize branch instructions as integer? What about NOP? What about load/store? Another issue is, when I see LDF …
mahmood
  • 23,197
  • 49
  • 147
  • 242
0
votes
1 answer

SIGBUS when destructing an object with std::fstream objects

I've been migrating a project on Solaris from compat mode (4) to 64-bit with STL and the standard streams library. For the most part, I've managed to overcome quite a lot of issues. I am however running into some issues surrounding streams and…
Brad Mitchell
  • 254
  • 1
  • 3
  • 12
0
votes
1 answer

How to replace a buggy function in a .so file without the source code?

I have a buggy function in a shared library. It enters infinite loop when recv() returns 0. There's no source code. I was able to decompile the buggy part and change some processor instructions without resizing the function, but there's no room…
basin
  • 3,949
  • 2
  • 27
  • 63
0
votes
1 answer

Assembly - value of %o registers after calling function

When writing an assembly code, After making a call to a function that takes several parameters, are all the %o registers (except for %o0 since it contains the return value) set to 0? For example: mov %i0, %o0 mov %i1, %o1 mov %i2, %o2 call…
user2481095
  • 2,024
  • 7
  • 22
  • 32
0
votes
1 answer

Debugging open() command call with truss

Using truss -t'open' $(program_call) I get: open("command.txt", O_RDONLY|O_NONBLOCK) = 5 response FIFO file descriptor = -1 // Open call was literally sandwiched between print commands, but its not here? response FIFO file descriptor =…
ICantNameMe
  • 93
  • 1
  • 1
  • 7
0
votes
1 answer

SPARC Assembly, setting the C flag

The is leaving me baffled, and I really can't figure out why I am getting this problem. I am to create a program in c that outputs an unsigned value just before the C flag is set, using assembly to accumulate a variable with addcc, and send back the…
Dillon Burton
  • 363
  • 6
  • 16
0
votes
1 answer

How would I convert this C for loop into assembly level language?

I need to write an assembly program finding the maximum of x^3 -14x^2 +56x -64 in the range -2<=x<=8 and the maximum value should be in one of the registers at the end of the program. I wrote the code in C, but I'm not sure how to convert it myself…
user2012751
  • 153
  • 2
  • 2
  • 9
0
votes
1 answer

Entering an integer time value followed by ":" in SPARC assembly language

I am trying to ask a user to enter a time value in this order hours:min - for example user may enter 3:45. Now , I want to get the hours value and do something with it, then I want to take the minutes value and do something else with it. I am using…
Andy M
  • 167
  • 1
  • 2
  • 7
0
votes
1 answer

SPARC Assembly Language

I am trying to run a sample Sparc assembly language , but I am not even sure where to start. I tried vim macro or m4 example.m but I dont know where and how to compile it. I searched the internet, read articles, but none of them mentioned how to…
Andy M
  • 167
  • 1
  • 2
  • 7
0
votes
1 answer

Converting from synthetic instructions to assembly directives using .word

I was wondering how to take a line of Assembly code written in synthetic instructions and converting it by hand into .word assembly directives. For instance how do you go from something simple like add %i0, %i0, %i0 to .word 0xB0060018 A…
Dillon Burton
  • 363
  • 6
  • 16
0
votes
2 answers

Linking assembly language with c

I am very new to assembly language, and fairly new to C. I have looked at an example that creates a calls a function from the c code and the assembly code has a function that does the calculation and return the value (This is an assignment) C…
Dillon Burton
  • 363
  • 6
  • 16
0
votes
1 answer

Code writes to 1, but not to stdout?

I'm trying to get some simple assembler code on sparc32 running, but it does not write to standard output, the problem occurs either way with ta 0x00 or ta 0x08: # as -s gah.s -o gah.o # ld gah.o -o gah -lc # ./gah # # truss ./gah execve("./gah",…
Juergen
  • 351
  • 1
  • 2
  • 10