Re: [Gems-users] Using Magic Instruction on sparc64-linux


Date: Sun, 19 Mar 2006 10:51:54 -0600
From: Alaa Alameldeen <alaa@xxxxxxxxxxx>
Subject: Re: [Gems-users] Using Magic Instruction on sparc64-linux
It would probably be better if you send this question to the Simics forum. The magic breakpoint "should" stop the simulation when your code gets there.

-Alaa

Gene Michael Kishinevsky wrote:
Hi all,

We've tried using the magic instruction today on our simulated system with
no success. We're using the bagle system provided by Simics, which is a sun
sparc64 machine with linux on it. I used the magic-breakpoint-enable command
in Simics and then ran my simple program on the simulated machine. However,
we never got the simulation to stop. We tried changing the instructions
around and even using the magic-instruction.h library definition instead of
our own. When using the library we got an "unsupported architecture" error
from the following section of code in the magic library.

#else  /* !__sparc && !__i386 && !__powerpc__ */
#error "Unsupported architecture"
#endif /* !__sparc && !__i386 && !__powerpc__ */

I've included our test program below. If anyone has any suggestions we'd be
very grateful.

Thanks a lot.

-Gene


#include <stdio.h>
//#include "magic-instruction.h"

#define MAGIC_INSTRUCTION do {    \
   __asm__ __volatile__ ("sethi 0, %g0");  \
} while (0)

main() {
  printf("Hello world.");
  MAGIC_INSTRUCTION;
  printf("After magic I should have stoppped!");
}

_______________________________________________
Gems-users mailing list
Gems-users@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/gems-users
[← Prev in Thread] Current Thread [Next in Thread→]