This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PR target/16888] clear reg names of unavailable regs
James E Wilson wrote:
I was going to suggest that the patch was wrong, because you don't
handle ADDITIONAL_REGISTER_NAMES, then I realized that macro is broken.
And I see the HI_REGISTER_NAMES comment is missing some punctuation.
And here is the patch to fix the problems I spotted while reviewing
Alex's patch.
This has been tested with an x86-linux C only bootstrap and make check,
there were no regressions. I also tested this by hand against a
testcase using a global register varible with an mmx register name,
stepping through cc1 with gdb, to verify that the mmx
ADDITIONAL_REGISTER_NAMES entries were useless.
I have added this to mainline.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com
2005-04-28 James E Wilson <wilson@specifixinc.com>
* config/i386/i386.h (HI_REGISTER_NAMES): Fix typos in comment.
(ADDITIONAL_REGISTER_NAMES): Delete obsolete mmx register entries.
Index: i386.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.h,v
retrieving revision 1.429
diff -p -p -r1.429 i386.h
*** i386.h 21 Apr 2005 07:35:01 -0000 1.429
--- i386.h 28 Apr 2005 23:14:28 -0000
*************** do { \
*** 1949,1955 ****
/* How to refer to registers in assembler output.
This sequence is indexed by compiler's hard-register-number (see above). */
! /* In order to refer to the first 8 regs as 32 bit regs prefix an "e"
For non floating point regs, the following are the HImode names.
For float regs, the stack top is sometimes referred to as "%st(0)"
--- 1949,1955 ----
/* How to refer to registers in assembler output.
This sequence is indexed by compiler's hard-register-number (see above). */
! /* In order to refer to the first 8 regs as 32 bit regs, prefix an "e".
For non floating point regs, the following are the HImode names.
For float regs, the stack top is sometimes referred to as "%st(0)"
*************** do { \
*** 1974,1982 ****
{ "rax", 0 }, { "rdx", 1 }, { "rcx", 2 }, { "rbx", 3 }, \
{ "rsi", 4 }, { "rdi", 5 }, { "rbp", 6 }, { "rsp", 7 }, \
{ "al", 0 }, { "dl", 1 }, { "cl", 2 }, { "bl", 3 }, \
! { "ah", 0 }, { "dh", 1 }, { "ch", 2 }, { "bh", 3 }, \
! { "mm0", 8}, { "mm1", 9}, { "mm2", 10}, { "mm3", 11}, \
! { "mm4", 12}, { "mm5", 13}, { "mm6", 14}, { "mm7", 15} }
/* Note we are omitting these since currently I don't know how
to get gcc to use these, since they want the same but different
--- 1974,1980 ----
{ "rax", 0 }, { "rdx", 1 }, { "rcx", 2 }, { "rbx", 3 }, \
{ "rsi", 4 }, { "rdi", 5 }, { "rbp", 6 }, { "rsp", 7 }, \
{ "al", 0 }, { "dl", 1 }, { "cl", 2 }, { "bl", 3 }, \
! { "ah", 0 }, { "dh", 1 }, { "ch", 2 }, { "bh", 3 } }
/* Note we are omitting these since currently I don't know how
to get gcc to use these, since they want the same but different