tcg-sparc: Make debug_frame const
Signed-off-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
		
							parent
							
								
									d2e16f2ce1
								
							
						
					
					
						commit
						ae18b28dd1
					
				@ -1499,23 +1499,22 @@ static void tcg_target_init(TCGContext *s)
 | 
				
			|||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
typedef struct {
 | 
					typedef struct {
 | 
				
			||||||
    DebugFrameCIE cie;
 | 
					    DebugFrameHeader h;
 | 
				
			||||||
    DebugFrameFDEHeader fde;
 | 
					 | 
				
			||||||
    uint8_t fde_def_cfa[SPARC64 ? 4 : 2];
 | 
					    uint8_t fde_def_cfa[SPARC64 ? 4 : 2];
 | 
				
			||||||
    uint8_t fde_win_save;
 | 
					    uint8_t fde_win_save;
 | 
				
			||||||
    uint8_t fde_ret_save[3];
 | 
					    uint8_t fde_ret_save[3];
 | 
				
			||||||
} DebugFrame;
 | 
					} DebugFrame;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static DebugFrame debug_frame = {
 | 
					static const DebugFrame debug_frame = {
 | 
				
			||||||
    .cie.len = sizeof(DebugFrameCIE)-4, /* length after .len member */
 | 
					    .h.cie.len = sizeof(DebugFrameCIE)-4, /* length after .len member */
 | 
				
			||||||
    .cie.id = -1,
 | 
					    .h.cie.id = -1,
 | 
				
			||||||
    .cie.version = 1,
 | 
					    .h.cie.version = 1,
 | 
				
			||||||
    .cie.code_align = 1,
 | 
					    .h.cie.code_align = 1,
 | 
				
			||||||
    .cie.data_align = -sizeof(void *) & 0x7f,
 | 
					    .h.cie.data_align = -sizeof(void *) & 0x7f,
 | 
				
			||||||
    .cie.return_column = 15,            /* o7 */
 | 
					    .h.cie.return_column = 15,            /* o7 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* Total FDE size does not include the "len" member.  */
 | 
					    /* 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 = {
 | 
					    .fde_def_cfa = {
 | 
				
			||||||
#if SPARC64
 | 
					#if SPARC64
 | 
				
			||||||
@ -1531,9 +1530,6 @@ static DebugFrame debug_frame = {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void tcg_register_jit(void *buf, size_t buf_size)
 | 
					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));
 | 
					    tcg_register_jit_int(buf, buf_size, &debug_frame, sizeof(debug_frame));
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user