genassym.c 1.09 KB
/*
 * Copyright (C) 1998 by the Board of Trustees
 *    of Leland Stanford Junior University.
 * Copyright (C) 1998 Digital Equipment Corporation
 *
 * This file is part of the SimOS distribution.
 * See LICENSE file for terms of the license.
 *
 */



/*
 * this file compiled as part of the build.
 */

#include <stdio.h>
#include <stddef.h>

#include "simtypes.h"
#include "alpha.h"

#define O(__STR, __STRUC, __FIELD) \
   printf("#define\t%s\t%ld\n", __STR, offsetof(__STRUC, __FIELD))



int main(int argc, char **argv)
{

   printf("#ifndef DELTA_ASSYM_H\n");
   printf("#define DELTA_ASSYM_H\n");

   O("PC_OFF",AlphaState,PC);
   O("REG_OFF",AlphaState,reg[0]);
   O("FPREG_OFF",AlphaState,fp[0]);
   O("FPCR_OFF",AlphaState,fpcr);
   O("NEXTCPU_OFF", AlphaState, nextCPU);
   O("COUNTDOWN_OFF",AlphaState,cycleCountDown);   

   O("LLADDR_OFF",AlphaState,llAddr);
   O("LLVALUE_OFF",AlphaState,llValue);

   O("CURIQC_OFF",AlphaState,curIQC);
   O("CURDQC_OFF",AlphaState,curDQC);
   O("CONSTANTS_OFF",AlphaState,constantsPtr);
   O("IPR_OFF",AlphaState,ipr);
   printf("#endif\n");

   return 0;
}