Skip to content

Instantly share code, notes, and snippets.

@maxwindiff
Last active February 16, 2023 03:41
Show Gist options
  • Save maxwindiff/a1850531f72c20ff5c922ac3743f2093 to your computer and use it in GitHub Desktop.
Save maxwindiff/a1850531f72c20ff5c922ac3743f2093 to your computer and use it in GitHub Desktop.
19:37:51 applegpu (main) % ./disassemble.sh /tmp/div2.metallib
Function: __div2_agc.main
=================================================================
0: 7e0184098000 mov r0, u2
6: 4501000d00c01200 device_store 0, i32, x, r0, u0_u1, 0, signed, 0
e: 8800 stop
Function: __div2_agc.main.constant_program
=================================================================
0: 0501000d00c01200 device_load 0, i32, x, r0, u0_u1, 0, signed
8: 3800 wait 0
a: 2e8100002c010000 bfeil r0, 0, r0.discard, 1
12: c500403d00803000 uniform_store 2, i16, xy, 0, r0l_r0h, 4
1a: 8800 stop
19:38:33 applegpu (main) % ./disassemble.sh /tmp/div3.metallib
Function: __div3_agc.main
=================================================================
0: 7e0184098000 mov r0, u2
6: 4501000d00c01200 device_store 0, i32, x, r0, u0_u1, 0, signed, 0
e: 8800 stop
Function: __div3_agc.main.constant_program
=================================================================
0: 0501000d00c01200 device_load 0, i32, x, r0, u0_u1, 0, signed
8: 3800 wait 0
a: e205abaaaaaa mov_imm r1.cache, 2863311531
10: 9e03c0222c000000 imadd r0_r1.cache, r0.discard, r1.discard, 0
18: 2e8100202c010000 bfeil r0, 0, r1.discard, 1
20: c500403d00803000 uniform_store 2, i16, xy, 0, r0l_r0h, 4
28: 8800 stop
19:38:35 applegpu (main) % ./disassemble.sh /tmp/div5.metallib
Function: __div5_agc.main
=================================================================
0: 7e0184098000 mov r0, u2
6: 4501000d00c01200 device_store 0, i32, x, r0, u0_u1, 0, signed, 0
e: 8800 stop
Function: __div5_agc.main.constant_program
=================================================================
0: 0501000d00c01200 device_load 0, i32, x, r0, u0_u1, 0, signed
8: 3800 wait 0
a: e205cdcccccc mov_imm r1.cache, 3435973837
10: 9e03c0222c000000 imadd r0_r1.cache, r0.discard, r1.discard, 0
18: 2e8100202c020000 bfeil r0, 0, r1.discard, 2
20: c500403d00803000 uniform_store 2, i16, xy, 0, r0l_r0h, 4
28: 8800 stop
19:38:38 applegpu (main) % ./disassemble.sh /tmp/div7.metallib
Function: __div7_agc.main
=================================================================
0: 7e0184098000 mov r0, u2
6: 4501000d00c01200 device_store 0, i32, x, r0, u0_u1, 0, signed, 0
e: 8800 stop
Function: __div7_agc.main.constant_program
=================================================================
0: 0511000d00c01200 device_load 0, i32, x, r2, u0_u1, 0, signed
8: 3800 wait 0
a: e20125499224 mov_imm r0.cache, 613566757
10: 9e0384022c000000 imadd r0_r1.cache, r2.cache, r0.discard, 0
18: 8e01c42a28000000 isub r0.cache, r2.discard, r1.cache
20: ae8100002c010000 bfeil r0.cache, 0, r0.discard, 1
28: 8e01c0222c000000 iadd r0.cache, r0.discard, r1.discard
30: 2e8100002c020000 bfeil r0, 0, r0.discard, 2
38: c500403d00803000 uniform_store 2, i16, xy, 0, r0l_r0h, 4
40: 8800 stop
19:38:41 applegpu (main) % ./disassemble.sh /tmp/div11.metallib
Function: __div11_agc.main
=================================================================
0: 7e0184098000 mov r0, u2
6: 4501000d00c01200 device_store 0, i32, x, r0, u0_u1, 0, signed, 0
e: 8800 stop
Function: __div11_agc.main.constant_program
=================================================================
0: 0501000d00c01200 device_load 0, i32, x, r0, u0_u1, 0, signed
8: 3800 wait 0
a: e205a38b2eba mov_imm r1.cache, 3123612579
10: 9e03c0222c000000 imadd r0_r1.cache, r0.discard, r1.discard, 0
18: 2e8100202c030000 bfeil r0, 0, r1.discard, 3
20: c500403d00803000 uniform_store 2, i16, xy, 0, r0l_r0h, 4
28: 8800 stop
19:38:43 applegpu (main) % ./disassemble.sh /tmp/div13.metallib
Function: __div13_agc.main
=================================================================
0: 7e0184098000 mov r0, u2
6: 4501000d00c01200 device_store 0, i32, x, r0, u0_u1, 0, signed, 0
e: 8800 stop
Function: __div13_agc.main.constant_program
=================================================================
0: 0501000d00c01200 device_load 0, i32, x, r0, u0_u1, 0, signed
8: 3800 wait 0
a: e2054fecc44e mov_imm r1.cache, 1321528399
10: 9e03c0222c000000 imadd r0_r1.cache, r0.discard, r1.discard, 0
18: 2e8100202c020000 bfeil r0, 0, r1.discard, 2
20: c500403d00803000 uniform_store 2, i16, xy, 0, r0l_r0h, 4
28: 8800 stop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment