mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-24 06:18:59 +08:00
regclass.c (globalize_reg): Update regs_invalidated_by_call.
* regclass.c (globalize_reg): Update regs_invalidated_by_call. * gcc.dg/20020616-1.c: New. From-SVN: r54681
This commit is contained in:
parent
548ce8be4a
commit
caecc0998a
@ -1,14 +1,19 @@
|
||||
2002-06-16 Richard Henderson <rth@redhat.com>
|
||||
|
||||
PR opt/6722
|
||||
* regclass.c (globalize_reg): Update regs_invalidated_by_call.
|
||||
|
||||
2002-06-16 Neil Booth <neil@daikokuya.demon.co.uk>
|
||||
|
||||
* config.gcc: Add an i386/sysv4-cpp.h. Remove i386-aout.h from
|
||||
vxworks.
|
||||
config/i386:
|
||||
* i386-aout.h, i386elf.h, sysv4.h: Remove CPP_PREDEFINES.
|
||||
* linux64.h: Use TARGET_OS_CPP_BUILTINS rather than
|
||||
* config.gcc: Add i386/sysv4-cpp.h; remove i386-aout.h from vxworks.
|
||||
* config/i386/i386-aout.h, config/i386/i386elf.h,
|
||||
config/i386/sysv4.h: Remove CPP_PREDEFINES.
|
||||
* config/i386/linux64.h, config/i386/i386elf.h, config/i386/mach.h,
|
||||
config/i386/netware.h, config/i386/rtemself.h, config/i386/sco5.h,
|
||||
config/i386/sol2.h, config/i386/vsta.h, config/i386/vxi386.h,
|
||||
config/i386/win32.h: Use TARGET_OS_CPP_BUILTINS rather than
|
||||
CPP_PREDEFINES and part of CPP_SPEC.
|
||||
i386elf.h, mach.h, netware.h, rtemself.h, sco5.h, sol2.h,
|
||||
vsta.h, vxi386.h, win32.h: Similarly.
|
||||
* sysv4-cpp.h: New.
|
||||
* config/i386/sysv4-cpp.h: New.
|
||||
|
||||
2002-06-16 Richard Henderson <rth@redhat.com>
|
||||
|
||||
|
@ -824,6 +824,7 @@ globalize_reg (i)
|
||||
SET_HARD_REG_BIT (fixed_reg_set, i);
|
||||
SET_HARD_REG_BIT (call_used_reg_set, i);
|
||||
SET_HARD_REG_BIT (call_fixed_reg_set, i);
|
||||
SET_HARD_REG_BIT (regs_invalidated_by_call, i);
|
||||
}
|
||||
|
||||
/* Now the data and code for the `regclass' pass, which happens
|
||||
|
29
gcc/testsuite/gcc.dg/20020616-1.c
Normal file
29
gcc/testsuite/gcc.dg/20020616-1.c
Normal file
@ -0,0 +1,29 @@
|
||||
/* PR opt/6722 */
|
||||
/* { dg-do run { target i?86-*-* } } */
|
||||
/* { dg-options "-O2" } */
|
||||
|
||||
register int k asm("%ebx");
|
||||
|
||||
void __attribute__((noinline))
|
||||
foo()
|
||||
{
|
||||
k = 1;
|
||||
}
|
||||
|
||||
void test()
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < 10; i += k)
|
||||
{
|
||||
k = 0;
|
||||
foo();
|
||||
}
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
int old = k;
|
||||
test();
|
||||
k = old;
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user