summaryrefslogtreecommitdiff
path: root/java/cacao/files/patch-src-vm-jit-x86_64-md.c
blob: e2e01941c4c431fdde06241431d732f52890a11a (plain) (blame)
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
--- src/vm/jit/x86_64/md.c.orig	Sun Feb  4 15:42:05 2007
+++ src/vm/jit/x86_64/md.c	Sun Feb  4 15:45:32 2007
@@ -91,8 +91,8 @@
 	/* ATTENTION: Don't use CACAO's internal REG_* defines as they are
 	   different to the ones in <ucontext.h>. */
 
-	sp  = (u1 *) _mc->gregs[REG_RSP];
-	xpc = (u1 *) _mc->gregs[REG_RIP];
+	sp  = (u1 *) _mc->mc_rsp;
+	xpc = (u1 *) _mc->mc_rip;
 	ra  = xpc;                          /* return address is equal to xpc     */
 
 #if 0
@@ -101,11 +101,11 @@
 	threads_check_stackoverflow(sp);
 #endif
 
-	_mc->gregs[REG_RAX] =
+	_mc->mc_rax =
 		(ptrint) stacktrace_hardware_nullpointerexception(NULL, sp, ra, xpc);
 
-	_mc->gregs[REG_R10] = (ptrint) xpc;                      /* REG_ITMP2_XPC */
-	_mc->gregs[REG_RIP] = (ptrint) asm_handle_exception;
+	_mc->mc_r10 = (ptrint) xpc;                      /* REG_ITMP2_XPC */
+	_mc->mc_rip = (ptrint) asm_handle_exception;
 }
 
 
@@ -130,15 +130,15 @@
 	/* ATTENTION: Don't use CACAO's internal REG_* defines as they are
 	   different to the ones in <ucontext.h>. */
 
-	sp  = (u1 *) _mc->gregs[REG_RSP];
-	xpc = (u1 *) _mc->gregs[REG_RIP];
+	sp  = (u1 *) _mc->mc_rsp;
+	xpc = (u1 *) _mc->mc_rip;
 	ra  = xpc;                          /* return address is equal to xpc     */
 
-	_mc->gregs[REG_RAX] =
+	_mc->mc_rax =
 		(ptrint) stacktrace_hardware_arithmeticexception(NULL, sp, ra, xpc);
 
-	_mc->gregs[REG_R10] = (ptrint) xpc;                      /* REG_ITMP2_XPC */
-	_mc->gregs[REG_RIP] = (ptrint) asm_handle_exception;
+	_mc->mc_r10 = (ptrint) xpc;                      /* REG_ITMP2_XPC */
+	_mc->mc_rip = (ptrint) asm_handle_exception;
 }
 
 
@@ -164,7 +164,7 @@
 	/* ATTENTION: Don't use CACAO's internal REG_* defines as they are
 	   different to the ones in <ucontext.h>. */
 
-	pc = (u1 *) _mc->gregs[REG_RIP];
+	pc = (u1 *) _mc->mc_rip;
 
 	t->pc = pc;
 }
@@ -179,10 +179,10 @@
 
 	_mc = &_uc->uc_mcontext;
 
-	pc = critical_find_restart_point((void *) _mc->gregs[REG_RIP]);
+	pc = critical_find_restart_point((void *) _mc->mc_rip);
 
 	if (pc != NULL)
-		_mc->gregs[REG_RIP] = (ptrint) pc;
+		_mc->mc_rip = (ptrint) pc;
 }
 #endif