sparc

SPARC assembly

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 an emulator & assembler/linker for SPARC running on an x86(Linux)? I've looked at QEMU but Im not too sure as this is what I need/ ...

SPARC - Bit mask without shift

Hi, I'm learning SPARC assembly and I have to create a script that extracts a field from a register. The script accepts 3 values, initial number, field start position, field length. It can't use any shift functions, but it can use multiply and divide. I'm currently suffering from a respiratory virus, and am subsequently on a significant ...

SPARC Assembly Tutorial

Any recommendations for a good tutorial on SPARC assembly online for free? Thanks ...

What is anulled branch different from regular branch instructions?

For SPARC Assembly particularly, how are anulled branches different from regular branches? I always thought that anulling branch instructions is required when I need to fill the nop delay slot for branch instructions. However, I don't think I'm correct on this part, because you can fill the nop without anulling the branch. ...

How to get memory locations of library functions?

I am compiling a C program with the SPARC RTEMS C compiler. Using the Xlinker -M option, I am able to get a large memory map with a lot of things I don't recognize. I have also tried using the RCC nm utility, which returns a slightly more readable symbol table. I assume that the location given by this utility for, say, printf, is the l...

How do I refer to a global variable in a dynamically linked library?

The environment is Solaris on 32bit SPARC, but I think this is a more general issue with dynamic linking and/or position independent code. I have an assembly program that I compile as position independent code and dynamically link to it from a C program. It works fine, except that I can't refer to any memory reserved by the assembly pro...

64-bit vs. 32-bit performance on SPARC hardware with the 1.6 JVM

I'm doing performance tuning for our Tomcat cluster running on SPARC hardware. The 32-bit JVM gives us sufficient memory for now, but we are going to start using Terracotta for server striping so the extra memory the 64-bit JVM offers could be needed soon. In addition to a bigger memory footprint, moving to the 64-bit JVM on SPARC resul...

SIGALRM while sleeping on Solaris 9

I'm running into a bit of a weird error while running Perl in a chroot environment on Solaris 9 (Sparc). We are using a custom Perl, but it's almost exactly Perl 5.8.7, and this version has been running for years on various platforms including Solaris 8-10. The following code is pretty straightforward: #!/usr/bin/perl use strict; use...

nanoseconds to milliseconds - fast division by 1000000

Hi, 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 with numbers like 1000000? Note: Any code must be portable. I'm using gcc and thi...

Does SPARC v9 have a double word compare and swap instruction?

So; on a 64 bit SPARC CPU which is v9 compliant, there exists I know a cas instruction. This operates on single word length values. I've also seen on the web reference to a casx instruction - but I can't find out anything much more about it. I'm wondering - is this a double word compare and swap? And if not, the general question is; ...

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 definition, show usages), and isn't a pain to use. We've looked at NetBeans, Sun Studio a...

sparc assembly and the %y register

I am currently working with a sparc computer and I am trying to know if a number is prime or not. here is a part of the code : mov 0,%y mov 3, %l1 nop nop nop sdiv %l1,2,%l3 rd %y, %l6 cmp %l6, 0 So basicaly what we have here is 3/2. So there should be a reminder of 1. This r...

Can I run Ubuntu Enterprise Cloud on Sun sparc servers?

I would like to deploy a private cloud using Ubuntu Server 9.10. There is a -sparc iso available here. My question is if any of the cloud packages included in 9.10 will work on sparc hardware? A search for sparc on the Eucalyptus forums yields no results. I realize that "commodity hardware" usually means x86 but sparc boxes are what ...

running sparc solaris dynamic binary on sparc linux

I have dynamic linked binary for SPARC/Solaris and want to start in on SPARC linux. Is it possible? I have sources of the program, but when I compile it with modern GNU Fortran it does not work and do an infinite loop. Program is computation mathematics and I can't solve such loop easy. ...

SUNWspro compiled file - detect verison of compiler

Hello I have a file, compiled by SUNWspro (Sun pro complier) for SPARC/Solaris. How can I detect version of compiler used to build this binary? ...

Unable to Install Sipp in solaris sparc 5.10

I am trying to install SIPp on solaris sparc 5.10. when I am firing a "make" command, it is giving me an error. lake42.rice.iit.edu]/> make make: Fatal error in reader: Makefile, line 22: Unexpected end of line seen I am stuck at this point and not getting any help in web. Can you please help me out so that I can move ahead in installin...

How to avoid insn beeing scheduled into a delay slot

I try to patch gcc so that after a fdivd the destination register is stored to the stack,i.e: fdivd %f0, %f2, %f4; => becomes fdivd %f0, %f2, %f4; std %f4, [%fp+...] I generate the rtl for divdf3 using a (emit_insn,DONE) sequence in a define_expand pattern (see below). In the assembler output phase I use a define_insn and write out "f...

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? ...

How to get high resolution time using sparc assembly ?

I use syscall SYS_time, but its resolution is 1 second. Is there any other solution? ...

Strcpy() corrupts the copied string in Solaris but not Linux

Hi all, I'm writing a C code for a class. This class requires that our code compile and run on the school server, which is a sparc solaris machine. I'm running Linux x64. I have this line to parse (THIS IS NOT ACTUAL CODE BUT IS INPUT TO MY PROGRAM): while ( cond1 ){ I need to capture the "while" and the "cond1" into separate strin...