1*29646Ssam /* align.c 1.1 86/07/20 */ 2*29646Ssam 3*29646Ssam #include "../tahoealign/align.h" 4*29646Ssam 5*29646Ssam /* 6*29646Ssam * Part of the parameter list is set up by locore.s. 7*29646Ssam * First 2 dummy variables MUST BE the first local 8*29646Ssam * variables; leaving place for registers 0 and 1 9*29646Ssam * which are not preserved by the current C compiler. 10*29646Ssam * Then, the array of structures and the last_operand 11*29646Ssam * HAVE to be in the given order, to correspond to the 12*29646Ssam * description of process_info in 'alignment.h'. 13*29646Ssam */ 14*29646Ssam alignment() 15*29646Ssam { 16*29646Ssam long space_4_Register_1; /* register 1 */ 17*29646Ssam long space_4_Register_0; /* register 0 */ 18*29646Ssam struct oprnd space_4_decoded[4]; 19*29646Ssam long space_4_opcode; 20*29646Ssam long space_4_last_operand; /* Last operand # processed */ 21*29646Ssam long space_4_saved_pc; 22*29646Ssam long space_4_saved_sp; 23*29646Ssam 24*29646Ssam register process_info *infop; 25*29646Ssam 26*29646Ssam infop = (process_info *)&space_4_saved_sp; 27*29646Ssam saved_pc = pc; 28*29646Ssam saved_sp = sp; /* For possible exceptions */ 29*29646Ssam 30*29646Ssam last_operand = -1; /* To get the operand routine going correctly */ 31*29646Ssam 32*29646Ssam opCODE = 0xff & *(char *)pc; 33*29646Ssam pc++; 34*29646Ssam (*Table[opCODE].routine) (infop); /* Call relevant handler */ 35*29646Ssam /* 36*29646Ssam * NOTE: nothing should follow, except the return. 37*29646Ssam * The register variables cannot be trusted anymore, 38*29646Ssam * if an exception is signalled. See 'exception.c' 39*29646Ssam * to understand why. 40*29646Ssam */ 41*29646Ssam } 42