Annotation of qemu/roms/SLOF/lib/libhvcall/hvcall.code, revision 1.1.1.1

1.1       root        1: /******************************************************************************
                      2:  * Copyright (c) 2004, 2008 IBM Corporation
                      3:  * All rights reserved.
                      4:  * This program and the accompanying materials
                      5:  * are made available under the terms of the BSD License
                      6:  * which accompanies this distribution, and is available at
                      7:  * http://www.opensource.org/licenses/bsd-license.php
                      8:  *
                      9:  * Contributors:
                     10:  *     IBM Corporation - initial implementation
                     11:  *****************************************************************************/
                     12: #include <libhvcall.h>
                     13: 
                     14: // : hv-putchar ( char -- )
                     15: PRIM(hv_X2d_putchar)
                     16:        char c = TOS.n; POP;
                     17:        hv_putchar(c);
                     18: MIRP
                     19: 
                     20: // : hv-getchar ( -- char )
                     21: PRIM(hv_X2d_getchar)
                     22:        PUSH;
                     23:        TOS.n = hv_getchar();
                     24: MIRP
                     25: 
                     26: // : hv-haschar ( -- res )
                     27: PRIM(hv_X2d_haschar)
                     28:        PUSH;
                     29:        TOS.n = hv_haschar();
                     30: MIRP
                     31: 
                     32: // : hv-reg-crq ( unit qaddr qsize -- res )
                     33: PRIM(hv_X2d_reg_X2d_crq)
                     34:        unsigned long qsize = TOS.u; POP;
                     35:        unsigned long qaddr = TOS.u; POP;
                     36:        unsigned int unit = TOS.u;
                     37:        TOS.n = hv_reg_crq(unit, qaddr, qsize);
                     38: MIRP
                     39: 
                     40: // : hv-free-crq ( unit -- )
                     41: PRIM(hv_X2d_free_X2d_crq)
                     42:        unsigned int unit = TOS.u; POP;
                     43:        hv_free_crq(unit);
                     44: MIRP
                     45: 
                     46: // : hv-send-crq ( unit msgaddr -- rc )
                     47: PRIM(hv_X2d_send_X2d_crq)
                     48:        uint64_t *msgaddr = (uint64_t *)TOS.u; POP;
                     49:        unsigned int unit = TOS.u;
                     50:        TOS.n = hv_send_crq(unit, msgaddr);
                     51: MIRP

unix.superglobalmegacorp.com

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