;;;; -*- mode: ixp -*-
;;;
;;; Utilities for the Intel IXP1200
;;; Princeton University
;;; Scott Karlin, Tammo Spalink, and Yitzchak Gottlieb
;;;
;;; Copyright Princeton University Board of Trustees
;;; All rights reserved
;;;
;;; This file contains the register allocations when using RegAlloc
;;;


#ifndef REGS_HEADER
#define REGS_HEADER

#macro regs_packet
        .areg d00       4       ; rcv.uc: 133
        .areg d02       5
        .areg d08       6
        .areg d09       7
        .areg d12       8
        .areg d14       9
        .areg d15       10

        .breg d01       2       ; rcv.uc: 126
        .breg d03       3
        .breg d04       4
        .breg d05       5
        .breg d06       6
        .breg d07       7
        .breg d10       8
        .breg d11       9
        .breg d13       10
#endm

#macro regs_srcPort_and_nextTid
        .areg srcPid    1       ; rcv.uc:  24
        .areg nextTid   2
#endm

#macro regs_pfState_and_pfAddr
        .breg pfState   0       ; rcv.uc:  80
        .breg pfAddr    1       ; rcv.uc:  81
#endm

#macro regs_vrpResult
        .areg vrpResult 3       ; rcv.uc: 129
#endm

#macro regs_IPhashValue_funcAndData
        .areg IPhashValue 11    ; vrp.uc: 169
        .breg funcAndData 11    ; vrp.uc: 169
                                ; Dont forget to change config.h
#endm

#macro regs_state
        .areg tid       0       ; stdlabels.uc
        regs_srcPort_and_nextTid
        regs_pfState_and_pfAddr
        regs_vrpResult
        regs_IPhashValue_funcAndData
#endm

#endif
