Annotation of qemu/roms/SLOF/lib/libhvcall/hvcall.S, revision 1.1.1.2

1.1       root        1: #define _ASM
                      2: #define __ASSEMBLY__
                      3: #include "macros.h"
                      4: #include "libhvcall.h"
                      5:        
                      6: #define HVCALL                 .long 0x44000022
                      7:        
                      8:        .text
                      9:        .align  3
                     10: 
                     11: ENTRY(hv_generic)
                     12:        HVCALL
                     13:        blr
                     14: 
1.1.1.2 ! root       15: /* r3 = char, r4 = hvtermno */
1.1       root       16: ENTRY(hv_putchar)
                     17:        sldi    r6,r3,(24+32)
                     18:        li      r3,H_PUT_TERM_CHAR
                     19:        li      r5,1
                     20:        HVCALL
                     21:        blr
                     22: 
1.1.1.2 ! root       23: /* r3 = hvtermno */
1.1       root       24: ENTRY(hv_getchar)
                     25:        mflr    r10
                     26:        bl      .hv_haschar
                     27:        mtlr    r10
                     28:        cmpwi   cr0,r3,0
                     29:        beqlr
                     30:        lis     r9,inbuf@h
                     31:        ori     r9,r9,inbuf@l
                     32:        lwz     r4,20(r9)
                     33:        lbzx    r3,r4,r9
                     34:        addi    r4,r4,1
                     35:        stw     r4,20(r9)
                     36:        blr
                     37: 
1.1.1.2 ! root       38: /* r3 = hvtermno */
1.1       root       39: ENTRY(hv_haschar)
1.1.1.2 ! root       40:        mr      r4,r3
1.1       root       41:        li      r3,-1
                     42:        lis     r9,inbuf@h
                     43:        ori     r9,r9,inbuf@l
                     44:        lwz     r5,16(r9)
                     45:        lwz     r6,20(r9)
                     46:        cmplw   cr0,r5,r6
                     47:        bnelr
                     48:        li      r3,H_GET_TERM_CHAR
                     49:        HVCALL
                     50:        lis     r9,inbuf@h
                     51:        ori     r9,r9,inbuf@l
                     52:        stw     r4,16(r9)
                     53:        li      r3,0
                     54:        stw     r3,20(r9)
                     55:        cmplwi  cr0,r4,0
                     56:        beqlr
                     57:        li      r3,-1
                     58:        std     r5,0(r9)
                     59:        std     r6,8(r9)
                     60:        blr
                     61: 
                     62: ENTRY(hv_send_crq)
                     63:        ld      r5,0(r4)
                     64:        ld      r6,8(r4)
                     65:        mr      r4,r3
                     66:        li      r3,H_SEND_CRQ
                     67:        HVCALL
                     68:        blr
                     69: 
                     70: ENTRY(hv_send_logical_lan)
                     71:        li      r11,0   /* no continue token for now */
                     72:        mr      r10,r9
                     73:        mr      r9,r8
                     74:        mr      r8,r7
                     75:        mr      r7,r6
                     76:        mr      r6,r5
                     77:        mr      r5,r4
                     78:        mr      r4,r3
                     79:        li      r3,H_SEND_LOGICAL_LAN
                     80:        HVCALL
                     81:        blr
                     82: 
1.1.1.2 ! root       83: ENTRY(hv_logical_ci_load)
        !            84:        mr      r5,r4
        !            85:        mr      r4,r3
        !            86:        li      r3,H_LOGICAL_CI_LOAD
        !            87:        HVCALL
        !            88:        cmpdi   cr0,r3,0
        !            89:        mr      r3,r4
        !            90:        beqlr
        !            91:        li      r3,-1
        !            92:        blr
        !            93: 
        !            94: ENTRY(hv_logical_ci_store)
        !            95:        mr      r6,r5
        !            96:        mr      r5,r4
        !            97:        mr      r4,r3
        !            98:        li      r3,H_LOGICAL_CI_STORE
        !            99:        HVCALL
        !           100:        blr
        !           101: 
1.1       root      102:        .section ".bss"
1.1.1.2 ! root      103: inbuf: .space  16
1.1       root      104: inlen: .space  4
                    105: inpos: .space  4
                    106:        .text

unix.superglobalmegacorp.com

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