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

Multiplication algorithm in SPARC

been working for a few (straight) days on this multiplication algorithm in SPARC... Really can't figure out what's wrong. I've stepped through a few iterations of the code. It's doing what the proposed C algorithm wants it to. Here it is in…
Dan Sander
  • 21
  • 2
2
votes
0 answers

Sparc Assembly: Printing a \n character with printf

OK so i have two assembly .s files the first function prototype is void printCharacter( char c ) and in it I call printf to print the character ./global printCharacter .section ".data" format: .asciz "%c" .section ".text" printCharacter: …
user1742796
  • 21
  • 1
  • 3
2
votes
2 answers

Why does one of these programs work when the other doesn't?

I recently finished a project in which I was to write a program to "attack" a SUN Sparc "server" and cause a buffer overflow. The goal was to launch /bin/ksh from inside of the running "server", basically. Eventually I got it working, but for what I…
BigDamnHero
  • 71
  • 2
  • 10
2
votes
0 answers

Should the machine instruction fxtod be ridiculously slow

I have a program on which I was trying to perform some loop optimization It's written in C++ and compiled using gcc eventually using a profiler I tracked down more than half the execution time of the loop to the line double x_component =…
camelccc
  • 2,847
  • 8
  • 26
  • 52
1
vote
2 answers

porting network code to 64 bits

I have a program that performs some network IO that compiles a 32 bit binary just fine However, when I set the -m64 option at compile time I get the following rather cryptic error In file included from /usr/include/sys/stream.h:22, from…
camelccc
  • 2,847
  • 8
  • 26
  • 52
1
vote
2 answers

assigning a value to a long long integers using gcc on sparc solaris

I came across something that I think rather strange. The test program int main(int argc, char* argv[]) { cout<<"hello"<
camelccc
  • 2,847
  • 8
  • 26
  • 52
1
vote
1 answer

How do I get the following information out of a solaris sparc machine?

-Processor Id -baseboard manufacturer and -serial number of the bios For the x86 solaris I got it from smbios but when I run smbios on a solaris sparc, it gives me an error message: smbios: failed to load SMBIOS: System does not export an SMBIOS…
shawn
  • 4,063
  • 7
  • 37
  • 54
1
vote
2 answers

How can I change the path for root permanently in solaris sparc?

I have edited /etc/profile but the path only gets changed for normal users whereas the change does not reflect for root, how can I make it such that the path also gets changed for root?
shawn
  • 4,063
  • 7
  • 37
  • 54
1
vote
3 answers

GCC Inline Assembly for Sparc architecture

I've found in internet the implementation of __sync_val_compare_and_swap: #define LOCK_PREFIX "lock ; " struct __xchg_dummy { unsigned long a[100]; }; #define __xg(x) ((struct __xchg_dummy *)(x)) static inline unsigned long __cmpxchg(volatile void…
G-71
  • 3,626
  • 12
  • 45
  • 69
1
vote
1 answer

Simple SPARC assembly printf code (print the stack variables)

fmt0: .asciz "%d\n" .align 4 .global main, printf main: save %sp, -76 & -8, %sp mov 5, %l0 st %l0, [%fp-4] mov 7, %l1 st %l1, [%fp-8] add %l0, %l1, %l2 st %l2, [%fp-12] clr %l3 clr %l4 clr…
manutd
  • 564
  • 9
  • 22
1
vote
2 answers

Trouble with writing a very basic SPARC Assembly routine that returns whether a number is odd

I'm writing a small assembly routine called isOdd, which, as the name implies, returns if the passed integer is odd, by returning 1 from a % operation. This is my code so far: Function prototype: int isOdd( long num ) isOdd: save %sp, -96,…
lordmarinara
  • 267
  • 5
  • 15
1
vote
3 answers

Any javascript runtime for rails for SPARC Solaris 10?

I am trying to get rails running on a solaris 10 machine (SPARC). I have got ruby and rails installed and was able to create a new project. When I try to start the rail server, I…
Eric Seifert
  • 1,946
  • 2
  • 17
  • 31
1
vote
0 answers

GCC __attribute__((aligned(4))) not working as expected

I have a GCC question about variable alignment. I thought I understood it, but can't get this to work. This code: uint8 aaa[4]; uint32 *bbb = (uint32 *)&aaa; generates this warning: warning: cast increases required alignment of target type…
Symmetric
  • 4,013
  • 3
  • 27
  • 33
1
vote
1 answer

Cannot locate /usr/share/examples/svr4 on NetBSD 9.2 32-bit

I'm attempting to setup a (32-bit) NetBSD 9.2 virtual machine with QEMU so that I can run SPARC binaries on it, specifically those that were compiled on Solaris machines (currently I've compiled a short C program on Solaris 8 and am trying to run it…
fireshadow52
  • 6,298
  • 2
  • 30
  • 46
1
vote
0 answers

OpenBoot client program load address and

While browsing the web and looking for stuff about the OpenBoot, and SPARCv9 processors, I saw that any client program is loaded by the OpenBoot at 0x4000[1]. Why is this the address used. Also if i try to do a dump on an actual sparc machine i get…
skyel
  • 713
  • 1
  • 6
  • 20