sparc

using a trap to output characters in assembly using SPARC instruction set

 ̄綄美尐妖づ 提交于 2020-08-26 08:27:15
问题 My assignment is as follows: Given the assembly code below, write a successfully executing trap that prints out the message “It’s a Trap” and returns to your main code. I believe most of the work has already been done and this is likely an easy question but I'm working without any knowledge of assembly so I'm still very much in need of some help. I understand the concept of traps but not the syntax so what I'm really wondering is what kind of answer the question is looking for. The part

using a trap to output characters in assembly using SPARC instruction set

生来就可爱ヽ(ⅴ<●) 提交于 2020-08-26 08:27:14
问题 My assignment is as follows: Given the assembly code below, write a successfully executing trap that prints out the message “It’s a Trap” and returns to your main code. I believe most of the work has already been done and this is likely an easy question but I'm working without any knowledge of assembly so I'm still very much in need of some help. I understand the concept of traps but not the syntax so what I'm really wondering is what kind of answer the question is looking for. The part

undefined reference to `__sync_val_compare_and_swap_4' error at compilation, using gcc 4.1.1 and 4.2.0 for Sparc v8 target

我的梦境 提交于 2020-01-09 11:42:46
问题 Using crosstool scripts i've built under Cygwin the following compilers gcc-4.1.1 and 4.2.0 20061024 (prerelease) for Sparc architecture: $ ./sparc-unknown-linux-gnu-gcc -v Using built-in specs. Target: sparc-unknown-linux-gnu Configured with: /crosstool-0.43/build/sparc-unknown-linux-gnu/gcc-4.1.1-glibc-2.3.6/gcc-4.1.1/configure --target=sparc-unknown-linux-gnu --host=i686-host_pc-cygwin --prefix=/opt/crosstool/gcc-4.1.1-glibc-2.3.6/sparc-unknown-linux-gnu --with-headers=/opt/crosstool/gcc-4

Simple assembly example : set inputs and get output - right syntax

安稳与你 提交于 2020-01-07 04:47:08
问题 I try to do a simple example to insert, into a C code, a piece of Sparc assembly 32 bits; this little code performs an incrementation on the variable "sum". The code is : #include <stdio.h> #include <sys/time.h> #include <unistd.h> int n; int sum; int main () { n = 100; sum = 0; struct timeval tv1, tv2; long long diff; gettimeofday (&tv1, NULL); asm volatile ("set sum, %g1\n\t" \ "set n, %g3\n" \ "loop:\n\t" \ "add %g1, 1, %g2\n\t" \ "sub %g3, 1, %g4\n\t" \ "bne loop\n\t" \ "nop\n\t" \ : "=r"

no build set file found 4.11/rtems-sparc on rtems (VB)

余生长醉 提交于 2019-12-24 19:08:41
问题 . ~/rtems-4.11-work/setenv cd /home/rtems/rtems-source-builder/rtems ../source-builder/sb-set-builder \ --log=1-sparc.txt \ --prefix=${HOME}/rtems-4.11-work/tools 4.11/rtems-sparc I did all steps well.Lastly I am trying to install sparc tools ,but when I try to do this commend line, it return to me "Rtems Source Builder - Set Builder, 5 (35c533f545c8) Build set: 4.11/rtems-sparc error: no build set file found: 4.11/rtems-sparc.bset Build FAILED" I am vorking RTEMS on VirtualBox Does anyone

Can Solaris x86 run old applications that were compiled for Solaris Sparc?

二次信任 提交于 2019-12-24 14:39:52
问题 Is the x86 edition able to run old apps? Does it take care of all endianness stuff? Please don't send me to Google :) I honestly tried and was not able to find a solid answer with some references. 回答1: No, you can't. You must use an emulator like QuickTransit to do that You can find more information on Google with the appropriate keywords Running Solaris Sparc Apps on X86 Solaris Runing Solaris SPARC software on x86-64 Transitive Translates SPARC Solaris Apps on Windows Solaris SPARC to x86

SIGALRM while sleeping on Solaris 9

a 夏天 提交于 2019-12-23 21:43:50
问题 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 warnings; print "About to sleep(1)\n"; sleep 1; print "Just woke up!\n"; However, if I run that, "Just woke up!" never gets printed - instead, the program ends

Export an application using Sparc architecture to intel x86

拈花ヽ惹草 提交于 2019-12-22 01:34:22
问题 I'm using an application developed in Sun Solaris 8 and it depends of the architecture SPARC ( the application using some librairies of the system Solaris 8) . Is it possible to export that application from SPARC to intel x86 ? Can i export also in another OS like Ubuntu, Windows or other ? I hope that was clear and if you need more information i'll try to clarify. Thanks. 回答1: I'm assuming we're talking about a native application here (a machine code binary). Short answer: No to both

GCC Inline Assembly for Sparc architecture

折月煮酒 提交于 2019-12-20 03:54:08
问题 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 *ptr, unsigned long old, unsigned long new, int size) { unsigned long prev; switch (size) { case 1: __asm__ __volatile__(LOCK_PREFIX "cmpxchgb %b1,%2" : "=a"(prev) : "q"(new), "m"(*__xg(ptr)), "0"(old) : "memory"); return prev; case 2: __asm__ _

Why the %r0 of SPARC or MIPS, is always 0?

半世苍凉 提交于 2019-12-19 04:01:16
问题 I know that when you read %r0 in SPARC CPU (and MIPS), always return 0, but I like to know Why ? What design decision is behind this and why ? 回答1: It's just the way the CPU was designed. Ensuring that r0 is always set to zero is, for one thing, a way to avoid potentially costly memory accesses for a very common value. On one hand (reading), it's handy to have a register set aside to contain the value of zero so that you can use it. Otherwise, you would have to load zero into a register