Revision 651721b2 target-ppc/op_helper.c
b/target-ppc/op_helper.c | ||
---|---|---|
54 | 54 |
} |
55 | 55 |
|
56 | 56 |
/*****************************************************************************/ |
57 |
/* Registers load and stores */ |
|
58 |
target_ulong helper_load_cr (void) |
|
59 |
{ |
|
60 |
return (env->crf[0] << 28) | |
|
61 |
(env->crf[1] << 24) | |
|
62 |
(env->crf[2] << 20) | |
|
63 |
(env->crf[3] << 16) | |
|
64 |
(env->crf[4] << 12) | |
|
65 |
(env->crf[5] << 8) | |
|
66 |
(env->crf[6] << 4) | |
|
67 |
(env->crf[7] << 0); |
|
68 |
} |
|
69 |
|
|
70 |
void helper_store_cr (target_ulong val, uint32_t mask) |
|
71 |
{ |
|
72 |
int i, sh; |
|
73 |
|
|
74 |
for (i = 0, sh = 7; i < 8; i++, sh--) { |
|
75 |
if (mask & (1 << sh)) |
|
76 |
env->crf[i] = (val >> (sh * 4)) & 0xFUL; |
|
77 |
} |
|
78 |
} |
|
79 |
|
|
80 |
/*****************************************************************************/ |
|
81 | 57 |
/* SPR accesses */ |
82 | 58 |
void helper_load_dump_spr (uint32_t sprn) |
83 | 59 |
{ |
Also available in: Unified diff