128 lines
2.0 KiB
ArmAsm
128 lines
2.0 KiB
ArmAsm
|
.file "dead-code-elimination-3.sy"
|
||
|
.option pic
|
||
|
.attribute arch, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
|
||
|
.attribute unaligned_access, 0
|
||
|
.attribute stack_align, 16
|
||
|
.text
|
||
|
.align 1
|
||
|
.globl func
|
||
|
.type func, @function
|
||
|
func:
|
||
|
sw a0,.LANCHOR0,a5
|
||
|
ret
|
||
|
.size func, .-func
|
||
|
.section .text.startup,"ax",@progbits
|
||
|
.align 1
|
||
|
.globl main
|
||
|
.type main, @function
|
||
|
main:
|
||
|
addi sp,sp,-32
|
||
|
sd ra,24(sp)
|
||
|
sd s1,8(sp)
|
||
|
sd s0,16(sp)
|
||
|
call getint@plt
|
||
|
mv a5,a0
|
||
|
li a0,98304
|
||
|
lla s1,.LANCHOR0
|
||
|
addi a0,a0,1714
|
||
|
sw a5,4(s1)
|
||
|
call _sysy_starttime@plt
|
||
|
lw a5,4(s1)
|
||
|
ble a5,zero,.L6
|
||
|
slliw a3,a5,4
|
||
|
subw a3,a3,a5
|
||
|
li a2,134209536
|
||
|
sext.w a0,a5
|
||
|
slliw a3,a3,2
|
||
|
li a5,0
|
||
|
li s0,0
|
||
|
li a1,60
|
||
|
addiw a2,a2,1
|
||
|
.L5:
|
||
|
divw a4,a5,a1
|
||
|
addiw a5,a5,60
|
||
|
addw s0,a4,s0
|
||
|
remw s0,s0,a2
|
||
|
bne a5,a3,.L5
|
||
|
addiw a5,a0,-1
|
||
|
sw a5,0(s1)
|
||
|
.L4:
|
||
|
li a0,98304
|
||
|
addi a0,a0,1730
|
||
|
call _sysy_stoptime@plt
|
||
|
mv a0,s0
|
||
|
call putint@plt
|
||
|
li a0,10
|
||
|
call putch@plt
|
||
|
ld ra,24(sp)
|
||
|
ld s0,16(sp)
|
||
|
ld s1,8(sp)
|
||
|
li a0,0
|
||
|
addi sp,sp,32
|
||
|
jr ra
|
||
|
.L6:
|
||
|
li s0,0
|
||
|
j .L4
|
||
|
.size main, .-main
|
||
|
.globl global
|
||
|
.globl loopCount
|
||
|
.globl _sysy_idx
|
||
|
.globl _sysy_us
|
||
|
.globl _sysy_s
|
||
|
.globl _sysy_m
|
||
|
.globl _sysy_h
|
||
|
.globl _sysy_l2
|
||
|
.globl _sysy_l1
|
||
|
.globl _sysy_end
|
||
|
.globl _sysy_start
|
||
|
.bss
|
||
|
.align 3
|
||
|
.set .LANCHOR0,. + 0
|
||
|
.type global, @object
|
||
|
.size global, 4
|
||
|
global:
|
||
|
.zero 4
|
||
|
.type loopCount, @object
|
||
|
.size loopCount, 4
|
||
|
loopCount:
|
||
|
.zero 4
|
||
|
.type _sysy_idx, @object
|
||
|
.size _sysy_idx, 4
|
||
|
_sysy_idx:
|
||
|
.zero 4
|
||
|
.zero 4
|
||
|
.type _sysy_us, @object
|
||
|
.size _sysy_us, 4096
|
||
|
_sysy_us:
|
||
|
.zero 4096
|
||
|
.type _sysy_s, @object
|
||
|
.size _sysy_s, 4096
|
||
|
_sysy_s:
|
||
|
.zero 4096
|
||
|
.type _sysy_m, @object
|
||
|
.size _sysy_m, 4096
|
||
|
_sysy_m:
|
||
|
.zero 4096
|
||
|
.type _sysy_h, @object
|
||
|
.size _sysy_h, 4096
|
||
|
_sysy_h:
|
||
|
.zero 4096
|
||
|
.type _sysy_l2, @object
|
||
|
.size _sysy_l2, 4096
|
||
|
_sysy_l2:
|
||
|
.zero 4096
|
||
|
.type _sysy_l1, @object
|
||
|
.size _sysy_l1, 4096
|
||
|
_sysy_l1:
|
||
|
.zero 4096
|
||
|
.type _sysy_end, @object
|
||
|
.size _sysy_end, 16
|
||
|
_sysy_end:
|
||
|
.zero 16
|
||
|
.type _sysy_start, @object
|
||
|
.size _sysy_start, 16
|
||
|
_sysy_start:
|
||
|
.zero 16
|
||
|
.ident "GCC: (Debian 12.2.0-13) 12.2.0"
|
||
|
.section .note.GNU-stack,"",@progbits
|