65816-llvm-mos/compare/sumSquares.ours.s
2026-05-18 14:43:35 -05:00

46 lines
1.2 KiB
ArmAsm

.file "sumSquares.c"
.text
.globl sumSquares ; -- Begin function sumSquares
.type sumSquares,@function
sumSquares: ; @sumSquares
; %bb.0: ; %entry
rep #0x30
sta 0xd0
stz 0xd6
stz 0xd4
lda 0xd0
bne .LBB0_3
; %bb.6: ; %entry
brl .LBB0_5
; %bb.1: ; %for.body.preheader
; %bb.2: ; %for.body.preheader
.LBB0_3: ; %for.body.preheader
lda #0x1
sta 0xd2
.LBB0_4: ; %for.body
; =>This Inner Loop Header: Depth=1
lda 0xd2
pha
jsl __umulhisi3
ply
clc
adc 0xd6
sta 0xd6
txa
adc 0xd4
sta 0xd4
inc 0xd2
dec 0xd0
bne .LBB0_4
.LBB0_5: ; %for.cond.cleanup
lda 0xd4
tax
lda 0xd6
rtl
.Lfunc_end0:
.size sumSquares, .Lfunc_end0-sumSquares
; -- End function
.ident "clang version 23.0.0git (https://github.com/llvm-mos/llvm-mos.git c798c31416f72b395c658b5502d281a162387ab1)"
.section ".note.GNU-stack","",@progbits
.addrsig
.addrsig_sym __umulhisi3