Annotation of researchv9/jerq/src/lib/j/addr.s, revision 1.1.1.1

1.1       root        1:        .text
                      2:        .def    addr;   .val    addr;   .scl    2;      .type   0144;   .endef
                      3:        .globl  addr
                      4:        .align  8
                      5: addr:
                      6:        MOVW    0(%ap),%r2              # get pointer to bitmap
                      7:        ARSH3   &5,4(%ap),%r0           # p.x >> 5
                      8:        ARSH3   &5,8(%r2),%r1           # dm->rect.origin.x >> 5
                      9:        SUBW2   %r1,%r0                 # (p.x >> 5) - (dm->rect.origin.x >> 5)
                     10:        SUBH3   10(%r2),6(%ap),%r1      # p.y - dm->rect.origin.y -> r1
                     11:        MULW2   {uword}4(%r2),%r1       # above * dm->width
                     12:        ADDW2   %r1,%r0                 # add word offsets for x and y
                     13:        ALSW3   &2,%r0,%r0              # mult by 4 to get offset in bytes -> r0
                     14:        ADDW2   0(%r2),%r0              # add Bitmap.base to offset -> r0
                     15:        RET     
                     16:        .def    addr;   .val    .;      .scl    -1;     .endef

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.