forked from AbleOS/holey-bytes
cfd3eac0a8
the instructions that are only depended by phis are pushed to the end of the block, which usually saves copy instructions Signed-off-by: Jakub Doka <jakub.doka2@gmail.com>
45 lines
871 B
Plaintext
45 lines
871 B
Plaintext
main:
|
|
ADDI64 r254, r254, -40d
|
|
LI64 r16, 1d
|
|
LI64 r15, 4d
|
|
ADDI64 r17, r254, 0d
|
|
CP r14, r0
|
|
CP r13, r14
|
|
6: JNE r13, r15, :0
|
|
ADDI64 r18, r254, 32d
|
|
LI64 r19, 2d
|
|
CP r13, r14
|
|
4: LD r15, r254, 16a, 8h
|
|
JNE r13, r16, :1
|
|
CP r1, r15
|
|
JMP :2
|
|
1: ADD64 r15, r13, r16
|
|
SUB64 r20, r19, r15
|
|
MUL64 r20, r20, r19
|
|
MUL64 r21, r13, r19
|
|
CP r13, r14
|
|
5: JNE r13, r19, :3
|
|
CP r13, r15
|
|
JMP :4
|
|
3: ADD64 r22, r21, r13
|
|
ADD64 r23, r20, r13
|
|
MULI64 r22, r22, 8d
|
|
MULI64 r23, r23, 8d
|
|
ADD64 r22, r17, r22
|
|
ADD64 r23, r17, r23
|
|
BMC r22, r18, 8h
|
|
BMC r23, r22, 8h
|
|
BMC r18, r23, 8h
|
|
ADD64 r13, r13, r16
|
|
JMP :5
|
|
0: MULI64 r18, r13, 8d
|
|
ADD64 r18, r17, r18
|
|
ST r13, r18, 0a, 8h
|
|
ADD64 r13, r13, r16
|
|
JMP :6
|
|
2: ADDI64 r254, r254, 40d
|
|
JALA r0, r31, 0a
|
|
code size: 264
|
|
ret: 0
|
|
status: Ok(())
|