From: Alexander Monakov Date: Mon, 25 May 2015 18:07:26 +0000 (+0300) Subject: i386.h (enum reg_class): Move CLOBBERED_REGS prior to Q_REGS. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2e24efd3f49524b05dfb198cd60205a7113b10a2;p=gcc.git i386.h (enum reg_class): Move CLOBBERED_REGS prior to Q_REGS. * config/i386/i386.h (enum reg_class): Move CLOBBERED_REGS prior to Q_REGS. Expand comment. (REG_CLASS_NAMES): Ditto. (REG_CLASS_CONTENTS): Ditto. testsuite: * gcc.target/i386/pr66232-1.c: Adjust scan pattern. * gcc.target/i386/pr66232-3.c: Likewise. From-SVN: r223650 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c30a6434398..a387c80ca85 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2015-05-25 Alexander Monakov + + * config/i386/i386.h (enum reg_class): Move CLOBBERED_REGS prior to + Q_REGS. Expand comment. + (REG_CLASS_NAMES): Ditto. + (REG_CLASS_CONTENTS): Ditto. + 2015-05-25 Uros Bizjak PR target/66274 diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 40e8f834e6f..34ef343f0f5 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -1298,7 +1298,9 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); The classes must be numbered in nondecreasing order; that is, a larger-numbered class must never be contained completely - in a smaller-numbered class. + in a smaller-numbered class. This is why CLOBBERED_REGS class + is listed early, even though in 64-bit mode it contains more + registers than just %eax, %ecx, %edx. For any two classes, it is very desirable that there be another class that represents their union. @@ -1314,11 +1316,11 @@ enum reg_class NO_REGS, AREG, DREG, CREG, BREG, SIREG, DIREG, AD_REGS, /* %eax/%edx for DImode */ + CLOBBERED_REGS, /* call-clobbered integer registers */ Q_REGS, /* %eax %ebx %ecx %edx */ NON_Q_REGS, /* %esi %edi %ebp %esp */ INDEX_REGS, /* %eax %ebx %ecx %edx %esi %edi %ebp */ LEGACY_REGS, /* %eax %ebx %ecx %edx %esi %edi %ebp %esp */ - CLOBBERED_REGS, /* call-clobbered integer registers */ GENERAL_REGS, /* %eax %ebx %ecx %edx %esi %edi %ebp %esp %r8 %r9 %r10 %r11 %r12 %r13 %r14 %r15 */ FP_TOP_REG, FP_SECOND_REG, /* %st(0) %st(1) */ @@ -1375,10 +1377,10 @@ enum reg_class "AREG", "DREG", "CREG", "BREG", \ "SIREG", "DIREG", \ "AD_REGS", \ + "CLOBBERED_REGS", \ "Q_REGS", "NON_Q_REGS", \ "INDEX_REGS", \ "LEGACY_REGS", \ - "CLOBBERED_REGS", \ "GENERAL_REGS", \ "FP_TOP_REG", "FP_SECOND_REG", \ "FLOAT_REGS", \ @@ -1414,11 +1416,11 @@ enum reg_class { 0x10, 0x0, 0x0 }, /* SIREG */ \ { 0x20, 0x0, 0x0 }, /* DIREG */ \ { 0x03, 0x0, 0x0 }, /* AD_REGS */ \ + { 0x07, 0x0, 0x0 }, /* CLOBBERED_REGS */ \ { 0x0f, 0x0, 0x0 }, /* Q_REGS */ \ { 0x1100f0, 0x1fe0, 0x0 }, /* NON_Q_REGS */ \ { 0x7f, 0x1fe0, 0x0 }, /* INDEX_REGS */ \ { 0x1100ff, 0x0, 0x0 }, /* LEGACY_REGS */ \ - { 0x07, 0x0, 0x0 }, /* CLOBBERED_REGS */ \ { 0x1100ff, 0x1fe0, 0x0 }, /* GENERAL_REGS */ \ { 0x100, 0x0, 0x0 }, /* FP_TOP_REG */ \ { 0x0200, 0x0, 0x0 }, /* FP_SECOND_REG */ \ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 91fd4c55b69..a6db2a7ce8b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-05-25 Alexander Monakov + + * gcc.target/i386/pr66232-1.c: Adjust scan pattern. + * gcc.target/i386/pr66232-3.c: Likewise. + 2015-05-25 Uros Bizjak PR target/66274 diff --git a/gcc/testsuite/gcc.target/i386/pr66232-1.c b/gcc/testsuite/gcc.target/i386/pr66232-1.c index ba4a5ef5467..5ea03de09bd 100644 --- a/gcc/testsuite/gcc.target/i386/pr66232-1.c +++ b/gcc/testsuite/gcc.target/i386/pr66232-1.c @@ -10,4 +10,4 @@ foo (void) } /* { dg-final { scan-assembler "jmp\[ \t\]*.bar@GOTPCREL" { target { ! ia32 } } } } */ -/* { dg-final { scan-assembler "call\[ \t\]*.bar@GOT\\(" { target ia32 } } } */ +/* { dg-final { scan-assembler "jmp\[ \t\]*.bar@GOT\\(" { target ia32 } } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr66232-3.c b/gcc/testsuite/gcc.target/i386/pr66232-3.c index ee3176cac68..e6ba60f34aa 100644 --- a/gcc/testsuite/gcc.target/i386/pr66232-3.c +++ b/gcc/testsuite/gcc.target/i386/pr66232-3.c @@ -10,4 +10,4 @@ foo (void) } /* { dg-final { scan-assembler "jmp\[ \t\]*.bar@GOTPCREL" { target { ! ia32 } } } } */ -/* { dg-final { scan-assembler "call\[ \t\]*.bar@GOT\\(" { target ia32 } } } */ +/* { dg-final { scan-assembler "jmp\[ \t\]*.bar@GOT\\(" { target ia32 } } } */