tcg-target.c.inc (2be7d76b1557d3ee72cde3b2cf5d4abf25220fb2) tcg-target.c.inc (755bf9e514e3f60ffa3f0495e6bc524fca74f3be)
1/*
2 * Tiny Code Generator for QEMU
3 *
4 * Copyright (c) 2008 Fabrice Bellard
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights

--- 3833 unchanged lines hidden (view full) ---

3842 (FRAME_SIZE >> 7)
3843 },
3844 .fde_reg_ofs = {
3845 /* DW_CFA_offset_extended_sf, lr, LR_OFFSET */
3846 0x11, 65, (LR_OFFSET / -SZR) & 0x7f,
3847 }
3848};
3849
1/*
2 * Tiny Code Generator for QEMU
3 *
4 * Copyright (c) 2008 Fabrice Bellard
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights

--- 3833 unchanged lines hidden (view full) ---

3842 (FRAME_SIZE >> 7)
3843 },
3844 .fde_reg_ofs = {
3845 /* DW_CFA_offset_extended_sf, lr, LR_OFFSET */
3846 0x11, 65, (LR_OFFSET / -SZR) & 0x7f,
3847 }
3848};
3849
3850void tcg_register_jit(void *buf, size_t buf_size)
3850void tcg_register_jit(const void *buf, size_t buf_size)
3851{
3852 uint8_t *p = &debug_frame.fde_reg_ofs[3];
3853 int i;
3854
3855 for (i = 0; i < ARRAY_SIZE(tcg_target_callee_save_regs); ++i, p += 2) {
3856 p[0] = 0x80 + tcg_target_callee_save_regs[i];
3857 p[1] = (FRAME_SIZE - (REG_SAVE_BOT + i * SZR)) / SZR;
3858 }
3859
3860 debug_frame.fde.func_start = (uintptr_t)buf;
3861 debug_frame.fde.func_len = buf_size;
3862
3863 tcg_register_jit_int(buf, buf_size, &debug_frame, sizeof(debug_frame));
3864}
3865#endif /* __ELF__ */
3851{
3852 uint8_t *p = &debug_frame.fde_reg_ofs[3];
3853 int i;
3854
3855 for (i = 0; i < ARRAY_SIZE(tcg_target_callee_save_regs); ++i, p += 2) {
3856 p[0] = 0x80 + tcg_target_callee_save_regs[i];
3857 p[1] = (FRAME_SIZE - (REG_SAVE_BOT + i * SZR)) / SZR;
3858 }
3859
3860 debug_frame.fde.func_start = (uintptr_t)buf;
3861 debug_frame.fde.func_len = buf_size;
3862
3863 tcg_register_jit_int(buf, buf_size, &debug_frame, sizeof(debug_frame));
3864}
3865#endif /* __ELF__ */