Revision 762abf67
/dev/null | ||
---|---|---|
1 |
/* |
|
2 |
SPARC micro operations |
|
3 |
|
|
4 |
Copyright (C) 2003 Thomas M. Ogrisegg <tom@fnord.at> |
|
5 |
|
|
6 |
This library is free software; you can redistribute it and/or |
|
7 |
modify it under the terms of the GNU Lesser General Public |
|
8 |
License as published by the Free Software Foundation; either |
|
9 |
version 2 of the License, or (at your option) any later version. |
|
10 |
|
|
11 |
This library is distributed in the hope that it will be useful, |
|
12 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
13 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
14 |
Lesser General Public License for more details. |
|
15 |
|
|
16 |
You should have received a copy of the GNU Lesser General Public |
|
17 |
License along with this library; if not, write to the Free Software |
|
18 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
19 |
*/ |
|
20 |
|
|
21 |
#include "exec.h" |
|
22 |
#include "helper.h" |
|
23 |
|
|
24 |
/* Load and store */ |
|
25 |
#define MEMSUFFIX _raw |
|
26 |
#include "op_mem.h" |
|
27 |
#if !defined(CONFIG_USER_ONLY) |
|
28 |
#define MEMSUFFIX _user |
|
29 |
#include "op_mem.h" |
|
30 |
|
|
31 |
#define MEMSUFFIX _kernel |
|
32 |
#include "op_mem.h" |
|
33 |
|
|
34 |
#ifdef TARGET_SPARC64 |
|
35 |
#define MEMSUFFIX _hypv |
|
36 |
#include "op_mem.h" |
|
37 |
#endif |
|
38 |
#endif |
/dev/null | ||
---|---|---|
1 |
#ifdef TARGET_ABI32 |
|
2 |
#define ADDR(x) ((x) & 0xffffffff) |
|
3 |
#else |
|
4 |
#define ADDR(x) (x) |
|
5 |
#endif |
|
6 |
|
|
7 |
#ifdef __i386__ |
|
8 |
/*** Integer store ***/ |
|
9 |
void OPPROTO glue(op_std, MEMSUFFIX)(void) |
|
10 |
{ |
|
11 |
uint64_t tmp = ((uint64_t)T1 << 32) | (uint64_t)(T2 & 0xffffffff); |
|
12 |
|
|
13 |
glue(stq, MEMSUFFIX)(ADDR(T0), tmp); |
|
14 |
} |
|
15 |
|
|
16 |
#endif /* __i386__ */ |
|
17 |
/*** Floating-point store ***/ |
|
18 |
void OPPROTO glue(op_stdf, MEMSUFFIX) (void) |
|
19 |
{ |
|
20 |
glue(stfq, MEMSUFFIX)(ADDR(T0), DT0); |
|
21 |
} |
|
22 |
|
|
23 |
/*** Floating-point load ***/ |
|
24 |
void OPPROTO glue(op_lddf, MEMSUFFIX) (void) |
|
25 |
{ |
|
26 |
DT0 = glue(ldfq, MEMSUFFIX)(ADDR(T0)); |
|
27 |
} |
|
28 |
|
|
29 |
#if defined(CONFIG_USER_ONLY) |
|
30 |
void OPPROTO glue(op_ldqf, MEMSUFFIX) (void) |
|
31 |
{ |
|
32 |
// XXX add 128 bit load |
|
33 |
CPU_QuadU u; |
|
34 |
|
|
35 |
u.ll.upper = glue(ldq, MEMSUFFIX)(ADDR(T0)); |
|
36 |
u.ll.lower = glue(ldq, MEMSUFFIX)(ADDR(T0 + 8)); |
|
37 |
QT0 = u.q; |
|
38 |
} |
|
39 |
|
|
40 |
void OPPROTO glue(op_stqf, MEMSUFFIX) (void) |
|
41 |
{ |
|
42 |
// XXX add 128 bit store |
|
43 |
CPU_QuadU u; |
|
44 |
|
|
45 |
u.q = QT0; |
|
46 |
glue(stq, MEMSUFFIX)(ADDR(T0), u.ll.upper); |
|
47 |
glue(stq, MEMSUFFIX)(ADDR(T0 + 8), u.ll.lower); |
|
48 |
} |
|
49 |
#endif |
|
50 |
|
|
51 |
#undef MEMSUFFIX |
Also available in: Unified diff