166 lines
2.3 KiB
ArmAsm
166 lines
2.3 KiB
ArmAsm
.text
|
|
.attribute 4, 16
|
|
.attribute 5, "rv64i2p0_m2p0_a2p0_f2p0_d2p0_c2p0"
|
|
.file "38_op_priority4.sy"
|
|
.globl main
|
|
.p2align 1
|
|
.type main,@function
|
|
main:
|
|
addi sp, sp, -48
|
|
sd ra, 40(sp)
|
|
sd s0, 32(sp)
|
|
sd s1, 24(sp)
|
|
sd s2, 16(sp)
|
|
sd s3, 8(sp)
|
|
call getint
|
|
lui s2, %hi(a)
|
|
sw a0, %lo(a)(s2)
|
|
call getint
|
|
lui s3, %hi(b)
|
|
sw a0, %lo(b)(s3)
|
|
call getint
|
|
lui s0, %hi(c)
|
|
sw a0, %lo(c)(s0)
|
|
call getint
|
|
lui s1, %hi(d)
|
|
sw a0, %lo(d)(s1)
|
|
call getint
|
|
lw a1, %lo(b)(s3)
|
|
lw a2, %lo(c)(s0)
|
|
lw a3, %lo(a)(s2)
|
|
lui a5, %hi(e)
|
|
lw a4, %lo(d)(s1)
|
|
mulw s1, a2, a1
|
|
subw s1, a3, s1
|
|
divw s0, a3, a2
|
|
subw s0, a4, s0
|
|
sw a0, %lo(e)(a5)
|
|
bne s1, s0, .LBB0_3
|
|
mulw a5, a1, a3
|
|
divw a5, a5, a2
|
|
addw a0, a0, a4
|
|
beq a5, a0, .LBB0_3
|
|
addw a1, a1, a3
|
|
addw a1, a1, a2
|
|
bne a1, a0, .LBB0_5
|
|
.LBB0_3:
|
|
li a0, 1
|
|
.LBB0_4:
|
|
ld ra, 40(sp)
|
|
ld s0, 32(sp)
|
|
ld s1, 24(sp)
|
|
ld s2, 16(sp)
|
|
ld s3, 8(sp)
|
|
addi sp, sp, 48
|
|
ret
|
|
.LBB0_5:
|
|
li a0, 0
|
|
j .LBB0_4
|
|
.Lfunc_end0:
|
|
.size main, .Lfunc_end0-main
|
|
|
|
.type a,@object
|
|
.section .sbss,"aw",@nobits
|
|
.globl a
|
|
.p2align 2
|
|
a:
|
|
.word 0
|
|
.size a, 4
|
|
|
|
.type b,@object
|
|
.globl b
|
|
.p2align 2
|
|
b:
|
|
.word 0
|
|
.size b, 4
|
|
|
|
.type c,@object
|
|
.globl c
|
|
.p2align 2
|
|
c:
|
|
.word 0
|
|
.size c, 4
|
|
|
|
.type d,@object
|
|
.globl d
|
|
.p2align 2
|
|
d:
|
|
.word 0
|
|
.size d, 4
|
|
|
|
.type e,@object
|
|
.globl e
|
|
.p2align 2
|
|
e:
|
|
.word 0
|
|
.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
|