Skip to content

Instantly share code, notes, and snippets.

@xacrimon
Created May 7, 2026 14:37
Show Gist options
  • Select an option

  • Save xacrimon/94981ef8df8830e3923535f061d37708 to your computer and use it in GitHub Desktop.

Select an option

Save xacrimon/94981ef8df8830e3923535f061d37708 to your computer and use it in GitHub Desktop.
tcvm::vm::interp::op_add:
Lfunc_begin291:
sub sp, sp, #144
stp x29, x30, [sp, #128]
add x29, sp, #128
lsr x8, x20, #16
lsr x9, x20, #24
add x8, x24, w8, uxtb #4
ldr x10, [x8]
ldrb w28, [x8, #8]
add x8, x24, w9, uxtb #4
ldr x19, [x8]
ldrb w27, [x8, #8]
cmp w28, #3
b.eq LBB291_4
cmp w28, #2
b.ne LBB291_6
cmp w27, #2
b.ne LBB291_9
add x8, x19, x10
mov w9, #2
b LBB291_13
LBB291_4:
fmov d0, x10
cmp w27, #2
b.ne LBB291_10
scvtf d1, x19
b LBB291_12
LBB291_6:
ldr x24, [x22, #32]
cmp w28, #5
stp x21, x10, [sp, #16]
str x22, [sp, #32]
b.ne LBB291_15
ldr x8, [x10, #152]
cbz x8, LBB291_15
add x0, x8, #16
add x1, x24, #16
mov w2, #4
bl <tcvm::env::table::TableState>::raw_get
tst w1, #0xff
b.ne LBB291_18
b LBB291_15
LBB291_9:
scvtf d0, x10
LBB291_10:
cmp w27, #3
b.ne LBB291_14
fmov d1, x19
LBB291_12:
fadd d0, d0, d1
fmov x8, d0
mov w9, #3
LBB291_13:
lsr x10, x20, #8
add x10, x24, w10, uxtb #4
str x8, [x10]
strb w9, [x10, #8]
ldr x20, [x25], #8
and x8, x20, #0xff
ldr x0, [x26, x8, lsl #3]
b LBB291_20
LBB291_14:
stp x21, x10, [sp, #16]
str x22, [sp, #32]
ldr x24, [x22, #32]
LBB291_15:
cmp w27, #5
b.ne LBB291_21
ldr x8, [x19, #152]
cbz x8, LBB291_21
add x0, x8, #16
add x1, x24, #16
mov w2, #4
bl <tcvm::env::table::TableState>::raw_get
tst w1, #0xff
b.eq LBB291_21
LBB291_18:
mov x3, x0
mov x4, x1
strb wzr, [sp, #40]
lsr x8, x20, #8
Lloh1340:
adrp x9, tcvm::vm::interp::cont_store_result@PAGE
Lloh1341:
add x9, x9, tcvm::vm::interp::cont_store_result@PAGEOFF
strb w8, [sp, #41]
stp x9, xzr, [sp, #48]
strb wzr, [sp, #64]
ldp x8, x22, [sp, #24]
stur x8, [x29, #-32]
sturb w28, [x29, #-24]
stur x19, [x29, #-16]
sturb w27, [x29, #-8]
ldr x1, [x22, #184]
str x25, [sp]
sub x0, x29, #56
sub x5, x29, #32
add x7, sp, #40
mov x2, x23
mov w6, #2
bl tcvm::vm::interp::schedule_meta_call
ldur x8, [x29, #-56]
cmp x8, #1
b.ne LBB291_23
ldp x25, x8, [x29, #-48]
ldr x9, [x23, #88]
add x24, x9, x8, lsl #4
ldr x20, [x25], #8
and x8, x20, #0xff
ldr x0, [x26, x8, lsl #3]
ldr x21, [sp, #16]
LBB291_20:
ldp x29, x30, [sp, #128]
add sp, sp, #144
br x0
LBB291_21:
LBB291_22:
ldp x29, x30, [sp, #128]
add sp, sp, #144
b tcvm::vm::interp::impl_error
LBB291_23:
b LBB291_22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment