1/* Subroutines for insn-output.c for Intel X86.
2 Copyright (C) 1988, 1992, 1994, 1995 Free Software Foundation, Inc.
3
4This file is part of GNU CC.
5
6GNU CC is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2, or (at your option)
--- 1446 unchanged lines hidden (view full) ---
1455function_prologue (file, size)
1456 FILE *file;
1457 int size;
1458{
1459 register int regno;
1460 int limit;
1461 rtx xops[4];
1462 int pic_reg_used = flag_pic && (current_function_uses_pic_offset_table
1463 || current_function_uses_const_pool
1464 || profile_flag || profile_block_flag);
1465
1466 xops[0] = stack_pointer_rtx;
1467 xops[1] = frame_pointer_rtx;
1468 xops[2] = GEN_INT (size);
1469 if (frame_pointer_needed)
1470 {
1471 output_asm_insn ("push%L1 %1", xops);
1472 output_asm_insn (AS2 (mov%L0,%0,%1), xops);
--- 44 unchanged lines hidden (view full) ---
1517
1518int
1519simple_386_epilogue ()
1520{
1521 int regno;
1522 int nregs = 0;
1523 int reglimit = (frame_pointer_needed
1524 ? FRAME_POINTER_REGNUM : STACK_POINTER_REGNUM);
1525
1526#ifdef FUNCTION_PROFILER_EPILOGUE
1527 if (profile_flag)
1528 return 0;
1529#endif
1530
1531 if (flag_pic && (current_function_uses_pic_offset_table
1532 || current_function_uses_const_pool
1533 || profile_flag || profile_block_flag))
1534 return 0;
1535
1536#ifdef NON_SAVING_SETJMP
1537 if (NON_SAVING_SETJMP && current_function_calls_setjmp)
1538 return 0;
1539#endif
1540
1541 if (! reload_completed)
1542 return 0;
1543
1544 for (regno = reglimit - 1; regno >= 0; regno--)
1545 if (regs_ever_live[regno] && ! call_used_regs[regno])
1546 nregs++;
1547
1548 return nregs == 0 || ! frame_pointer_needed;
1549}
1550
1551
1552/* This function generates the assembly code for function exit.
1553 FILE is an stdio stream to output the code to.
--- 6 unchanged lines hidden (view full) ---
1560{
1561 register int regno;
1562 register int nregs, limit;
1563 int offset;
1564 rtx xops[3];
1565 int pic_reg_used = flag_pic && (current_function_uses_pic_offset_table
1566 || current_function_uses_const_pool);
1567
1568#ifdef FUNCTION_PROFILER_EPILOGUE
1569 if (profile_flag)
1570 FUNCTION_PROFILER_EPILOGUE (file);
1571#endif
1572
1573 /* Compute the number of registers to pop */
1574
1575 limit = (frame_pointer_needed
1576 ? FRAME_POINTER_REGNUM
1577 : STACK_POINTER_REGNUM);
1578
1579 nregs = 0;
1580
--- 1678 unchanged lines hidden ---
2 Copyright (C) 1988, 1992, 1994, 1995 Free Software Foundation, Inc.
3
4This file is part of GNU CC.
5
6GNU CC is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2, or (at your option)
--- 1446 unchanged lines hidden (view full) ---
1455function_prologue (file, size)
1456 FILE *file;
1457 int size;
1458{
1459 register int regno;
1460 int limit;
1461 rtx xops[4];
1462 int pic_reg_used = flag_pic && (current_function_uses_pic_offset_table
1463 || current_function_uses_const_pool
1464 || profile_flag || profile_block_flag);
1465
1466 xops[0] = stack_pointer_rtx;
1467 xops[1] = frame_pointer_rtx;
1468 xops[2] = GEN_INT (size);
1469 if (frame_pointer_needed)
1470 {
1471 output_asm_insn ("push%L1 %1", xops);
1472 output_asm_insn (AS2 (mov%L0,%0,%1), xops);
--- 44 unchanged lines hidden (view full) ---
1517
1518int
1519simple_386_epilogue ()
1520{
1521 int regno;
1522 int nregs = 0;
1523 int reglimit = (frame_pointer_needed
1524 ? FRAME_POINTER_REGNUM : STACK_POINTER_REGNUM);
1525
1526#ifdef FUNCTION_PROFILER_EPILOGUE
1527 if (profile_flag)
1528 return 0;
1529#endif
1530
1531 if (flag_pic && (current_function_uses_pic_offset_table
1532 || current_function_uses_const_pool
1533 || profile_flag || profile_block_flag))
1534 return 0;
1535
1536#ifdef NON_SAVING_SETJMP
1537 if (NON_SAVING_SETJMP && current_function_calls_setjmp)
1538 return 0;
1539#endif
1540
1541 if (! reload_completed)
1542 return 0;
1543
1544 for (regno = reglimit - 1; regno >= 0; regno--)
1545 if (regs_ever_live[regno] && ! call_used_regs[regno])
1546 nregs++;
1547
1548 return nregs == 0 || ! frame_pointer_needed;
1549}
1550
1551
1552/* This function generates the assembly code for function exit.
1553 FILE is an stdio stream to output the code to.
--- 6 unchanged lines hidden (view full) ---
1560{
1561 register int regno;
1562 register int nregs, limit;
1563 int offset;
1564 rtx xops[3];
1565 int pic_reg_used = flag_pic && (current_function_uses_pic_offset_table
1566 || current_function_uses_const_pool);
1567
1568#ifdef FUNCTION_PROFILER_EPILOGUE
1569 if (profile_flag)
1570 FUNCTION_PROFILER_EPILOGUE (file);
1571#endif
1572
1573 /* Compute the number of registers to pop */
1574
1575 limit = (frame_pointer_needed
1576 ? FRAME_POINTER_REGNUM
1577 : STACK_POINTER_REGNUM);
1578
1579 nregs = 0;
1580
--- 1678 unchanged lines hidden ---