summaryrefslogtreecommitdiff
path: root/src/pkg/runtime/windows/386/defs.h
blob: a2a882103462b7cb6d50185e12ce1f2bfaa9504d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
// c:\Users\Hector\Code\go\bin\godefs.exe defs.c

// MACHINE GENERATED - DO NOT EDIT.

// Constants
enum {
	PROT_NONE = 0,
	PROT_READ = 0x1,
	PROT_WRITE = 0x2,
	PROT_EXEC = 0x4,
	MAP_ANON = 0x1,
	MAP_PRIVATE = 0x2,
	EXCEPTION_ACCESS_VIOLATION = 0xc0000005,
	EXCEPTION_BREAKPOINT = 0x80000003,
	EXCEPTION_FLT_DENORMAL_OPERAND = 0xc000008d,
	EXCEPTION_FLT_DIVIDE_BY_ZERO = 0xc000008e,
	EXCEPTION_FLT_INEXACT_RESULT = 0xc000008f,
	EXCEPTION_FLT_OVERFLOW = 0xc0000091,
	EXCEPTION_FLT_UNDERFLOW = 0xc0000093,
	EXCEPTION_INT_DIVIDE_BY_ZERO = 0xc0000094,
	EXCEPTION_INT_OVERFLOW = 0xc0000095,
};

// Types
#pragma pack on

typedef struct ExceptionRecord ExceptionRecord;
struct ExceptionRecord {
	uint32 ExceptionCode;
	uint32 ExceptionFlags;
	ExceptionRecord *ExceptionRecord;
	void *ExceptionAddress;
	uint32 NumberParameters;
	uint32 ExceptionInformation[15];
};

typedef struct FloatingSaveArea FloatingSaveArea;
struct FloatingSaveArea {
	uint32 ControlWord;
	uint32 StatusWord;
	uint32 TagWord;
	uint32 ErrorOffset;
	uint32 ErrorSelector;
	uint32 DataOffset;
	uint32 DataSelector;
	uint8 RegisterArea[80];
	uint32 Cr0NpxState;
};

typedef struct Context Context;
struct Context {
	uint32 ContextFlags;
	uint32 Dr0;
	uint32 Dr1;
	uint32 Dr2;
	uint32 Dr3;
	uint32 Dr6;
	uint32 Dr7;
	FloatingSaveArea FloatSave;
	uint32 SegGs;
	uint32 SegFs;
	uint32 SegEs;
	uint32 SegDs;
	uint32 Edi;
	uint32 Esi;
	uint32 Ebx;
	uint32 Edx;
	uint32 Ecx;
	uint32 Eax;
	uint32 Ebp;
	uint32 Eip;
	uint32 SegCs;
	uint32 EFlags;
	uint32 Esp;
	uint32 SegSs;
	uint8 ExtendedRegisters[512];
};
#pragma pack off