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
14
votes
10 answers

nanoseconds to milliseconds - fast division by 1000000

I'm wanting to convert the output from gethrtime to milliseconds. The obvious way to do this is to divide by 1000000. However, I'm doing this quite often and wonder if it could become a bottleneck. Is there an optimized divide operation when dealing…
hookenz
  • 36,432
  • 45
  • 177
  • 286
12
votes
2 answers

Handling of integer with values > 2^32 on Sparc 32 bits

I coded a little program that measures the time spent into a loop (via an inline Sparc assembly code snippet). Everything is right until I set number of iterations above roughly 4.0+9 (above 2^32). Here's the code snippet : #include…
user1773603
12
votes
10 answers

Run Sparc binaries without Sparc hardware

I've been curious in the past few months in trying my hand at doing some assembly for the SPARC processor (either V8 or V9). My question is this, I have no access to a SPARC machine, is there a way I can run SPARC binaries on my x86 machine? I've…
nelsonslament
  • 537
  • 1
  • 9
  • 24
9
votes
1 answer

Learning about basic example of function call in SPARC assembly

I am learning SPARC assembly with a simple example that you can see below. I have several questions about this example which shows passing parameters for a procedure. In main section, I set 5 to first input parameter %o0 and 7 to second input…
user1773603
9
votes
1 answer

Does Boost C++ library support Solaris on Sparc?

I have been looking at Boost libraries for development of a cross-platform network server library. It is supposed to be used on Windows/Linux/Solaris. Does boost support these three? Only thing i can find by googling is some build trouble and that…
Allman
  • 290
  • 2
  • 12
8
votes
2 answers

Disassembled gcc output appears to do a "call 0" instead of "call function-offset", but works correctly

I had just a look at a very simple SPARC assembly output that I got from this C programm: int addition_func(int a, int b) { return(a+b); } void main() { int a = 20; int b = 19; int res; res = addition_func(a, b); } Disassembly of section…
Markus
  • 151
  • 3
8
votes
1 answer

Relocation Error when Inserting External Cross-Compiled SPARC Linux Module

First off: I am not an expert, so please excuse any mistakes I make trying to explain myself. I am trying to cross-compile an external Linux module for a SPARC machine using Sparc-Linux-GCC-4.4.2. The version of the Linux kernel is…
Stuart
  • 1,733
  • 4
  • 21
  • 34
7
votes
3 answers

Unable to cross-compile to SPARC using clang

So here's the situation: I need to be able to compile binaries from a Linux machine (on Ubuntu, for what it's worth) which are able to run from a SPARC server. The program I'm trying to compile is very simple: #include #include…
eezstreet
  • 119
  • 1
  • 10
6
votes
8 answers

C++ IDE for Solaris SPARC

We've been given a C++ code base that was apparently developed using Rational Apex as the front end. In our opinion, Apex is less than ideal for C++ development. We're looking for an IDE we can use that has syntax highlighting, code-walking (go to…
Dave
  • 4,546
  • 2
  • 38
  • 59
5
votes
3 answers

GCC inline assembly for SPARC: How to handle integer doubleword pairs?

From what I understand, in SPARC, 32-bit integer quantities are stored in single registers and 64-bit integer quantities are stored in adjacent register pairs, with the even register containing the high 32 bits and the odd register containing the…
phonetagger
  • 7,701
  • 3
  • 31
  • 55
5
votes
3 answers

Stack Overflow on SUN Sparc

/* attack.c */ /* compile: cc -o attack attack.c */ #include #include /* lsd - Solaris shellcode */ static char shell[] = /* 10*4+8 bytes */ "\x20\xbf\xff\xff" /* bn,a */ "\x20\xbf\xff\xff" /* bn,a …
Arlen
  • 6,641
  • 4
  • 29
  • 61
5
votes
0 answers

Thrown exception never caught, but thread not killed?

This is happening on a Solaris sparc machine: -bash-3.2$ uname -a SunOS b2s-sol10spr-1 5.10 Generic_147147-26 sun4v sparc sun4v I'm seeing a strange issue with exception handling. Here's a log of a short debugging session: GNU gdb (GDB)…
Bwmat
  • 4,314
  • 3
  • 27
  • 42
5
votes
1 answer

Mono compile on Solaris

I am trying to compile mono on Solaris 10. I have tried a lot of version from 2.11.4 to the todays latest 5.xx versions. But I have the failure all the time. I am using Sun-Fire-v240 hardware which has SPARC processor. Also, OS version is Oracle…
OrhanT
  • 91
  • 2
5
votes
0 answers

SPARC window_overflow

Suppose I have 8 windows like this figure: http://www.sics.se/~psm/sparcwin.gif And I'm right in that situation, WIM points to w7, and I'm in window w0. Suppose that in this window, I'm going to call some function that recives one parameter. So I…
lrnz
  • 51
  • 2
5
votes
4 answers

Can out-of-order execution lead to speculative memory accesses?

When a out-of-order processor encounters something like LOAD R1, 0x1337 LOAD R2, $R1 LOAD R3, 0x42 Assuming that all accesses will result in a cache miss, can the processor ask the memory controller for the contents of 0x42 before the it asks for…
João Fernandes
  • 1,101
  • 5
  • 11
1
2 3
19 20