158 lines
2.2 KiB
ArmAsm
158 lines
2.2 KiB
ArmAsm
|
.text
|
||
|
.attribute 4, 16
|
||
|
.attribute 5, "rv64i2p0_m2p0_a2p0_f2p0_d2p0_c2p0"
|
||
|
.file "39_op_priority5.sy"
|
||
|
.globl main
|
||
|
.p2align 1
|
||
|
.type main,@function
|
||
|
main:
|
||
|
addi sp, sp, -16
|
||
|
sd ra, 8(sp)
|
||
|
sd s0, 0(sp)
|
||
|
lui a0, %hi(a)
|
||
|
lw a0, %lo(a)(a0)
|
||
|
lui a1, %hi(b)
|
||
|
lw a1, %lo(b)(a1)
|
||
|
lui a2, %hi(c)
|
||
|
lw a2, %lo(c)(a2)
|
||
|
lui a3, %hi(e)
|
||
|
lw a5, %lo(e)(a3)
|
||
|
lui a3, %hi(d)
|
||
|
lw a3, %lo(d)(a3)
|
||
|
mulw a4, a1, a0
|
||
|
divw a4, a4, a2
|
||
|
addw a5, a5, a3
|
||
|
bne a4, a5, .LBB0_2
|
||
|
addw a5, a1, a0
|
||
|
mulw a5, a5, a0
|
||
|
addw a5, a5, a2
|
||
|
bge a4, a5, .LBB0_3
|
||
|
.LBB0_2:
|
||
|
mulw a1, a2, a1
|
||
|
subw a1, a0, a1
|
||
|
divw a0, a0, a2
|
||
|
subw a0, a3, a0
|
||
|
bne a1, a0, .LBB0_4
|
||
|
.LBB0_3:
|
||
|
li s0, 1
|
||
|
j .LBB0_5
|
||
|
.LBB0_4:
|
||
|
li s0, 0
|
||
|
.LBB0_5:
|
||
|
mv a0, s0
|
||
|
call putint
|
||
|
mv a0, s0
|
||
|
ld ra, 8(sp)
|
||
|
ld s0, 0(sp)
|
||
|
addi sp, sp, 16
|
||
|
ret
|
||
|
.Lfunc_end0:
|
||
|
.size main, .Lfunc_end0-main
|
||
|
|
||
|
.type a,@object
|
||
|
.section .sdata,"aw",@progbits
|
||
|
.globl a
|
||
|
.p2align 2
|
||
|
a:
|
||
|
.word 1
|
||
|
.size a, 4
|
||
|
|
||
|
.type b,@object
|
||
|
.section .sbss,"aw",@nobits
|
||
|
.globl b
|
||
|
.p2align 2
|
||
|
b:
|
||
|
.word 0
|
||
|
.size b, 4
|
||
|
|
||
|
.type c,@object
|
||
|
.section .sdata,"aw",@progbits
|
||
|
.globl c
|
||
|
.p2align 2
|
||
|
c:
|
||
|
.word 1
|
||
|
.size c, 4
|
||
|
|
||
|
.type d,@object
|
||
|
.globl d
|
||
|
.p2align 2
|
||
|
d:
|
||
|
.word 2
|
||
|
.size d, 4
|
||
|
|
||
|
.type e,@object
|
||
|
.globl e
|
||
|
.p2align 2
|
||
|
e:
|
||
|
.word 4
|
||
|
.size e, 4
|
||
|
|
||
|
.type _sysy_start,@object
|
||
|
.bss
|
||
|
.globl _sysy_start
|
||
|
.p2align 3
|
||
|
_sysy_start:
|
||
|
.zero 16
|
||
|
.size _sysy_start, 16
|
||
|
|
||
|
.type _sysy_end,@object
|
||
|
.globl _sysy_end
|
||
|
.p2align 3
|
||
|
_sysy_end:
|
||
|
.zero 16
|
||
|
.size _sysy_end, 16
|
||
|
|
||
|
.type _sysy_l1,@object
|
||
|
.globl _sysy_l1
|
||
|
.p2align 2
|
||
|
_sysy_l1:
|
||
|
.zero 4096
|
||
|
.size _sysy_l1, 4096
|
||
|
|
||
|
.type _sysy_l2,@object
|
||
|
.globl _sysy_l2
|
||
|
.p2align 2
|
||
|
_sysy_l2:
|
||
|
.zero 4096
|
||
|
.size _sysy_l2, 4096
|
||
|
|
||
|
.type _sysy_h,@object
|
||
|
.globl _sysy_h
|
||
|
.p2align 2
|
||
|
_sysy_h:
|
||
|
.zero 4096
|
||
|
.size _sysy_h, 4096
|
||
|
|
||
|
.type _sysy_m,@object
|
||
|
.globl _sysy_m
|
||
|
.p2align 2
|
||
|
_sysy_m:
|
||
|
.zero 4096
|
||
|
.size _sysy_m, 4096
|
||
|
|
||
|
.type _sysy_s,@object
|
||
|
.globl _sysy_s
|
||
|
.p2align 2
|
||
|
_sysy_s:
|
||
|
.zero 4096
|
||
|
.size _sysy_s, 4096
|
||
|
|
||
|
.type _sysy_us,@object
|
||
|
.globl _sysy_us
|
||
|
.p2align 2
|
||
|
_sysy_us:
|
||
|
.zero 4096
|
||
|
.size _sysy_us, 4096
|
||
|
|
||
|
.type _sysy_idx,@object
|
||
|
.section .sbss,"aw",@nobits
|
||
|
.globl _sysy_idx
|
||
|
.p2align 2
|
||
|
_sysy_idx:
|
||
|
.word 0
|
||
|
.size _sysy_idx, 4
|
||
|
|
||
|
.ident "Debian clang version 14.0.6"
|
||
|
.section ".note.GNU-stack","",@progbits
|
||
|
.addrsig
|