Skip to content

Commit 2934d68

Browse files
committed
reformat
1 parent 19fce55 commit 2934d68

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/ctx.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,17 +165,15 @@ void cj_mark_label(cj_ctx *ctx, cj_label label)
165165
if (ctx->fixups[i].kind == CJ_FIXUP_KIND_ARM_BRANCH)
166166
{
167167
uint64_t instr_pos = ctx->fixups[i].patch_offset;
168-
int64_t byte_offset =
169-
(int64_t)ctx->label_positions[label.id] - (int64_t)instr_pos;
168+
int64_t byte_offset = (int64_t)ctx->label_positions[label.id] - (int64_t)instr_pos;
170169
int64_t instr_offset = byte_offset / 4;
171170

172171
uint32_t instr = ctx->mem[instr_pos] | (ctx->mem[instr_pos + 1] << 8) |
173172
(ctx->mem[instr_pos + 2] << 16) | (ctx->mem[instr_pos + 3] << 24);
174173

175174
uint32_t offset_mask = ((1U << ctx->fixups[i].info.arm.offset_bits) - 1);
176175
instr &= ~(offset_mask << ctx->fixups[i].info.arm.offset_shift);
177-
instr |= (((uint32_t)instr_offset & offset_mask)
178-
<< ctx->fixups[i].info.arm.offset_shift);
176+
instr |= (((uint32_t)instr_offset & offset_mask) << ctx->fixups[i].info.arm.offset_shift);
179177

180178
ctx->mem[instr_pos] = instr & 0xFF;
181179
ctx->mem[instr_pos + 1] = (instr >> 8) & 0xFF;
@@ -213,8 +211,7 @@ void cj_emit_branch(cj_ctx *ctx, uint32_t base_instr, cj_label label, uint8_t of
213211

214212
if (label.id >= 0 && label.id < ctx->num_labels && ctx->label_positions[label.id] != UINT64_MAX)
215213
{
216-
int64_t byte_offset =
217-
(int64_t)ctx->label_positions[label.id] - (int64_t)current_pos;
214+
int64_t byte_offset = (int64_t)ctx->label_positions[label.id] - (int64_t)current_pos;
218215
int64_t instr_offset = byte_offset / 4;
219216

220217
uint32_t offset_mask = ((1U << offset_bits) - 1);

0 commit comments

Comments
 (0)