Skip to content

Instantly share code, notes, and snippets.

@luismarques
Created May 24, 2018 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luismarques/238f5bd98f8dfbf9c6356071dfc9c2c5 to your computer and use it in GitHub Desktop.
Save luismarques/238f5bd98f8dfbf9c6356071dfc9c2c5 to your computer and use it in GitHub Desktop.
.text
.file "excpt.d"
.section .text.allocException,"axG",@progbits,allocException,comdat
.globl allocException
.p2align 2
.type allocException,@function
allocException:
.cfi_startproc
addi sp, sp, -16
sw ra, 12(sp)
sw s1, 8(sp)
lui a0, %hi(_D9Exception7__ClassZ)
addi a0, a0, %lo(_D9Exception7__ClassZ)
call _d_allocclass
mv s1, a0
lui a0, %hi(_D9Exception6__vtblZ)
addi a0, a0, %lo(_D9Exception6__vtblZ)
sw a0, 0(s1)
sw zero, 4(s1)
lui a0, %hi(_D9Exception6__initZ+8)
addi a1, a0, %lo(_D9Exception6__initZ+8)
addi a0, s1, 8
addi a2, zero, 32
call memcpy
lui a0, %hi(.L.str)
addi a2, a0, %lo(.L.str)
lui a0, %hi(.L.str.1)
addi a4, a0, %lo(.L.str.1)
addi a1, zero, 14
addi a3, zero, 7
addi a5, zero, 10
mv a0, s1
mv a6, zero
call _D6object9Exception6__ctorMFNaNbNiNfAyaQdkCQBp9ThrowableZCQBx
lui a1, %hi(_D5excpt1eC9Exception)
sw a0, %lo(_D5excpt1eC9Exception)(a1)
lw s1, 8(sp)
lw ra, 12(sp)
addi sp, sp, 16
ret
.Lfunc_end0:
.size allocException, .Lfunc_end0-allocException
.cfi_endproc
.section .text.drun,"axG",@progbits,drun,comdat
.globl drun
.p2align 2
.type drun,@function
drun:
.Lfunc_begin0:
.cfi_startproc
.cfi_personality 0, _d_eh_personality
.cfi_lsda 27, .Lexception0
addi sp, sp, -16
sw ra, 12(sp)
lui a0, %hi(_D5excpt1eC9Exception)
lw a0, %lo(_D5excpt1eC9Exception)(a0)
.Ltmp0:
call _d_throw_exception
.Ltmp1:
.LBB1_2:
.Ltmp2:
addi a2, zero, 1
bne a1, a2, .LBB1_4
call _d_eh_enter_catch
lui a0, %hi(.L.str.2)
addi a1, a0, %lo(.L.str.2)
addi a0, zero, 13
call writeln_
lw ra, 12(sp)
addi sp, sp, 16
ret
.LBB1_4:
call _Unwind_Resume
.Lfunc_end1:
.size drun, .Lfunc_end1-drun
.cfi_endproc
.section .gcc_except_table,"a",@progbits
.p2align 2
GCC_except_table1:
.Lexception0:
.byte 255
.byte 0
.byte .Lttbase0-.Lttbaseref0
.Lttbaseref0:
.byte 3
.byte .Lcst_end0-.Lcst_begin0
.Lcst_begin0:
.long .Ltmp0-.Lfunc_begin0
.long .Ltmp1-.Ltmp0
.long .Ltmp2-.Lfunc_begin0
.byte 1
.long .Ltmp1-.Lfunc_begin0
.long .Lfunc_end1-.Ltmp1
.long 0
.byte 0
.Lcst_end0:
.byte 1
.byte 0
.p2align 2
.long _D9Exception7__ClassZ
.Lttbase0:
.p2align 2
.type _D5excpt1eC9Exception,@object
.section .bss._D5excpt1eC9Exception,"aGw",@nobits,_D5excpt1eC9Exception,comdat
.globl _D5excpt1eC9Exception
.p2align 2
_D5excpt1eC9Exception:
.long 0
.size _D5excpt1eC9Exception, 4
.type .L.str,@object
.section .rodata.str1.1,"aMS",@progbits,1
.L.str:
.asciz "test exception"
.size .L.str, 15
.type .L.str.1,@object
.L.str.1:
.asciz "excpt.d"
.size .L.str.1, 8
.type .L.str.2,@object
.L.str.2:
.asciz "caught from D"
.size .L.str.2, 14
.section ".linker-options","e",@llvm_linker_options
.ident "ldc version 1.9.0git-891fd5d"
.section ".note.GNU-stack","",@progbits
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment