* [Qemu-devel] [PATCH v2 0/4] tcg-arm: Implement tcg_register_jit
@ 2013-06-05 17:29 Richard Henderson
2013-06-05 17:29 ` [Qemu-devel] [PATCH v2 1/4] tcg: Fix high_pc fields in .debug_info Richard Henderson
` (4 more replies)
0 siblings, 5 replies; 13+ messages in thread
From: Richard Henderson @ 2013-06-05 17:29 UTC (permalink / raw)
To: qemu-devel; +Cc: aurelien
Changes v1-v2:
The suggestions for improvement I got from round 1 apply to all
of the hosts, not just arm.
r~
Richard Henderson (4):
tcg: Fix high_pc fields in .debug_info
tcg: Move the CIE and FDE header definitions to common code
tcg-i386: Use QEMU_BUILD_BUG_ON instead of assert for frame size
tcg-arm: Implement tcg_register_jit
tcg/arm/tcg-target.c | 76 ++++++++++++++++++++++++++++++++++++++++++++------
tcg/hppa/tcg-target.c | 35 +++++++----------------
tcg/i386/tcg-target.c | 45 +++++++++++-------------------
tcg/sparc/tcg-target.c | 35 +++++++----------------
tcg/tcg.c | 22 +++++++++++++--
5 files changed, 123 insertions(+), 90 deletions(-)
--
1.8.1.4
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Qemu-devel] [PATCH v2 1/4] tcg: Fix high_pc fields in .debug_info
2013-06-05 17:29 [Qemu-devel] [PATCH v2 0/4] tcg-arm: Implement tcg_register_jit Richard Henderson
@ 2013-06-05 17:29 ` Richard Henderson
2013-06-05 17:29 ` [Qemu-devel] [PATCH v2 2/4] tcg: Move the CIE and FDE header definitions to common code Richard Henderson
` (3 subsequent siblings)
4 siblings, 0 replies; 13+ messages in thread
From: Richard Henderson @ 2013-06-05 17:29 UTC (permalink / raw)
To: qemu-devel; +Cc: aurelien
I don't think the debugger actually looks at this for anything,
using the correct .debug_frame contents, but might as well get
it all correct.
Signed-off-by: Richard Henderson <rth@twiddle.net>
---
tcg/tcg.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 1d8099c..8ea43b3 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -2659,9 +2659,9 @@ static void tcg_register_jit_int(void *buf_ptr, size_t buf_size,
img->sym[1].st_size = buf_size;
img->di.cu_low_pc = buf;
- img->di.cu_high_pc = buf_size;
+ img->di.cu_high_pc = buf + buf_size;
img->di.fn_low_pc = buf;
- img->di.fn_high_pc = buf_size;
+ img->di.fn_high_pc = buf + buf_size;
#ifdef DEBUG_JIT
/* Enable this block to be able to debug the ELF image file creation.
--
1.8.1.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Qemu-devel] [PATCH v2 2/4] tcg: Move the CIE and FDE header definitions to common code
2013-06-05 17:29 [Qemu-devel] [PATCH v2 0/4] tcg-arm: Implement tcg_register_jit Richard Henderson
2013-06-05 17:29 ` [Qemu-devel] [PATCH v2 1/4] tcg: Fix high_pc fields in .debug_info Richard Henderson
@ 2013-06-05 17:29 ` Richard Henderson
2013-06-05 17:29 ` [Qemu-devel] [PATCH v2 3/4] tcg-i386: Use QEMU_BUILD_BUG_ON instead of assert for frame size Richard Henderson
` (2 subsequent siblings)
4 siblings, 0 replies; 13+ messages in thread
From: Richard Henderson @ 2013-06-05 17:29 UTC (permalink / raw)
To: qemu-devel; +Cc: aurelien
These will necessarily be the same layout for all hosts. This limits
the amount of boilerplate required to implement jit debug for a host.
Signed-off-by: Richard Henderson <rth@twiddle.net>
---
tcg/hppa/tcg-target.c | 35 ++++++++++-------------------------
tcg/i386/tcg-target.c | 39 +++++++++++++--------------------------
tcg/sparc/tcg-target.c | 35 ++++++++++-------------------------
tcg/tcg.c | 18 ++++++++++++++++++
4 files changed, 51 insertions(+), 76 deletions(-)
diff --git a/tcg/hppa/tcg-target.c b/tcg/hppa/tcg-target.c
index 656e736..68f77ba 100644
--- a/tcg/hppa/tcg-target.c
+++ b/tcg/hppa/tcg-target.c
@@ -1766,28 +1766,11 @@ static void tcg_target_init(TCGContext *s)
}
typedef struct {
- uint32_t len __attribute__((aligned((sizeof(void *)))));
- uint32_t id;
- uint8_t version;
- char augmentation[1];
- uint8_t code_align;
- uint8_t data_align;
- uint8_t return_column;
-} DebugFrameCIE;
-
-typedef struct {
- uint32_t len __attribute__((aligned((sizeof(void *)))));
- uint32_t cie_offset;
- tcg_target_long func_start __attribute__((packed));
- tcg_target_long func_len __attribute__((packed));
- uint8_t def_cfa[4];
- uint8_t ret_ofs[3];
- uint8_t reg_ofs[ARRAY_SIZE(tcg_target_callee_save_regs) * 2];
-} DebugFrameFDE;
-
-typedef struct {
DebugFrameCIE cie;
- DebugFrameFDE fde;
+ DebugFrameFDEHeader fde;
+ uint8_t fde_def_cfa[4];
+ uint8_t fde_ret_ofs[3];
+ uint8_t fde_reg_ofs[ARRAY_SIZE(tcg_target_callee_save_regs) * 2];
} DebugFrame;
#define ELF_HOST_MACHINE EM_PARISC
@@ -1806,16 +1789,18 @@ static DebugFrame debug_frame = {
.cie.data_align = 1,
.cie.return_column = 2,
- .fde.len = sizeof(DebugFrameFDE)-4, /* length after .len member */
- .fde.def_cfa = {
+ /* Total FDE size does not include the "len" member. */
+ .fde.len = sizeof(DebugFrame) - offsetof(DebugFrame, fde.cie_offset),
+
+ .fde_def_cfa = {
0x12, 30, /* DW_CFA_def_cfa_sf sp, ... */
(-FRAME_SIZE & 0x7f) | 0x80, /* ... sleb128 -FRAME_SIZE */
(-FRAME_SIZE >> 7) & 0x7f
},
- .fde.ret_ofs = {
+ .fde_ret_ofs = {
0x11, 2, (-20 / 4) & 0x7f /* DW_CFA_offset_extended_sf r2, 20 */
},
- .fde.reg_ofs = {
+ .fde_reg_ofs = {
/* This must match the ordering in tcg_target_callee_save_regs. */
0x80 + 4, 0, /* DW_CFA_offset r4, 0 */
0x80 + 5, 4, /* DW_CFA_offset r5, 4 */
diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-target.c
index 9eec06c..7d946eb 100644
--- a/tcg/i386/tcg-target.c
+++ b/tcg/i386/tcg-target.c
@@ -2318,27 +2318,10 @@ static void tcg_target_init(TCGContext *s)
}
typedef struct {
- uint32_t len __attribute__((aligned((sizeof(void *)))));
- uint32_t id;
- uint8_t version;
- char augmentation[1];
- uint8_t code_align;
- uint8_t data_align;
- uint8_t return_column;
-} DebugFrameCIE;
-
-typedef struct {
- uint32_t len __attribute__((aligned((sizeof(void *)))));
- uint32_t cie_offset;
- tcg_target_long func_start __attribute__((packed));
- tcg_target_long func_len __attribute__((packed));
- uint8_t def_cfa[4];
- uint8_t reg_ofs[14];
-} DebugFrameFDE;
-
-typedef struct {
DebugFrameCIE cie;
- DebugFrameFDE fde;
+ DebugFrameFDEHeader fde;
+ uint8_t fde_def_cfa[4];
+ uint8_t fde_reg_ofs[14];
} DebugFrame;
#if !defined(__ELF__)
@@ -2353,13 +2336,15 @@ static DebugFrame debug_frame = {
.cie.data_align = 0x78, /* sleb128 -8 */
.cie.return_column = 16,
- .fde.len = sizeof(DebugFrameFDE)-4, /* length after .len member */
- .fde.def_cfa = {
+ /* Total FDE size does not include the "len" member. */
+ .fde.len = sizeof(DebugFrame) - offsetof(DebugFrame, fde.cie_offset),
+
+ .fde_def_cfa = {
12, 7, /* DW_CFA_def_cfa %rsp, ... */
(FRAME_SIZE & 0x7f) | 0x80, /* ... uleb128 FRAME_SIZE */
(FRAME_SIZE >> 7)
},
- .fde.reg_ofs = {
+ .fde_reg_ofs = {
0x90, 1, /* DW_CFA_offset, %rip, -8 */
/* The following ordering must match tcg_target_callee_save_regs. */
0x86, 2, /* DW_CFA_offset, %rbp, -16 */
@@ -2380,13 +2365,15 @@ static DebugFrame debug_frame = {
.cie.data_align = 0x7c, /* sleb128 -4 */
.cie.return_column = 8,
- .fde.len = sizeof(DebugFrameFDE)-4, /* length after .len member */
- .fde.def_cfa = {
+ /* Total FDE size does not include the "len" member. */
+ .fde.len = sizeof(DebugFrame) - offsetof(DebugFrame, fde.cie_offset),
+
+ .fde_def_cfa = {
12, 4, /* DW_CFA_def_cfa %esp, ... */
(FRAME_SIZE & 0x7f) | 0x80, /* ... uleb128 FRAME_SIZE */
(FRAME_SIZE >> 7)
},
- .fde.reg_ofs = {
+ .fde_reg_ofs = {
0x88, 1, /* DW_CFA_offset, %eip, -4 */
/* The following ordering must match tcg_target_callee_save_regs. */
0x85, 2, /* DW_CFA_offset, %ebp, -8 */
diff --git a/tcg/sparc/tcg-target.c b/tcg/sparc/tcg-target.c
index 025af9b..5bfd29c 100644
--- a/tcg/sparc/tcg-target.c
+++ b/tcg/sparc/tcg-target.c
@@ -1647,28 +1647,11 @@ static void tcg_target_init(TCGContext *s)
#endif
typedef struct {
- uint32_t len __attribute__((aligned((sizeof(void *)))));
- uint32_t id;
- uint8_t version;
- char augmentation[1];
- uint8_t code_align;
- uint8_t data_align;
- uint8_t return_column;
-} DebugFrameCIE;
-
-typedef struct {
- uint32_t len __attribute__((aligned((sizeof(void *)))));
- uint32_t cie_offset;
- tcg_target_long func_start __attribute__((packed));
- tcg_target_long func_len __attribute__((packed));
- uint8_t def_cfa[TCG_TARGET_REG_BITS == 64 ? 4 : 2];
- uint8_t win_save;
- uint8_t ret_save[3];
-} DebugFrameFDE;
-
-typedef struct {
DebugFrameCIE cie;
- DebugFrameFDE fde;
+ DebugFrameFDEHeader fde;
+ uint8_t fde_def_cfa[TCG_TARGET_REG_BITS == 64 ? 4 : 2];
+ uint8_t fde_win_save;
+ uint8_t fde_ret_save[3];
} DebugFrame;
static DebugFrame debug_frame = {
@@ -1679,8 +1662,10 @@ static DebugFrame debug_frame = {
.cie.data_align = -sizeof(void *) & 0x7f,
.cie.return_column = 15, /* o7 */
- .fde.len = sizeof(DebugFrameFDE)-4, /* length after .len member */
- .fde.def_cfa = {
+ /* Total FDE size does not include the "len" member. */
+ .fde.len = sizeof(DebugFrame) - offsetof(DebugFrame, fde.cie_offset),
+
+ .fde_def_cfa = {
#if TCG_TARGET_REG_BITS == 64
12, 30, /* DW_CFA_def_cfa i6, 2047 */
(2047 & 0x7f) | 0x80, (2047 >> 7)
@@ -1688,8 +1673,8 @@ static DebugFrame debug_frame = {
13, 30 /* DW_CFA_def_cfa_register i6 */
#endif
},
- .fde.win_save = 0x2d, /* DW_CFA_GNU_window_save */
- .fde.ret_save = { 9, 15, 31 }, /* DW_CFA_register o7, i7 */
+ .fde_win_save = 0x2d, /* DW_CFA_GNU_window_save */
+ .fde_ret_save = { 9, 15, 31 }, /* DW_CFA_register o7, i7 */
};
void tcg_register_jit(void *buf, size_t buf_size)
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 8ea43b3..babf4b5 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -68,6 +68,24 @@ static void tcg_target_qemu_prologue(TCGContext *s);
static void patch_reloc(uint8_t *code_ptr, int type,
tcg_target_long value, tcg_target_long addend);
+/* The CIE and FDE header definitions will be common to all hosts. */
+typedef struct {
+ uint32_t len __attribute__((aligned((sizeof(void *)))));
+ uint32_t id;
+ uint8_t version;
+ char augmentation[1];
+ uint8_t code_align;
+ uint8_t data_align;
+ uint8_t return_column;
+} DebugFrameCIE;
+
+typedef struct QEMU_PACKED {
+ uint32_t len __attribute__((aligned((sizeof(void *)))));
+ uint32_t cie_offset;
+ tcg_target_long func_start;
+ tcg_target_long func_len;
+} DebugFrameFDEHeader;
+
static void tcg_register_jit_int(void *buf, size_t size,
void *debug_frame, size_t debug_frame_size)
__attribute__((unused));
--
1.8.1.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Qemu-devel] [PATCH v2 3/4] tcg-i386: Use QEMU_BUILD_BUG_ON instead of assert for frame size
2013-06-05 17:29 [Qemu-devel] [PATCH v2 0/4] tcg-arm: Implement tcg_register_jit Richard Henderson
2013-06-05 17:29 ` [Qemu-devel] [PATCH v2 1/4] tcg: Fix high_pc fields in .debug_info Richard Henderson
2013-06-05 17:29 ` [Qemu-devel] [PATCH v2 2/4] tcg: Move the CIE and FDE header definitions to common code Richard Henderson
@ 2013-06-05 17:29 ` Richard Henderson
2013-06-17 22:08 ` Andreas Färber
2013-06-05 17:29 ` [Qemu-devel] [PATCH v2 4/4] tcg-arm: Implement tcg_register_jit Richard Henderson
2013-06-10 18:41 ` [Qemu-devel] [PATCH v2 0/4] " Richard Henderson
4 siblings, 1 reply; 13+ messages in thread
From: Richard Henderson @ 2013-06-05 17:29 UTC (permalink / raw)
To: qemu-devel; +Cc: aurelien
We can check the condition at compile time, rather than run time.
Signed-off-by: Richard Henderson <rth@twiddle.net>
---
tcg/i386/tcg-target.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-target.c
index 7d946eb..991f484 100644
--- a/tcg/i386/tcg-target.c
+++ b/tcg/i386/tcg-target.c
@@ -2324,6 +2324,9 @@ typedef struct {
uint8_t fde_reg_ofs[14];
} DebugFrame;
+/* We're expecting a 2 byte uleb128 encoded value. */
+QEMU_BUILD_BUG_ON(FRAME_SIZE >= (1 << 14));
+
#if !defined(__ELF__)
/* Host machine without ELF. */
#elif TCG_TARGET_REG_BITS == 64
@@ -2387,9 +2390,6 @@ static DebugFrame debug_frame = {
#if defined(ELF_HOST_MACHINE)
void tcg_register_jit(void *buf, size_t buf_size)
{
- /* We're expecting a 2 byte uleb128 encoded value. */
- assert(FRAME_SIZE >> 14 == 0);
-
debug_frame.fde.func_start = (tcg_target_long) buf;
debug_frame.fde.func_len = buf_size;
--
1.8.1.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Qemu-devel] [PATCH v2 4/4] tcg-arm: Implement tcg_register_jit
2013-06-05 17:29 [Qemu-devel] [PATCH v2 0/4] tcg-arm: Implement tcg_register_jit Richard Henderson
` (2 preceding siblings ...)
2013-06-05 17:29 ` [Qemu-devel] [PATCH v2 3/4] tcg-i386: Use QEMU_BUILD_BUG_ON instead of assert for frame size Richard Henderson
@ 2013-06-05 17:29 ` Richard Henderson
2013-06-17 22:12 ` Andreas Färber
2013-06-10 18:41 ` [Qemu-devel] [PATCH v2 0/4] " Richard Henderson
4 siblings, 1 reply; 13+ messages in thread
From: Richard Henderson @ 2013-06-05 17:29 UTC (permalink / raw)
To: qemu-devel; +Cc: aurelien
Allows unwinding past the code_gen_buffer.
Signed-off-by: Richard Henderson <rth@twiddle.net>
---
tcg/arm/tcg-target.c | 76 +++++++++++++++++++++++++++++++++++++++++++++-------
1 file changed, 67 insertions(+), 9 deletions(-)
diff --git a/tcg/arm/tcg-target.c b/tcg/arm/tcg-target.c
index 3d43412..a20c96d 100644
--- a/tcg/arm/tcg-target.c
+++ b/tcg/arm/tcg-target.c
@@ -2100,23 +2100,31 @@ static inline void tcg_out_movi(TCGContext *s, TCGType type,
tcg_out_movi32(s, COND_AL, ret, arg);
}
+/* Compute frame size via macros, to share between tcg_target_qemu_prologue
+ and tcg_register_jit. */
+
+#define PUSH_SIZE ((11 - 4 + 1 + 1) * sizeof(tcg_target_long))
+
+#define FRAME_SIZE \
+ ((PUSH_SIZE \
+ + TCG_STATIC_CALL_ARGS_SIZE \
+ + CPU_TEMP_BUF_NLONGS * sizeof(long) \
+ + TCG_TARGET_STACK_ALIGN - 1) \
+ & -TCG_TARGET_STACK_ALIGN)
+
static void tcg_target_qemu_prologue(TCGContext *s)
{
- int frame_size;
+ int stack_addend;
/* Calling convention requires us to save r4-r11 and lr. */
/* stmdb sp!, { r4 - r11, lr } */
tcg_out32(s, (COND_AL << 28) | 0x092d4ff0);
- /* Allocate the local stack frame. */
- frame_size = TCG_STATIC_CALL_ARGS_SIZE;
- frame_size += CPU_TEMP_BUF_NLONGS * sizeof(long);
- /* We saved an odd number of registers above; keep an 8 aligned stack. */
- frame_size = ((frame_size + TCG_TARGET_STACK_ALIGN - 1)
- & -TCG_TARGET_STACK_ALIGN) + 4;
+ /* Reserve callee argument and tcg temp space. */
+ stack_addend = FRAME_SIZE - PUSH_SIZE;
tcg_out_dat_rI(s, COND_AL, ARITH_SUB, TCG_REG_CALL_STACK,
- TCG_REG_CALL_STACK, frame_size, 1);
+ TCG_REG_CALL_STACK, stack_addend, 1);
tcg_set_frame(s, TCG_REG_CALL_STACK, TCG_STATIC_CALL_ARGS_SIZE,
CPU_TEMP_BUF_NLONGS * sizeof(long));
@@ -2127,8 +2135,58 @@ static void tcg_target_qemu_prologue(TCGContext *s)
/* Epilogue. We branch here via tb_ret_addr. */
tcg_out_dat_rI(s, COND_AL, ARITH_ADD, TCG_REG_CALL_STACK,
- TCG_REG_CALL_STACK, frame_size, 1);
+ TCG_REG_CALL_STACK, stack_addend, 1);
/* ldmia sp!, { r4 - r11, pc } */
tcg_out32(s, (COND_AL << 28) | 0x08bd8ff0);
}
+
+typedef struct {
+ DebugFrameCIE cie;
+ DebugFrameFDEHeader fde;
+ uint8_t fde_def_cfa[4];
+ uint8_t fde_reg_ofs[18];
+} DebugFrame;
+
+#define ELF_HOST_MACHINE EM_ARM
+
+/* We're expecting a 2 byte uleb128 encoded value. */
+QEMU_BUILD_BUG_ON(FRAME_SIZE >= (1 << 14));
+
+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 = 14,
+
+ /* Total FDE size does not include the "len" member. */
+ .fde.len = sizeof(DebugFrame) - offsetof(DebugFrame, fde.cie_offset),
+
+ .fde_def_cfa = {
+ 12, 13, /* DW_CFA_def_cfa sp, ... */
+ (FRAME_SIZE & 0x7f) | 0x80, /* ... uleb128 FRAME_SIZE */
+ (FRAME_SIZE >> 7)
+ },
+ .fde_reg_ofs = {
+ /* The following must match the stmdb in the prologue. */
+ 0x8e, 1, /* DW_CFA_offset, lr, -4 */
+ 0x8b, 2, /* DW_CFA_offset, r11, -8 */
+ 0x8a, 3, /* DW_CFA_offset, r10, -12 */
+ 0x89, 4, /* DW_CFA_offset, r9, -16 */
+ 0x88, 5, /* DW_CFA_offset, r8, -20 */
+ 0x87, 6, /* DW_CFA_offset, r7, -24 */
+ 0x86, 7, /* DW_CFA_offset, r6, -28 */
+ 0x85, 8, /* DW_CFA_offset, r5, -32 */
+ 0x84, 9, /* DW_CFA_offset, r4, -36 */
+ }
+};
+
+void tcg_register_jit(void *buf, size_t buf_size)
+{
+ debug_frame.fde.func_start = (tcg_target_long) buf;
+ debug_frame.fde.func_len = buf_size;
+
+ tcg_register_jit_int(buf, buf_size, &debug_frame, sizeof(debug_frame));
+}
--
1.8.1.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH v2 0/4] tcg-arm: Implement tcg_register_jit
2013-06-05 17:29 [Qemu-devel] [PATCH v2 0/4] tcg-arm: Implement tcg_register_jit Richard Henderson
` (3 preceding siblings ...)
2013-06-05 17:29 ` [Qemu-devel] [PATCH v2 4/4] tcg-arm: Implement tcg_register_jit Richard Henderson
@ 2013-06-10 18:41 ` Richard Henderson
2013-06-17 15:54 ` Richard Henderson
4 siblings, 1 reply; 13+ messages in thread
From: Richard Henderson @ 2013-06-10 18:41 UTC (permalink / raw)
To: qemu-devel; +Cc: aurelien
Ping.
On 06/05/2013 10:29 AM, Richard Henderson wrote:
> Changes v1-v2:
> The suggestions for improvement I got from round 1 apply to all
> of the hosts, not just arm.
>
>
> r~
>
>
> Richard Henderson (4):
> tcg: Fix high_pc fields in .debug_info
> tcg: Move the CIE and FDE header definitions to common code
> tcg-i386: Use QEMU_BUILD_BUG_ON instead of assert for frame size
> tcg-arm: Implement tcg_register_jit
>
> tcg/arm/tcg-target.c | 76 ++++++++++++++++++++++++++++++++++++++++++++------
> tcg/hppa/tcg-target.c | 35 +++++++----------------
> tcg/i386/tcg-target.c | 45 +++++++++++-------------------
> tcg/sparc/tcg-target.c | 35 +++++++----------------
> tcg/tcg.c | 22 +++++++++++++--
> 5 files changed, 123 insertions(+), 90 deletions(-)
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH v2 0/4] tcg-arm: Implement tcg_register_jit
2013-06-10 18:41 ` [Qemu-devel] [PATCH v2 0/4] " Richard Henderson
@ 2013-06-17 15:54 ` Richard Henderson
2013-06-25 3:44 ` Richard Henderson
0 siblings, 1 reply; 13+ messages in thread
From: Richard Henderson @ 2013-06-17 15:54 UTC (permalink / raw)
To: qemu-devel; +Cc: aurelien
Ping.
On 06/10/2013 11:41 AM, Richard Henderson wrote:
> Ping.
>
>
> On 06/05/2013 10:29 AM, Richard Henderson wrote:
>> Changes v1-v2:
>> The suggestions for improvement I got from round 1 apply to all
>> of the hosts, not just arm.
>>
>>
>> r~
>>
>>
>> Richard Henderson (4):
>> tcg: Fix high_pc fields in .debug_info
>> tcg: Move the CIE and FDE header definitions to common code
>> tcg-i386: Use QEMU_BUILD_BUG_ON instead of assert for frame size
>> tcg-arm: Implement tcg_register_jit
>>
>> tcg/arm/tcg-target.c | 76 ++++++++++++++++++++++++++++++++++++++++++++------
>> tcg/hppa/tcg-target.c | 35 +++++++----------------
>> tcg/i386/tcg-target.c | 45 +++++++++++-------------------
>> tcg/sparc/tcg-target.c | 35 +++++++----------------
>> tcg/tcg.c | 22 +++++++++++++--
>> 5 files changed, 123 insertions(+), 90 deletions(-)
>>
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH v2 3/4] tcg-i386: Use QEMU_BUILD_BUG_ON instead of assert for frame size
2013-06-05 17:29 ` [Qemu-devel] [PATCH v2 3/4] tcg-i386: Use QEMU_BUILD_BUG_ON instead of assert for frame size Richard Henderson
@ 2013-06-17 22:08 ` Andreas Färber
0 siblings, 0 replies; 13+ messages in thread
From: Andreas Färber @ 2013-06-17 22:08 UTC (permalink / raw)
To: Richard Henderson; +Cc: qemu-devel, aurelien
Am 05.06.2013 19:29, schrieb Richard Henderson:
> We can check the condition at compile time, rather than run time.
>
> Signed-off-by: Richard Henderson <rth@twiddle.net>
> ---
> tcg/i386/tcg-target.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-target.c
> index 7d946eb..991f484 100644
> --- a/tcg/i386/tcg-target.c
> +++ b/tcg/i386/tcg-target.c
> @@ -2324,6 +2324,9 @@ typedef struct {
> uint8_t fde_reg_ofs[14];
> } DebugFrame;
>
> +/* We're expecting a 2 byte uleb128 encoded value. */
> +QEMU_BUILD_BUG_ON(FRAME_SIZE >= (1 << 14));
Reviewed-by: Andreas Färber <afaerber@suse.de>
Andreas
> +
> #if !defined(__ELF__)
> /* Host machine without ELF. */
> #elif TCG_TARGET_REG_BITS == 64
> @@ -2387,9 +2390,6 @@ static DebugFrame debug_frame = {
> #if defined(ELF_HOST_MACHINE)
> void tcg_register_jit(void *buf, size_t buf_size)
> {
> - /* We're expecting a 2 byte uleb128 encoded value. */
> - assert(FRAME_SIZE >> 14 == 0);
> -
> debug_frame.fde.func_start = (tcg_target_long) buf;
> debug_frame.fde.func_len = buf_size;
>
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH v2 4/4] tcg-arm: Implement tcg_register_jit
2013-06-05 17:29 ` [Qemu-devel] [PATCH v2 4/4] tcg-arm: Implement tcg_register_jit Richard Henderson
@ 2013-06-17 22:12 ` Andreas Färber
2013-06-17 22:16 ` Peter Maydell
0 siblings, 1 reply; 13+ messages in thread
From: Andreas Färber @ 2013-06-17 22:12 UTC (permalink / raw)
To: Richard Henderson; +Cc: qemu-devel, aurelien
Am 05.06.2013 19:29, schrieb Richard Henderson:
> Allows unwinding past the code_gen_buffer.
>
> Signed-off-by: Richard Henderson <rth@twiddle.net>
> ---
> tcg/arm/tcg-target.c | 76 +++++++++++++++++++++++++++++++++++++++++++++-------
> 1 file changed, 67 insertions(+), 9 deletions(-)
How does the target learn about availability of tcg_register_jit()?
I don't see it used in the patch or in stubs/ and the arm build succeeds.
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH v2 4/4] tcg-arm: Implement tcg_register_jit
2013-06-17 22:12 ` Andreas Färber
@ 2013-06-17 22:16 ` Peter Maydell
2013-06-17 22:30 ` Andreas Färber
0 siblings, 1 reply; 13+ messages in thread
From: Peter Maydell @ 2013-06-17 22:16 UTC (permalink / raw)
To: Andreas Färber; +Cc: qemu-devel, aurelien, Richard Henderson
On 17 June 2013 23:12, Andreas Färber <afaerber@suse.de> wrote:
> Am 05.06.2013 19:29, schrieb Richard Henderson:
>> Allows unwinding past the code_gen_buffer.
>>
>> Signed-off-by: Richard Henderson <rth@twiddle.net>
>> ---
>> tcg/arm/tcg-target.c | 76 +++++++++++++++++++++++++++++++++++++++++++++-------
>> 1 file changed, 67 insertions(+), 9 deletions(-)
>
> How does the target learn about availability of tcg_register_jit()?
(You mean "how does the core TCG code learn about..." -- this
is an optional facility the tcg target facility can provide
to the core).
> I don't see it used in the patch or in stubs/ and the arm build succeeds.
It's gated on whether the tcg backend defines ELF_HOST_MACHINE:
see the comment at the start of the #ifdef ELF_HOST_MACHINE
section in tcg/tcg.c.
thanks
-- PMM
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH v2 4/4] tcg-arm: Implement tcg_register_jit
2013-06-17 22:16 ` Peter Maydell
@ 2013-06-17 22:30 ` Andreas Färber
0 siblings, 0 replies; 13+ messages in thread
From: Andreas Färber @ 2013-06-17 22:30 UTC (permalink / raw)
To: Peter Maydell; +Cc: qemu-devel, aurelien, Richard Henderson
Am 18.06.2013 00:16, schrieb Peter Maydell:
> On 17 June 2013 23:12, Andreas Färber <afaerber@suse.de> wrote:
>> Am 05.06.2013 19:29, schrieb Richard Henderson:
>>> Allows unwinding past the code_gen_buffer.
>>>
>>> Signed-off-by: Richard Henderson <rth@twiddle.net>
>>> ---
>>> tcg/arm/tcg-target.c | 76 +++++++++++++++++++++++++++++++++++++++++++++-------
>>> 1 file changed, 67 insertions(+), 9 deletions(-)
>>
>> How does the target learn about availability of tcg_register_jit()?
>
> (You mean "how does the core TCG code learn about..." -- this
> is an optional facility the tcg target facility can provide
> to the core).
>
>> I don't see it used in the patch or in stubs/ and the arm build succeeds.
>
> It's gated on whether the tcg backend defines ELF_HOST_MACHINE:
> see the comment at the start of the #ifdef ELF_HOST_MACHINE
> section in tcg/tcg.c.
Thanks, that's what I was missing.
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH v2 0/4] tcg-arm: Implement tcg_register_jit
2013-06-17 15:54 ` Richard Henderson
@ 2013-06-25 3:44 ` Richard Henderson
2013-07-02 15:14 ` Richard Henderson
0 siblings, 1 reply; 13+ messages in thread
From: Richard Henderson @ 2013-06-25 3:44 UTC (permalink / raw)
To: qemu-devel; +Cc: aurelien
Ping 3.
On 06/17/2013 08:54 AM, Richard Henderson wrote:
> Ping.
>
>
> On 06/10/2013 11:41 AM, Richard Henderson wrote:
>> Ping.
>>
>>
>> On 06/05/2013 10:29 AM, Richard Henderson wrote:
>>> Changes v1-v2:
>>> The suggestions for improvement I got from round 1 apply to all
>>> of the hosts, not just arm.
>>>
>>>
>>> r~
>>>
>>>
>>> Richard Henderson (4):
>>> tcg: Fix high_pc fields in .debug_info
>>> tcg: Move the CIE and FDE header definitions to common code
>>> tcg-i386: Use QEMU_BUILD_BUG_ON instead of assert for frame size
>>> tcg-arm: Implement tcg_register_jit
>>>
>>> tcg/arm/tcg-target.c | 76 ++++++++++++++++++++++++++++++++++++++++++++------
>>> tcg/hppa/tcg-target.c | 35 +++++++----------------
>>> tcg/i386/tcg-target.c | 45 +++++++++++-------------------
>>> tcg/sparc/tcg-target.c | 35 +++++++----------------
>>> tcg/tcg.c | 22 +++++++++++++--
>>> 5 files changed, 123 insertions(+), 90 deletions(-)
>>>
>>
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH v2 0/4] tcg-arm: Implement tcg_register_jit
2013-06-25 3:44 ` Richard Henderson
@ 2013-07-02 15:14 ` Richard Henderson
0 siblings, 0 replies; 13+ messages in thread
From: Richard Henderson @ 2013-07-02 15:14 UTC (permalink / raw)
To: qemu-devel; +Cc: Anthony Liguori, aurelien
Ping 4. Should I just send a PULL for the only partially reviewed series?
r~
On 06/24/2013 08:44 PM, Richard Henderson wrote:
> Ping 3.
>
> On 06/17/2013 08:54 AM, Richard Henderson wrote:
>> Ping.
>>
>>
>> On 06/10/2013 11:41 AM, Richard Henderson wrote:
>>> Ping.
>>>
>>>
>>> On 06/05/2013 10:29 AM, Richard Henderson wrote:
>>>> Changes v1-v2:
>>>> The suggestions for improvement I got from round 1 apply to all
>>>> of the hosts, not just arm.
>>>>
>>>>
>>>> r~
>>>>
>>>>
>>>> Richard Henderson (4):
>>>> tcg: Fix high_pc fields in .debug_info
>>>> tcg: Move the CIE and FDE header definitions to common code
>>>> tcg-i386: Use QEMU_BUILD_BUG_ON instead of assert for frame size
>>>> tcg-arm: Implement tcg_register_jit
>>>>
>>>> tcg/arm/tcg-target.c | 76 ++++++++++++++++++++++++++++++++++++++++++++------
>>>> tcg/hppa/tcg-target.c | 35 +++++++----------------
>>>> tcg/i386/tcg-target.c | 45 +++++++++++-------------------
>>>> tcg/sparc/tcg-target.c | 35 +++++++----------------
>>>> tcg/tcg.c | 22 +++++++++++++--
>>>> 5 files changed, 123 insertions(+), 90 deletions(-)
>>>>
>>>
>>
>
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2013-07-02 15:14 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-05 17:29 [Qemu-devel] [PATCH v2 0/4] tcg-arm: Implement tcg_register_jit Richard Henderson
2013-06-05 17:29 ` [Qemu-devel] [PATCH v2 1/4] tcg: Fix high_pc fields in .debug_info Richard Henderson
2013-06-05 17:29 ` [Qemu-devel] [PATCH v2 2/4] tcg: Move the CIE and FDE header definitions to common code Richard Henderson
2013-06-05 17:29 ` [Qemu-devel] [PATCH v2 3/4] tcg-i386: Use QEMU_BUILD_BUG_ON instead of assert for frame size Richard Henderson
2013-06-17 22:08 ` Andreas Färber
2013-06-05 17:29 ` [Qemu-devel] [PATCH v2 4/4] tcg-arm: Implement tcg_register_jit Richard Henderson
2013-06-17 22:12 ` Andreas Färber
2013-06-17 22:16 ` Peter Maydell
2013-06-17 22:30 ` Andreas Färber
2013-06-10 18:41 ` [Qemu-devel] [PATCH v2 0/4] " Richard Henderson
2013-06-17 15:54 ` Richard Henderson
2013-06-25 3:44 ` Richard Henderson
2013-07-02 15:14 ` Richard Henderson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.