sig_cpu.inc 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. {
  2. This file is part of the Free Pascal run time library.
  3. Copyright (c) 2019 the Free Pascal development team.
  4. i386 specific signal handler structure
  5. See the file COPYING.FPC, included in this distribution,
  6. for details about the copyright.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. **********************************************************************}
  11. {*
  12. * Architecture-specific structure passed to signal handlers
  13. *}
  14. {$PACKRECORDS C}
  15. type
  16. packed_fp_stack = record
  17. st0 : array[0..9] of byte;
  18. st1 : array[0..9] of byte;
  19. st2 : array[0..9] of byte;
  20. st3 : array[0..9] of byte;
  21. st4 : array[0..9] of byte;
  22. st5 : array[0..9] of byte;
  23. st6 : array[0..9] of byte;
  24. st7 : array[0..9] of byte;
  25. end;
  26. packed_mmx_regs = record
  27. mm0 : array[0..9] of byte;
  28. mm1 : array[0..9] of byte;
  29. mm2 : array[0..9] of byte;
  30. mm3 : array[0..9] of byte;
  31. mm4 : array[0..9] of byte;
  32. mm5 : array[0..9] of byte;
  33. mm6 : array[0..9] of byte;
  34. mm7 : array[0..9] of byte;
  35. end;
  36. old_extended_regs = record
  37. fp_control: word;
  38. _reserved1: word;
  39. fp_status: word;
  40. _reserved2: word;
  41. fp_tag: word;
  42. _reserved3: word;
  43. fp_eip: cardinal;
  44. fp_cs: word;
  45. fp_opcode: word;
  46. fp_datap: dword;
  47. fp_ds: word;
  48. _reserved4: word;
  49. fp_mmx : record
  50. case fp_mmx : byte of
  51. 0 : (fp: packed_fp_stack);
  52. 1 : (mmx: packed_mmx_regs);
  53. end;
  54. end;
  55. fp_stack = record
  56. st0 : array[0..9] of byte;
  57. _reserved_42_47 : array[0..5] of byte;
  58. st1 : array[0..9] of byte;
  59. _reserved_58_63 : array[0..5] of byte;
  60. st2 : array[0..9] of byte;
  61. _reserved_74_79 : array[0..5] of byte;
  62. st3 : array[0..9] of byte;
  63. _reserved_90_95 : array[0..5] of byte;
  64. st4 : array[0..9] of byte;
  65. _reserved_106_111 : array[0..5] of byte;
  66. st5 : array[0..9] of byte;
  67. _reserved_122_127 : array[0..5] of byte;
  68. st6 : array[0..9] of byte;
  69. _reserved_138_143 : array[0..5] of byte;
  70. st7 : array[0..9] of byte;
  71. _reserved_154_159 : array[0..5] of byte;
  72. end;
  73. mmx_regs = record
  74. mm0 : array[0..9] of byte;
  75. _reserved_42_47 : array[0..5] of byte;
  76. mm1 : array[0..9] of byte;
  77. _reserved_58_63 : array[0..5] of byte;
  78. mm2 : array[0..9] of byte;
  79. _reserved_74_79 : array[0..5] of byte;
  80. mm3 : array[0..9] of byte;
  81. _reserved_90_95 : array[0..5] of byte;
  82. mm4 : array[0..9] of byte;
  83. _reserved_106_111 : array[0..5] of byte;
  84. mm5 : array[0..9] of byte;
  85. _reserved_122_127 : array[0..5] of byte;
  86. mm6 : array[0..9] of byte;
  87. _reserved_138_143 : array[0..5] of byte;
  88. mm7 : array[0..9] of byte;
  89. _reserved_154_159 : array[0..5] of byte;
  90. end;
  91. xmmx_regs = record
  92. xmm0 : array [0..15] of byte;
  93. xmm1 : array [0..15] of byte;
  94. xmm2 : array [0..15] of byte;
  95. xmm3 : array [0..15] of byte;
  96. xmm4 : array [0..15] of byte;
  97. xmm5 : array [0..15] of byte;
  98. xmm6 : array [0..15] of byte;
  99. xmm7 : array [0..15] of byte;
  100. end;
  101. new_extended_regs = record
  102. fp_control: word;
  103. fp_status: word;
  104. fp_tag: word;
  105. fp_opcode: word;
  106. fp_eip: dword;
  107. fp_cs: word;
  108. res_14_15: word;
  109. fp_datap: dword;
  110. fp_ds: word;
  111. _reserved_22_23: word;
  112. mxcsr: dword;
  113. _reserved_28_31: dword;
  114. fp_mmx : record
  115. case byte of
  116. 0 : (fp : fp_stack);
  117. 1 : (mmx : mmx_regs);
  118. end;
  119. xmmx: xmmx_regs;
  120. _reserved_288_511 : array[0..223] of byte;
  121. end;
  122. extended_regs = record
  123. state : record
  124. case byte of
  125. 0 : (old_format : old_extended_regs);
  126. 1 : (new_format : new_extended_regs);
  127. end;
  128. format: dword;
  129. end;
  130. vregs = record
  131. eip: dword;
  132. eflags: dword;
  133. eax: dword;
  134. ecx: dword;
  135. edx: dword;
  136. esp: dword;
  137. ebp: dword;
  138. _reserved_1: dword;
  139. xregs: extended_regs;
  140. edi: dword;
  141. esi: dword;
  142. ebx: dword;
  143. end;