+
+/* Pop a register from the stack */
+
+static void
+pop_stack (regstack, regno)
+ stack regstack;
+ int regno;
+{
+ int top = regstack->top;
+
+ CLEAR_HARD_REG_BIT (regstack->reg_set, regno);
+ regstack->top--;
+ /* If regno was not at the top of stack then adjust stack */
+ if (regstack->reg [top] != regno)
+ {
+ int i;
+ for (i = regstack->top; i >= 0; i--)
+ if (regstack->reg [i] == regno)
+ {
+ int j;
+ for (j = i; j < top; j++)
+ regstack->reg [j] = regstack->reg [j + 1];
+ break;
+ }
+ }
+}