1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-11-26 09:07:38 +01:00
libunwind-eh_elf/tests/ia64-dyn-asm.S
2003-02-22 08:19:43 +00:00

109 lines
3.4 KiB
ArmAsm

#define TEMPLATE(name, code...) \
.globl name##_start, name##_end; \
name##_start:; \
code;; \
name##_end:
.sdata
global_value: data8 0
.text
TEMPLATE(get_r4, mov r31 = r4)
TEMPLATE(get_r5, mov r31 = r5)
TEMPLATE(get_r6, mov r31 = r6)
TEMPLATE(get_r7, mov r31 = r7)
TEMPLATE(get_r30, mov r31 = r30)
TEMPLATE(get_bsp, mov r31 = ar.bsp)
TEMPLATE(get_bspstore, \
mov r30 = ar.rsc;; mov ar.rsc = 0;; \
mov r31 = ar.bspstore;; mov ar.rsc = r30)
TEMPLATE(get_pfs, mov r31 = ar.pfs)
TEMPLATE(get_rnat, mov r31 = ar.rnat)
TEMPLATE(get_unat, mov r31 = ar.unat)
TEMPLATE(get_fpsr, mov r31 = ar.fpsr)
TEMPLATE(get_lc, mov r31 = ar.lc)
TEMPLATE(get_pr, mov r31 = pr)
TEMPLATE(get_rp, mov r31 = b0)
TEMPLATE(get_b1, mov r31 = b1)
TEMPLATE(get_b2, mov r31 = b2)
TEMPLATE(get_b3, mov r31 = b3)
TEMPLATE(get_b4, mov r31 = b4)
TEMPLATE(get_b5, mov r31 = b5)
TEMPLATE(get_f2, mov f127 = f2)
TEMPLATE(get_f3, mov f127 = f3)
TEMPLATE(get_f4, mov f127 = f4)
TEMPLATE(get_f5, mov f127 = f5)
TEMPLATE(get_f16, mov f127 = f16)
TEMPLATE(get_f17, mov f127 = f17)
TEMPLATE(get_f18, mov f127 = f18)
TEMPLATE(get_f19, mov f127 = f19)
TEMPLATE(get_f20, mov f127 = f20)
TEMPLATE(get_f21, mov f127 = f21)
TEMPLATE(get_f22, mov f127 = f22)
TEMPLATE(get_f23, mov f127 = f23)
TEMPLATE(get_f24, mov f127 = f24)
TEMPLATE(get_f25, mov f127 = f25)
TEMPLATE(get_f26, mov f127 = f26)
TEMPLATE(get_f27, mov f127 = f27)
TEMPLATE(get_f28, mov f127 = f28)
TEMPLATE(get_f29, mov f127 = f29)
TEMPLATE(get_f30, mov f127 = f30)
TEMPLATE(get_f31, mov f127 = f31)
TEMPLATE(put_r1, mov r1 = r31)
TEMPLATE(put_r4, mov r4 = r31)
TEMPLATE(put_r5, mov r5 = r31)
TEMPLATE(put_r6, mov r6 = r31)
TEMPLATE(put_r7, mov r7 = r31)
TEMPLATE(put_bsp, mov ar.bsp = r31)
TEMPLATE(put_bspstore, \
mov r30 = ar.rsc;; mov ar.rsc = 0;; \
mov ar.bspstore = r31;; mov ar.rsc = r30)
TEMPLATE(put_pfs, mov ar.pfs = r31)
TEMPLATE(put_rnat, mov ar.rnat = r31)
TEMPLATE(put_unat, mov ar.unat = r31)
TEMPLATE(put_fpsr, mov ar.fpsr = r31)
TEMPLATE(put_lc, mov ar.lc = r31)
TEMPLATE(put_pr, mov pr = r31, -1)
TEMPLATE(put_rp, mov b0 = r31)
TEMPLATE(put_b1, mov b1 = r31)
TEMPLATE(put_b2, mov b2 = r31)
TEMPLATE(put_b3, mov b3 = r31)
TEMPLATE(put_b4, mov b4 = r31)
TEMPLATE(put_b5, mov b5 = r31)
TEMPLATE(put_f2, mov f2 = f127)
TEMPLATE(put_f3, mov f3 = f127)
TEMPLATE(put_f4, mov f4 = f127)
TEMPLATE(put_f5, mov f5 = f127)
TEMPLATE(put_f16, mov f16 = f127)
TEMPLATE(put_f17, mov f17 = f127)
TEMPLATE(put_f18, mov f18 = f127)
TEMPLATE(put_f19, mov f19 = f127)
TEMPLATE(put_f20, mov f20 = f127)
TEMPLATE(put_f21, mov f21 = f127)
TEMPLATE(put_f22, mov f22 = f127)
TEMPLATE(put_f23, mov f23 = f127)
TEMPLATE(put_f24, mov f24 = f127)
TEMPLATE(put_f25, mov f25 = f127)
TEMPLATE(put_f26, mov f26 = f127)
TEMPLATE(put_f27, mov f27 = f127)
TEMPLATE(put_f28, mov f28 = f127)
TEMPLATE(put_f29, mov f29 = f127)
TEMPLATE(put_f30, mov f30 = f127)
TEMPLATE(put_f31, mov f31 = f127)
TEMPLATE(load_imm, movl r31 = 0)
TEMPLATE(store_sprel, add r2 = r30, sp;; st8 [r2] = r31)
TEMPLATE(load_sprel, add r2 = r30, sp;; ld8 r31 = [r2])
TEMPLATE(spill_sprel, add r2 = r30, sp;; st8.spill [r2] = r31)
TEMPLATE(fill_sprel, add r2 = r30, sp;; ld8.fill r31 = [r2])
TEMPLATE(add_sp, add r12 = r30, r12)
TEMPLATE(call, mov b6 = r30;; br.call.sptk.many rp = b6)
TEMPLATE(ret, br.ret.sptk.many rp)
TEMPLATE(alloc_8_8_8_0, alloc r31 = ar.pfs, 8, 8, 8, 0)
TEMPLATE(alloc_8_8_8_8, alloc r31 = ar.pfs, 8, 8, 8, 8)
TEMPLATE(rot, br.wtop.sptk.few 1f; 1:)