Zig 0.17.0-dev (Split by item)

This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.

__hexagon_udivdi3

hexagon.__hexagon_udivdi3
fn __hexagon_udivdi3() callconv(.naked) noreturn

File

lib/compiler_rt/hexagon.zig:301

Code

fn __hexagon_udivdi3() callconv(.naked) noreturn {
    asm volatile (
        \\ {
        \\   r6 = cl0(r1:0)
        \\   r7 = cl0(r3:2)
        \\   r5:4 = r3:2
        \\   r3:2 = r1:0
        \\  }
        \\  {
        \\   r10 = sub(r7,r6)
        \\   r1:0 = #0
        \\   r15:14 = #1
        \\  }
        \\  {
        \\   r11 = add(r10,#1)
        \\   r13:12 = lsl(r5:4,r10)
        \\   r15:14 = lsl(r15:14,r10)
        \\  }
        \\  {
        \\   p0 = cmp.gtu(r5:4,r3:2)
        \\   loop0(1f,r11)
        \\  }
        \\  {
        \\   if (p0) jumpr r31
        \\  }
        \\  .falign
        \\ 1:
        \\  {
        \\   p0 = cmp.gtu(r13:12,r3:2)
        \\  }
        \\  {
        \\   r7:6 = sub(r3:2, r13:12)
        \\   r9:8 = add(r1:0, r15:14)
        \\  }
        \\  {
        \\   r1:0 = vmux(p0, r1:0, r9:8)
        \\   r3:2 = vmux(p0, r3:2, r7:6)
        \\  }
        \\  {
        \\   r15:14 = lsr(r15:14, #1)
        \\   r13:12 = lsr(r13:12, #1)
        \\  }:endloop0
        \\  {
        \\   jumpr r31
        \\  }
    );
}