1 | --- ../gcc-4.0.3/gcc/config/rs6000/darwin-fallback.c.orig 2007-11-11 10:46:12.000000000 +0900 |
---|
2 | +++ ../gcc-4.0.3/gcc/config/rs6000/darwin-fallback.c 2007-11-11 11:25:18.000000000 +0900 |
---|
3 | @@ -261,9 +261,9 @@ |
---|
4 | }; |
---|
5 | |
---|
6 | #define UC_FLAVOR_SIZE \ |
---|
7 | - (sizeof (struct mcontext) - sizeof (ppc_vector_state_t)) |
---|
8 | + (sizeof (struct __darwin_mcontext) - sizeof (ppc_vector_state_t)) |
---|
9 | |
---|
10 | -#define UC_FLAVOR_VEC_SIZE (sizeof (struct mcontext)) |
---|
11 | +#define UC_FLAVOR_VEC_SIZE (sizeof (struct __darwin_mcontext)) |
---|
12 | |
---|
13 | #define UC_FLAVOR64_SIZE \ |
---|
14 | (sizeof (struct gcc_mcontext64) - sizeof (ppc_vector_state_t)) |
---|
15 | @@ -354,33 +354,33 @@ |
---|
16 | } |
---|
17 | else |
---|
18 | { |
---|
19 | - struct mcontext *m = uctx->uc_mcontext; |
---|
20 | + struct __darwin_mcontext *m = (struct __darwin_mcontext *)uctx->uc_mcontext; |
---|
21 | int i; |
---|
22 | |
---|
23 | - float_state = &m->fs; |
---|
24 | - vector_state = &m->vs; |
---|
25 | + float_state = &m->__fs; |
---|
26 | + vector_state = &m->__vs; |
---|
27 | |
---|
28 | - new_cfa = m->ss.r1; |
---|
29 | + new_cfa = m->__ss.__r1; |
---|
30 | |
---|
31 | - set_offset (CR2_REGNO, &m->ss.cr); |
---|
32 | + set_offset (CR2_REGNO, &m->__ss.__cr); |
---|
33 | for (i = 0; i < 32; i++) |
---|
34 | - set_offset (i, &m->ss.r0 + i); |
---|
35 | - set_offset (XER_REGNO, &m->ss.xer); |
---|
36 | - set_offset (LINK_REGISTER_REGNUM, &m->ss.lr); |
---|
37 | - set_offset (COUNT_REGISTER_REGNUM, &m->ss.ctr); |
---|
38 | + set_offset (i, &m->__ss.__r0 + i); |
---|
39 | + set_offset (XER_REGNO, &m->__ss.__xer); |
---|
40 | + set_offset (LINK_REGISTER_REGNUM, &m->__ss.__lr); |
---|
41 | + set_offset (COUNT_REGISTER_REGNUM, &m->__ss.__ctr); |
---|
42 | |
---|
43 | if (is_vector) |
---|
44 | - set_offset (VRSAVE_REGNO, &m->ss.vrsave); |
---|
45 | + set_offset (VRSAVE_REGNO, &m->__ss.__vrsave); |
---|
46 | |
---|
47 | /* Sometimes, srr0 points to the instruction that caused the exception, |
---|
48 | and sometimes to the next instruction to be executed; we want |
---|
49 | the latter. */ |
---|
50 | - if (m->es.exception == 3 || m->es.exception == 4 |
---|
51 | - || m->es.exception == 6 |
---|
52 | - || (m->es.exception == 7 && !(m->ss.srr1 & 0x10000))) |
---|
53 | - return_addr = m->ss.srr0 + 4; |
---|
54 | + if (m->__es.__exception == 3 || m->__es.__exception == 4 |
---|
55 | + || m->__es.__exception == 6 |
---|
56 | + || (m->__es.__exception == 7 && !(m->__ss.__srr1 & 0x10000))) |
---|
57 | + return_addr = m->__ss.__srr0 + 4; |
---|
58 | else |
---|
59 | - return_addr = m->ss.srr0; |
---|
60 | + return_addr = m->__ss.__srr0; |
---|
61 | } |
---|
62 | |
---|
63 | fs->cfa_how = CFA_REG_OFFSET; |
---|
64 | @@ -399,14 +399,14 @@ |
---|
65 | set_offset (ARG_POINTER_REGNUM, &return_addr); |
---|
66 | |
---|
67 | for (i = 0; i < 32; i++) |
---|
68 | - set_offset (32 + i, float_state->fpregs + i); |
---|
69 | - set_offset (SPEFSCR_REGNO, &float_state->fpscr); |
---|
70 | + set_offset (32 + i, float_state->__fpregs + i); |
---|
71 | + set_offset (SPEFSCR_REGNO, &float_state->__fpscr); |
---|
72 | |
---|
73 | if (is_vector) |
---|
74 | { |
---|
75 | for (i = 0; i < 32; i++) |
---|
76 | - set_offset (FIRST_ALTIVEC_REGNO + i, vector_state->save_vr + i); |
---|
77 | - set_offset (VSCR_REGNO, vector_state->save_vscr); |
---|
78 | + set_offset (FIRST_ALTIVEC_REGNO + i, vector_state->__save_vr + i); |
---|
79 | + set_offset (VSCR_REGNO, vector_state->__save_vscr); |
---|
80 | } |
---|
81 | |
---|
82 | return true; |
---|