Statistics
| Branch: | Revision:

root / tcg / s390 / tcg-target.c @ 932234f6

History | View | Annotate | Download (2.9 kB)

1 2827822e Alexander Graf
/*
2 2827822e Alexander Graf
 * Tiny Code Generator for QEMU
3 2827822e Alexander Graf
 *
4 2827822e Alexander Graf
 * Copyright (c) 2009 Ulrich Hecht <uli@suse.de>
5 2827822e Alexander Graf
 *
6 2827822e Alexander Graf
 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 2827822e Alexander Graf
 * of this software and associated documentation files (the "Software"), to deal
8 2827822e Alexander Graf
 * in the Software without restriction, including without limitation the rights
9 2827822e Alexander Graf
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 2827822e Alexander Graf
 * copies of the Software, and to permit persons to whom the Software is
11 2827822e Alexander Graf
 * furnished to do so, subject to the following conditions:
12 2827822e Alexander Graf
 *
13 2827822e Alexander Graf
 * The above copyright notice and this permission notice shall be included in
14 2827822e Alexander Graf
 * all copies or substantial portions of the Software.
15 2827822e Alexander Graf
 *
16 2827822e Alexander Graf
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 2827822e Alexander Graf
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 2827822e Alexander Graf
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 2827822e Alexander Graf
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 2827822e Alexander Graf
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 2827822e Alexander Graf
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 2827822e Alexander Graf
 * THE SOFTWARE.
23 2827822e Alexander Graf
 */
24 2827822e Alexander Graf
25 2827822e Alexander Graf
static const int tcg_target_reg_alloc_order[] = {
26 2827822e Alexander Graf
};
27 2827822e Alexander Graf
28 2827822e Alexander Graf
static const int tcg_target_call_iarg_regs[] = {
29 2827822e Alexander Graf
};
30 2827822e Alexander Graf
31 2827822e Alexander Graf
static const int tcg_target_call_oarg_regs[] = {
32 2827822e Alexander Graf
};
33 2827822e Alexander Graf
34 2827822e Alexander Graf
static void patch_reloc(uint8_t *code_ptr, int type,
35 2827822e Alexander Graf
                tcg_target_long value, tcg_target_long addend)
36 2827822e Alexander Graf
{
37 2827822e Alexander Graf
    tcg_abort();
38 2827822e Alexander Graf
}
39 2827822e Alexander Graf
40 2827822e Alexander Graf
static inline int tcg_target_get_call_iarg_regs_count(int flags)
41 2827822e Alexander Graf
{
42 2827822e Alexander Graf
    tcg_abort();
43 2827822e Alexander Graf
    return 0;
44 2827822e Alexander Graf
}
45 2827822e Alexander Graf
46 2827822e Alexander Graf
/* parse target specific constraints */
47 2827822e Alexander Graf
static int target_parse_constraint(TCGArgConstraint *ct, const char **pct_str)
48 2827822e Alexander Graf
{
49 2827822e Alexander Graf
    tcg_abort();
50 2827822e Alexander Graf
    return 0;
51 2827822e Alexander Graf
}
52 2827822e Alexander Graf
53 2827822e Alexander Graf
/* Test if a constant matches the constraint. */
54 2827822e Alexander Graf
static inline int tcg_target_const_match(tcg_target_long val,
55 2827822e Alexander Graf
                const TCGArgConstraint *arg_ct)
56 2827822e Alexander Graf
{
57 2827822e Alexander Graf
    tcg_abort();
58 2827822e Alexander Graf
    return 0;
59 2827822e Alexander Graf
}
60 2827822e Alexander Graf
61 2827822e Alexander Graf
/* load a register with an immediate value */
62 2827822e Alexander Graf
static inline void tcg_out_movi(TCGContext *s, TCGType type,
63 2827822e Alexander Graf
                int ret, tcg_target_long arg)
64 2827822e Alexander Graf
{
65 2827822e Alexander Graf
    tcg_abort();
66 2827822e Alexander Graf
}
67 2827822e Alexander Graf
68 2827822e Alexander Graf
/* load data without address translation or endianness conversion */
69 2827822e Alexander Graf
static inline void tcg_out_ld(TCGContext *s, TCGType type, int arg,
70 2827822e Alexander Graf
                int arg1, tcg_target_long arg2)
71 2827822e Alexander Graf
{
72 2827822e Alexander Graf
    tcg_abort();
73 2827822e Alexander Graf
}
74 2827822e Alexander Graf
75 2827822e Alexander Graf
static inline void tcg_out_st(TCGContext *s, TCGType type, int arg,
76 2827822e Alexander Graf
                              int arg1, tcg_target_long arg2)
77 2827822e Alexander Graf
{
78 2827822e Alexander Graf
    tcg_abort();
79 2827822e Alexander Graf
}
80 2827822e Alexander Graf
81 2827822e Alexander Graf
static inline void tcg_out_op(TCGContext *s, int opc,
82 2827822e Alexander Graf
                const TCGArg *args, const int *const_args)
83 2827822e Alexander Graf
{
84 2827822e Alexander Graf
    tcg_abort();
85 2827822e Alexander Graf
}
86 2827822e Alexander Graf
87 2827822e Alexander Graf
void tcg_target_init(TCGContext *s)
88 2827822e Alexander Graf
{
89 2827822e Alexander Graf
    /* gets called with KVM */
90 2827822e Alexander Graf
}
91 2827822e Alexander Graf
92 2827822e Alexander Graf
void tcg_target_qemu_prologue(TCGContext *s)
93 2827822e Alexander Graf
{
94 2827822e Alexander Graf
    /* gets called with KVM */
95 2827822e Alexander Graf
}
96 2827822e Alexander Graf
97 2827822e Alexander Graf
static inline void tcg_out_mov(TCGContext *s, int ret, int arg)
98 2827822e Alexander Graf
{
99 2827822e Alexander Graf
    tcg_abort();
100 2827822e Alexander Graf
}
101 2827822e Alexander Graf
102 2827822e Alexander Graf
static inline void tcg_out_addi(TCGContext *s, int reg, tcg_target_long val)
103 2827822e Alexander Graf
{
104 2827822e Alexander Graf
    tcg_abort();
105 2827822e Alexander Graf
}