mk_ptregs-x86_64.c 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /*
  2. * Copyright 2003 PathScale, Inc.
  3. *
  4. * Licensed under the GPL
  5. */
  6. #include <stdio.h>
  7. #include <user-offsets.h>
  8. #define SHOW(name) \
  9. printf("#define %s (%d / sizeof(unsigned long))\n", #name, name)
  10. int main(int argc, char **argv)
  11. {
  12. printf("/* Automatically generated by "
  13. "arch/um/kernel/skas/util/mk_ptregs */\n");
  14. printf("\n");
  15. printf("#ifndef __SKAS_PT_REGS_\n");
  16. printf("#define __SKAS_PT_REGS_\n");
  17. SHOW(HOST_FRAME_SIZE);
  18. SHOW(HOST_RBX);
  19. SHOW(HOST_RCX);
  20. SHOW(HOST_RDI);
  21. SHOW(HOST_RSI);
  22. SHOW(HOST_RDX);
  23. SHOW(HOST_RBP);
  24. SHOW(HOST_RAX);
  25. SHOW(HOST_R8);
  26. SHOW(HOST_R9);
  27. SHOW(HOST_R10);
  28. SHOW(HOST_R11);
  29. SHOW(HOST_R12);
  30. SHOW(HOST_R13);
  31. SHOW(HOST_R14);
  32. SHOW(HOST_R15);
  33. SHOW(HOST_ORIG_RAX);
  34. SHOW(HOST_CS);
  35. SHOW(HOST_SS);
  36. SHOW(HOST_EFLAGS);
  37. #if 0
  38. SHOW(HOST_FS);
  39. SHOW(HOST_GS);
  40. SHOW(HOST_DS);
  41. SHOW(HOST_ES);
  42. #endif
  43. SHOW(HOST_IP);
  44. SHOW(HOST_SP);
  45. printf("#define HOST_FP_SIZE 0\n");
  46. printf("#define HOST_XFP_SIZE 0\n");
  47. printf("\n");
  48. printf("\n");
  49. printf("#endif\n");
  50. return(0);
  51. }
  52. /*
  53. * Overrides for Emacs so that we follow Linus's tabbing style.
  54. * Emacs will notice this stuff at the end of the file and automatically
  55. * adjust the settings for this buffer only. This must remain at the end
  56. * of the file.
  57. * ---------------------------------------------------------------------------
  58. * Local variables:
  59. * c-file-style: "linux"
  60. * End:
  61. */