root / target-s390x / translate.c @ a88790a1
History | View | Annotate | Download (1.8 kB)
1 | 10ec5117 | Alexander Graf | /*
|
---|---|---|---|
2 | 10ec5117 | Alexander Graf | * S/390 translation
|
3 | 10ec5117 | Alexander Graf | *
|
4 | 10ec5117 | Alexander Graf | * Copyright (c) 2009 Ulrich Hecht
|
5 | 10ec5117 | Alexander Graf | *
|
6 | 10ec5117 | Alexander Graf | * This library is free software; you can redistribute it and/or
|
7 | 10ec5117 | Alexander Graf | * modify it under the terms of the GNU Lesser General Public
|
8 | 10ec5117 | Alexander Graf | * License as published by the Free Software Foundation; either
|
9 | 10ec5117 | Alexander Graf | * version 2 of the License, or (at your option) any later version.
|
10 | 10ec5117 | Alexander Graf | *
|
11 | 10ec5117 | Alexander Graf | * This library is distributed in the hope that it will be useful,
|
12 | 10ec5117 | Alexander Graf | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 | 10ec5117 | Alexander Graf | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14 | 10ec5117 | Alexander Graf | * Lesser General Public License for more details.
|
15 | 10ec5117 | Alexander Graf | *
|
16 | 10ec5117 | Alexander Graf | * You should have received a copy of the GNU Lesser General Public
|
17 | 70539e18 | Blue Swirl | * License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
18 | 10ec5117 | Alexander Graf | */
|
19 | 10ec5117 | Alexander Graf | |
20 | 10ec5117 | Alexander Graf | #include "cpu.h" |
21 | 10ec5117 | Alexander Graf | #include "exec-all.h" |
22 | 10ec5117 | Alexander Graf | #include "disas.h" |
23 | 10ec5117 | Alexander Graf | #include "tcg-op.h" |
24 | 10ec5117 | Alexander Graf | #include "qemu-log.h" |
25 | 10ec5117 | Alexander Graf | |
26 | 10ec5117 | Alexander Graf | void cpu_dump_state(CPUState *env, FILE *f,
|
27 | 10ec5117 | Alexander Graf | int (*cpu_fprintf)(FILE *f, const char *fmt, ...), |
28 | 10ec5117 | Alexander Graf | int flags)
|
29 | 10ec5117 | Alexander Graf | { |
30 | 10ec5117 | Alexander Graf | int i;
|
31 | 10ec5117 | Alexander Graf | for (i = 0; i < 16; i++) { |
32 | 10ec5117 | Alexander Graf | cpu_fprintf(f, "R%02d=%016lx", i, env->regs[i]);
|
33 | 10ec5117 | Alexander Graf | if ((i % 4) == 3) { |
34 | 10ec5117 | Alexander Graf | cpu_fprintf(f, "\n");
|
35 | 10ec5117 | Alexander Graf | } else {
|
36 | 10ec5117 | Alexander Graf | cpu_fprintf(f, " ");
|
37 | 10ec5117 | Alexander Graf | } |
38 | 10ec5117 | Alexander Graf | } |
39 | 10ec5117 | Alexander Graf | for (i = 0; i < 16; i++) { |
40 | 10ec5117 | Alexander Graf | cpu_fprintf(f, "F%02d=%016lx", i, env->fregs[i]);
|
41 | 10ec5117 | Alexander Graf | if ((i % 4) == 3) { |
42 | 10ec5117 | Alexander Graf | cpu_fprintf(f, "\n");
|
43 | 10ec5117 | Alexander Graf | } else {
|
44 | 10ec5117 | Alexander Graf | cpu_fprintf(f, " ");
|
45 | 10ec5117 | Alexander Graf | } |
46 | 10ec5117 | Alexander Graf | } |
47 | 10ec5117 | Alexander Graf | cpu_fprintf(f, "PSW=mask %016lx addr %016lx cc %02x\n", env->psw.mask, env->psw.addr, env->cc);
|
48 | 10ec5117 | Alexander Graf | } |
49 | 10ec5117 | Alexander Graf | |
50 | 10ec5117 | Alexander Graf | void gen_intermediate_code (CPUState *env, struct TranslationBlock *tb) |
51 | 10ec5117 | Alexander Graf | { |
52 | 10ec5117 | Alexander Graf | } |
53 | 10ec5117 | Alexander Graf | |
54 | 10ec5117 | Alexander Graf | void gen_intermediate_code_pc (CPUState *env, struct TranslationBlock *tb) |
55 | 10ec5117 | Alexander Graf | { |
56 | 10ec5117 | Alexander Graf | } |
57 | 10ec5117 | Alexander Graf | |
58 | 10ec5117 | Alexander Graf | void gen_pc_load(CPUState *env, TranslationBlock *tb,
|
59 | 10ec5117 | Alexander Graf | unsigned long searched_pc, int pc_pos, void *puc) |
60 | 10ec5117 | Alexander Graf | { |
61 | 10ec5117 | Alexander Graf | env->psw.addr = gen_opc_pc[pc_pos]; |
62 | 10ec5117 | Alexander Graf | } |