|
|
1.1 ! root 1: /* ! 2: * common/i386/geno.c ! 3: * Output one and two operand opcodes with their address fields. ! 4: * Used in cc1 and cc2. ! 5: * i386. ! 6: */ ! 7: ! 8: #ifdef vax ! 9: #include "INC$LIB:mch.h" ! 10: #include "INC$LIB:host.h" ! 11: #include "INC$LIB:ops.h" ! 12: #include "INC$LIB:var.h" ! 13: #include "INC$LIB:varmch.h" ! 14: #include "INC$LIB:opcode.h" ! 15: #include "INC$LIB:stream.h" ! 16: #else ! 17: #include "mch.h" ! 18: #include "host.h" ! 19: #include "ops.h" ! 20: #include "var.h" ! 21: #include "varmch.h" ! 22: #include "opcode.h" ! 23: #include "stream.h" ! 24: #endif ! 25: ! 26: extern int *genaf(); ! 27: ! 28: /* ! 29: * Bogus nachos. ! 30: * There is a lot of lint to be picked here. ! 31: * Before the i386 compiler port, ! 32: * both the machine-independent compiler base ! 33: * and the machine-dependent parts of the compiler ! 34: * implicitly assumed sizeof(int) >= sizeof(ival_t). ! 35: * Arguments to genone(), gentwo() and genaf() ! 36: * are implicitly int throughout the source. ! 37: * For the 286-based i386 cross compiler, ! 38: * sizeof(ival_t) > sizeof(int) (32 > 16), ! 39: * so information in the high word of the ival_t ! 40: * written by genaf() below is garbage. ! 41: * This should be cleaned up when time permits! ! 42: */ ! 43: ! 44: /* VARARGS. */ ! 45: genone(op) ! 46: { ! 47: bput(CODE); ! 48: bput(op); ! 49: genaf(&op + 1); ! 50: } ! 51: ! 52: /* VARARGS. */ ! 53: gentwo(op) ! 54: { ! 55: bput(CODE); ! 56: bput(op); ! 57: genaf(genaf(&op + 1)); ! 58: } ! 59: ! 60: /* VARARGS. */ ! 61: int * ! 62: genaf(mp) register int *mp; ! 63: { ! 64: register int mode; ! 65: ! 66: iput((ival_t)(mode = *mp++)); ! 67: if ((mode & A_OFFS) != 0) ! 68: iput(*((ival_t *)mp)++); ! 69: if ((mode & A_LID) != 0) ! 70: iput((ival_t)*mp++); ! 71: else if ((mode & A_GID) != 0) ! 72: sput(*((char **)mp)++); ! 73: return mp; ! 74: } ! 75: ! 76: /* end of common/i386/geno.c */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.