6bae32d395
Ditto for mk_sc Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
47 lines
917 B
C
47 lines
917 B
C
/* Copyright (C) 2003 - 2004 PathScale, Inc
|
|
* Released under the GPL
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include <user-offsets.h>
|
|
|
|
#define SC_OFFSET(name) \
|
|
printf("#define " #name \
|
|
"(sc) *((unsigned long *) &(((char *) (sc))[%d]))\n",\
|
|
name)
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
SC_OFFSET(SC_RBX);
|
|
SC_OFFSET(SC_RCX);
|
|
SC_OFFSET(SC_RDX);
|
|
SC_OFFSET(SC_RSI);
|
|
SC_OFFSET(SC_RDI);
|
|
SC_OFFSET(SC_RBP);
|
|
SC_OFFSET(SC_RAX);
|
|
SC_OFFSET(SC_R8);
|
|
SC_OFFSET(SC_R9);
|
|
SC_OFFSET(SC_R10);
|
|
SC_OFFSET(SC_R11);
|
|
SC_OFFSET(SC_R12);
|
|
SC_OFFSET(SC_R13);
|
|
SC_OFFSET(SC_R14);
|
|
SC_OFFSET(SC_R15);
|
|
SC_OFFSET(SC_IP);
|
|
SC_OFFSET(SC_SP);
|
|
SC_OFFSET(SC_CR2);
|
|
SC_OFFSET(SC_ERR);
|
|
SC_OFFSET(SC_TRAPNO);
|
|
SC_OFFSET(SC_CS);
|
|
SC_OFFSET(SC_FS);
|
|
SC_OFFSET(SC_GS);
|
|
SC_OFFSET(SC_EFLAGS);
|
|
SC_OFFSET(SC_SIGMASK);
|
|
#if 0
|
|
SC_OFFSET(SC_ORIG_RAX);
|
|
SC_OFFSET(SC_DS);
|
|
SC_OFFSET(SC_ES);
|
|
SC_OFFSET(SC_SS);
|
|
#endif
|
|
return(0);
|
|
}
|