mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-13 07:32:23 -07:00
helper for determining if bytecode has dependency on TLS
This commit is contained in:
@@ -941,7 +941,7 @@ rdim_inline_site_chunk_list_concat_in_place(RDIM_InlineSiteChunkList *dst, RDIM_
|
||||
|
||||
//- rjf: bytecode
|
||||
|
||||
RDI_PROC void
|
||||
RDI_PROC RDIM_EvalBytecodeOp *
|
||||
rdim_bytecode_push_op(RDIM_Arena *arena, RDIM_EvalBytecode *bytecode, RDI_EvalOp op, RDI_U64 p)
|
||||
{
|
||||
RDI_U16 ctrlbits = rdi_eval_op_ctrlbits_table[op];
|
||||
@@ -955,6 +955,8 @@ rdim_bytecode_push_op(RDIM_Arena *arena, RDIM_EvalBytecode *bytecode, RDI_EvalOp
|
||||
RDIM_SLLQueuePush(bytecode->first_op, bytecode->last_op, node);
|
||||
bytecode->op_count += 1;
|
||||
bytecode->encoded_size += 1 + p_size;
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
RDI_PROC void
|
||||
@@ -1022,6 +1024,21 @@ rdim_bytecode_concat_in_place(RDIM_EvalBytecode *left_dst, RDIM_EvalBytecode *ri
|
||||
}
|
||||
}
|
||||
|
||||
RDI_PROC B32
|
||||
rdim_is_bytecode_tls_dependent(RDIM_EvalBytecode bytecode)
|
||||
{
|
||||
B32 result = 0;
|
||||
for(RDIM_EvalBytecodeOp *n = bytecode.first_op; n != 0; n = n->next)
|
||||
{
|
||||
if(n->op == RDI_EvalOp_TLSOff)
|
||||
{
|
||||
result = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
//- rjf: locations
|
||||
|
||||
RDI_PROC RDI_U64
|
||||
|
||||
@@ -1648,10 +1648,11 @@ RDI_PROC void rdim_inline_site_chunk_list_concat_in_place(RDIM_InlineSiteChunkLi
|
||||
//~ rjf: [Building] Location Info Building
|
||||
|
||||
//- rjf: bytecode
|
||||
RDI_PROC void rdim_bytecode_push_op(RDIM_Arena *arena, RDIM_EvalBytecode *bytecode, RDI_EvalOp op, RDI_U64 p);
|
||||
RDI_PROC RDIM_EvalBytecodeOp * rdim_bytecode_push_op(RDIM_Arena *arena, RDIM_EvalBytecode *bytecode, RDI_EvalOp op, RDI_U64 p);
|
||||
RDI_PROC void rdim_bytecode_push_uconst(RDIM_Arena *arena, RDIM_EvalBytecode *bytecode, RDI_U64 x);
|
||||
RDI_PROC void rdim_bytecode_push_sconst(RDIM_Arena *arena, RDIM_EvalBytecode *bytecode, RDI_S64 x);
|
||||
RDI_PROC void rdim_bytecode_concat_in_place(RDIM_EvalBytecode *left_dst, RDIM_EvalBytecode *right_destroyed);
|
||||
RDI_PROC B32 rdim_is_bytecode_tls_dependent(RDIM_EvalBytecode bytecode);
|
||||
|
||||
//- rjf: locations
|
||||
RDI_PROC RDI_U64 rdim_encoded_size_from_location_info(RDIM_LocationInfo *info);
|
||||
|
||||
Reference in New Issue
Block a user