diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2014-05-28 17:44:45 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2014-05-28 17:44:45 +0100 |
commit | 66226ffd056d85a6b86034dd4bbec687e66ded24 (patch) | |
tree | 483e0effddf60aaa26253899d8f1af6baf0a21bc /tcg/i386/tcg-target.c | |
parent | 3ee933c9d4869891a5614fba4815a3857dc3ef8f (diff) | |
parent | 24666baf1f0a0be454d7c64497dca6d9becc3f40 (diff) |
Merge remote-tracking branch 'remotes/rth/tcg-next' into staging
* remotes/rth/tcg-next:
tcg/optimize: Remember garbage high bits for 32-bit ops
tcg/optimize: Move updating of gen_opc_buf into tcg_opt_gen_mov*
tcg-sparc: Make debug_frame const
tcg-s390: Make debug_frame const
tcg-arm: Make debug_frame const
tcg-aarch64: Make debug_frame const
tcg-i386: Make debug_frame const
tcg: Allow the debug_frame data structure to be constant
tcg: Move size effects out of dh_arg
tcg: Remove sizemask and flags arguments to tcg_gen_callN
tcg: Save flags and computed sizemask in TCGHelperInfo
tcg: Register the helper info struct rather than the name
tcg: Move side effects out of dh_sizemask
tcg: Inline tcg_gen_helperN
tcg: Use helper-gen.h in tcg-op.h
tcg: Push tcg-runtime routines into exec/helper-*
tcg: Invert the inclusion of helper.h
tcg: Optimize brcond2 and setcond2 ne/eq
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tcg/i386/tcg-target.c')
-rw-r--r-- | tcg/i386/tcg-target.c | 38 |
1 files changed, 17 insertions, 21 deletions
diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-target.c index a373073ff8..d9102335f9 100644 --- a/tcg/i386/tcg-target.c +++ b/tcg/i386/tcg-target.c @@ -2341,8 +2341,7 @@ static void tcg_target_init(TCGContext *s) } typedef struct { - DebugFrameCIE cie; - DebugFrameFDEHeader fde; + DebugFrameHeader h; uint8_t fde_def_cfa[4]; uint8_t fde_reg_ofs[14]; } DebugFrame; @@ -2354,16 +2353,16 @@ QEMU_BUILD_BUG_ON(FRAME_SIZE >= (1 << 14)); /* Host machine without ELF. */ #elif TCG_TARGET_REG_BITS == 64 #define ELF_HOST_MACHINE EM_X86_64 -static DebugFrame debug_frame = { - .cie.len = sizeof(DebugFrameCIE)-4, /* length after .len member */ - .cie.id = -1, - .cie.version = 1, - .cie.code_align = 1, - .cie.data_align = 0x78, /* sleb128 -8 */ - .cie.return_column = 16, +static const DebugFrame debug_frame = { + .h.cie.len = sizeof(DebugFrameCIE)-4, /* length after .len member */ + .h.cie.id = -1, + .h.cie.version = 1, + .h.cie.code_align = 1, + .h.cie.data_align = 0x78, /* sleb128 -8 */ + .h.cie.return_column = 16, /* Total FDE size does not include the "len" member. */ - .fde.len = sizeof(DebugFrame) - offsetof(DebugFrame, fde.cie_offset), + .h.fde.len = sizeof(DebugFrame) - offsetof(DebugFrame, h.fde.cie_offset), .fde_def_cfa = { 12, 7, /* DW_CFA_def_cfa %rsp, ... */ @@ -2383,16 +2382,16 @@ static DebugFrame debug_frame = { }; #else #define ELF_HOST_MACHINE EM_386 -static DebugFrame debug_frame = { - .cie.len = sizeof(DebugFrameCIE)-4, /* length after .len member */ - .cie.id = -1, - .cie.version = 1, - .cie.code_align = 1, - .cie.data_align = 0x7c, /* sleb128 -4 */ - .cie.return_column = 8, +static const DebugFrame debug_frame = { + .h.cie.len = sizeof(DebugFrameCIE)-4, /* length after .len member */ + .h.cie.id = -1, + .h.cie.version = 1, + .h.cie.code_align = 1, + .h.cie.data_align = 0x7c, /* sleb128 -4 */ + .h.cie.return_column = 8, /* Total FDE size does not include the "len" member. */ - .fde.len = sizeof(DebugFrame) - offsetof(DebugFrame, fde.cie_offset), + .h.fde.len = sizeof(DebugFrame) - offsetof(DebugFrame, h.fde.cie_offset), .fde_def_cfa = { 12, 4, /* DW_CFA_def_cfa %esp, ... */ @@ -2413,9 +2412,6 @@ static DebugFrame debug_frame = { #if defined(ELF_HOST_MACHINE) void tcg_register_jit(void *buf, size_t buf_size) { - debug_frame.fde.func_start = (uintptr_t)buf; - debug_frame.fde.func_len = buf_size; - tcg_register_jit_int(buf, buf_size, &debug_frame, sizeof(debug_frame)); } #endif |