public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/47446] New: [x32] .quad instead of .long is used for address
@ 2011-01-24 21:16 hjl.tools at gmail dot com
  2011-01-24 21:22 ` [Bug target/47446] " hjl at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: hjl.tools at gmail dot com @ 2011-01-24 21:16 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47446

           Summary: [x32] .quad instead of .long is used for address
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: hjl.tools@gmail.com


[hjl@gnu-6 tmp]$ cat x.i
extern void abort (void);
enum
{
  __GCONV_OK = 0,
  __GCONV_NOCONV,
  __GCONV_NODB,
  __GCONV_NOMEM,
  __GCONV_EMPTY_INPUT,
  __GCONV_FULL_OUTPUT,
  __GCONV_ILLEGAL_INPUT,
  __GCONV_INCOMPLETE_INPUT,
  __GCONV_ILLEGAL_DESCRIPTOR,
  __GCONV_INTERNAL_ERROR
};
int
foo (int result)
{
  int irreversible = 0;
  switch (result)
    {
    case __GCONV_ILLEGAL_INPUT:
      irreversible = -1L;
      break;
    case __GCONV_FULL_OUTPUT:
      irreversible = -2L;
      break;
    case __GCONV_INCOMPLETE_INPUT:
      irreversible = -3L;
      break;
    case __GCONV_EMPTY_INPUT:
    case __GCONV_OK:
      break;
    default:
      abort ();
    }
  return irreversible;
}
[hjl@gnu-6 tmp]$ /export/build/gnu/gcc-x32/release/usr/gcc-4.6.0-x32/bin/gcc
-mx32 -O -c x.i
/tmp/ccjRzjne.s: Assembler messages:
/tmp/ccjRzjne.s:19: Error: cannot represent relocation type BFD_RELOC_64 in x32
mode
/tmp/ccjRzjne.s:20: Error: cannot represent relocation type BFD_RELOC_64 in x32
mode
/tmp/ccjRzjne.s:21: Error: cannot represent relocation type BFD_RELOC_64 in x32
mode
/tmp/ccjRzjne.s:22: Error: cannot represent relocation type BFD_RELOC_64 in x32
mode
/tmp/ccjRzjne.s:23: Error: cannot represent relocation type BFD_RELOC_64 in x32
mode
/tmp/ccjRzjne.s:24: Error: cannot represent relocation type BFD_RELOC_64 in x32
mode
/tmp/ccjRzjne.s:25: Error: cannot represent relocation type BFD_RELOC_64 in x32
mode
/tmp/ccjRzjne.s:26: Error: cannot represent relocation type BFD_RELOC_64 in x32
mode
[hjl@gnu-6 tmp]$


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/47446] [x32] .quad instead of .long is used for address
  2011-01-24 21:16 [Bug target/47446] New: [x32] .quad instead of .long is used for address hjl.tools at gmail dot com
@ 2011-01-24 21:22 ` hjl at gcc dot gnu.org
  2011-01-25 22:31 ` hjl.tools at gmail dot com
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: hjl at gcc dot gnu.org @ 2011-01-24 21:22 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47446

--- Comment #1 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> 2011-01-24 21:07:49 UTC ---
Author: hjl
Date: Mon Jan 24 21:07:47 2011
New Revision: 169182

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=169182
Log:
heck TARGET_LP64 instead of TARGET_64BIT for ASM_QUAD.

gcc/

2011-01-24  H.J. Lu  <hongjiu.lu@intel.com>

    PR target/47446
    * config/i386/i386.c (ix86_output_addr_vec_elt): Check
    TARGET_LP64 instead of TARGET_64BIT for ASM_QUAD.
    (ix86_output_addr_diff_elt): Likewise.

gcc/testsuite/

2011-01-24  H.J. Lu  <hongjiu.lu@intel.com>

    PR target/47446
    * gcc.target/i386/pr47446-1.c: New.

Added:
    branches/x32/gcc/testsuite/gcc.target/i386/pr47446-1.c
Modified:
    branches/x32/gcc/ChangeLog.x32
    branches/x32/gcc/config/i386/i386.c
    branches/x32/gcc/testsuite/ChangeLog.x32


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/47446] [x32] .quad instead of .long is used for address
  2011-01-24 21:16 [Bug target/47446] New: [x32] .quad instead of .long is used for address hjl.tools at gmail dot com
  2011-01-24 21:22 ` [Bug target/47446] " hjl at gcc dot gnu.org
@ 2011-01-25 22:31 ` hjl.tools at gmail dot com
  2011-01-25 22:33 ` hjl at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: hjl.tools at gmail dot com @ 2011-01-25 22:31 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47446

--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> 2011-01-25 21:53:55 UTC ---
The same testcase failed with -fPIC:

[hjl@gnu-6 ilp32-18]$ /export/build/gnu/gcc-x32/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc-x32/build-x86_64-linux/gcc/ -mx32 -O -fPIC -dp     -c
-o x.o x.i
/tmp/ccnSNxF1.s: Assembler messages:
/tmp/ccnSNxF1.s:21: Error: invalid sections for operation on `L0\x01' and `.L3'
/tmp/ccnSNxF1.s:22: Error: invalid sections for operation on `L0\x01' and `.L2'
/tmp/ccnSNxF1.s:23: Error: invalid sections for operation on `L0\x01' and `.L2'
/tmp/ccnSNxF1.s:24: Error: invalid sections for operation on `L0\x01' and `.L2'
/tmp/ccnSNxF1.s:25: Error: invalid sections for operation on `L0\x01' and `.L3'
/tmp/ccnSNxF1.s:26: Error: invalid sections for operation on `L0\x01' and `.L4'
/tmp/ccnSNxF1.s:27: Error: invalid sections for operation on `L0\x01' and `.L8'
/tmp/ccnSNxF1.s:28: Error: invalid sections for operation on `L0\x01' and `.L6'
[hjl@gnu-6 ilp32-18]$


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/47446] [x32] .quad instead of .long is used for address
  2011-01-24 21:16 [Bug target/47446] New: [x32] .quad instead of .long is used for address hjl.tools at gmail dot com
  2011-01-24 21:22 ` [Bug target/47446] " hjl at gcc dot gnu.org
  2011-01-25 22:31 ` hjl.tools at gmail dot com
@ 2011-01-25 22:33 ` hjl at gcc dot gnu.org
  2011-03-11 21:24 ` hjl.tools at gmail dot com
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: hjl at gcc dot gnu.org @ 2011-01-25 22:33 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47446

--- Comment #3 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> 2011-01-25 22:05:19 UTC ---
Author: hjl
Date: Tue Jan 25 22:05:16 2011
New Revision: 169258

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=169258
Log:
Put back the last TARGET_64BIT check in ix86_output_addr_vec_elt.

gcc/

2011-01-25  H.J. Lu  <hongjiu.lu@intel.com>

    PR target/47446
    * config/i386/i386.c (ix86_output_addr_vec_elt): Put back the
    last TARGET_64BIT check.

gcc/testsuite/

2011-01-25  H.J. Lu  <hongjiu.lu@intel.com>

    PR target/47446
    * gcc.target/i386/pr47446-2.c: New.

Added:
    branches/x32/gcc/testsuite/gcc.target/i386/pr47446-2.c
Modified:
    branches/x32/gcc/ChangeLog.x32
    branches/x32/gcc/config/i386/i386.c
    branches/x32/gcc/testsuite/ChangeLog.x32


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/47446] [x32] .quad instead of .long is used for address
  2011-01-24 21:16 [Bug target/47446] New: [x32] .quad instead of .long is used for address hjl.tools at gmail dot com
                   ` (2 preceding siblings ...)
  2011-01-25 22:33 ` hjl at gcc dot gnu.org
@ 2011-03-11 21:24 ` hjl.tools at gmail dot com
  2011-03-11 23:13 ` hjl at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: hjl.tools at gmail dot com @ 2011-03-11 21:24 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47446

--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> 2011-03-11 21:24:44 UTC ---
Another one:

/usr/gcc-4.6.0-x32/bin/gcc -S -o x.s -mx32 -funroll-all-loops -O3 -dp  x.i
/usr/gcc-4.6.0-x32/bin/gcc -mx32 -funroll-all-loops -O3 -dp  -c -o x.o x.s
x.s: Assembler messages:
x.s:25: Error: cannot represent relocation type BFD_RELOC_64 in x32 mode
make: *** [x.o] Error 1
gnu-6:pts/3[86]> bash                                       ~/bugs/gcc/ilp32-30
[hjl@gnu-6 ilp32-30]$ cat x.i
extern char inbuf[];
extern char outbuf[];
extern unsigned insize;
extern unsigned inptr;
static int max_len;
static int peek_bits;
void build_tree() {
  int len;
  char *prefixp;
  max_len = inbuf[inptr++];
  peek_bits = ((max_len) <= (12) ? (max_len) : (12));
  prefixp = &outbuf[1<<peek_bits];
  for (len = 1;
       len <= peek_bits;
       len++) {
  }
  while (prefixp > outbuf) *--prefixp = 0;
}
[hjl@gnu-6 ilp32-30]$ make
/usr/gcc-4.6.0-x32/bin/gcc -mx32 -funroll-all-loops -O3 -dp  -c -o x.o x.s
x.s: Assembler messages:
x.s:25: Error: cannot represent relocation type BFD_RELOC_64 in x32 mode
make: *** [x.o] Error 1
[hjl@gnu-6 ilp32-30]$


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/47446] [x32] .quad instead of .long is used for address
  2011-01-24 21:16 [Bug target/47446] New: [x32] .quad instead of .long is used for address hjl.tools at gmail dot com
                   ` (3 preceding siblings ...)
  2011-03-11 21:24 ` hjl.tools at gmail dot com
@ 2011-03-11 23:13 ` hjl at gcc dot gnu.org
  2011-07-26 14:33 ` hjl.tools at gmail dot com
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: hjl at gcc dot gnu.org @ 2011-03-11 23:13 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47446

--- Comment #5 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> 2011-03-11 23:13:38 UTC ---
Author: hjl
Date: Fri Mar 11 23:13:35 2011
New Revision: 170889

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170889
Log:
Always allow the offsetted memory references for TARGET_X32.

gcc/

2011-03-11  H.J. Lu  <hongjiu.lu@intel.com>

    PR target/47446
    * config/i386/i386.md (*movdi_internal_rex64): Only allow moving
    integer constants into 64bit registers for TARGET_X32.

gcc/testsuite/

2011-03-11  H.J. Lu  <hongjiu.lu@intel.com>

    PR target/47446
    * gcc.target/i386/pr47446-3.c: New.

Added:
    branches/x32/gcc/testsuite/gcc.target/i386/pr47446-3.c
Modified:
    branches/x32/gcc/ChangeLog.x32
    branches/x32/gcc/config/i386/i386.md
    branches/x32/gcc/config/i386/predicates.md
    branches/x32/gcc/testsuite/ChangeLog.x32


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/47446] [x32] .quad instead of .long is used for address
  2011-01-24 21:16 [Bug target/47446] New: [x32] .quad instead of .long is used for address hjl.tools at gmail dot com
                   ` (4 preceding siblings ...)
  2011-03-11 23:13 ` hjl at gcc dot gnu.org
@ 2011-07-26 14:33 ` hjl.tools at gmail dot com
  2011-07-27  4:20 ` hjl.tools at gmail dot com
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: hjl.tools at gmail dot com @ 2011-07-26 14:33 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47446

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.7.0

--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> 2011-07-26 14:33:34 UTC ---
Fixed by:

http://gcc.gnu.org/ml/gcc-cvs/2011-07/msg00806.html


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/47446] [x32] .quad instead of .long is used for address
  2011-01-24 21:16 [Bug target/47446] New: [x32] .quad instead of .long is used for address hjl.tools at gmail dot com
                   ` (5 preceding siblings ...)
  2011-07-26 14:33 ` hjl.tools at gmail dot com
@ 2011-07-27  4:20 ` hjl.tools at gmail dot com
  2011-07-27  4:24 ` hjl.tools at gmail dot com
  2011-08-06 14:37 ` hjl at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: hjl.tools at gmail dot com @ 2011-07-27  4:20 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47446

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
   Last reconfirmed|                            |2011.07.27 04:19:39
         Resolution|FIXED                       |
     Ever Confirmed|0                           |1

--- Comment #7 from H.J. Lu <hjl.tools at gmail dot com> 2011-07-27 04:19:39 UTC ---
Testcase in comment #4 isn't fixed yet.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/47446] [x32] .quad instead of .long is used for address
  2011-01-24 21:16 [Bug target/47446] New: [x32] .quad instead of .long is used for address hjl.tools at gmail dot com
                   ` (6 preceding siblings ...)
  2011-07-27  4:20 ` hjl.tools at gmail dot com
@ 2011-07-27  4:24 ` hjl.tools at gmail dot com
  2011-08-06 14:37 ` hjl at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: hjl.tools at gmail dot com @ 2011-07-27  4:24 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47446

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #8 from H.J. Lu <hjl.tools at gmail dot com> 2011-07-27 04:24:20 UTC ---
Fixed.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/47446] [x32] .quad instead of .long is used for address
  2011-01-24 21:16 [Bug target/47446] New: [x32] .quad instead of .long is used for address hjl.tools at gmail dot com
                   ` (7 preceding siblings ...)
  2011-07-27  4:24 ` hjl.tools at gmail dot com
@ 2011-08-06 14:37 ` hjl at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: hjl at gcc dot gnu.org @ 2011-08-06 14:37 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47446

--- Comment #9 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> 2011-08-06 14:36:55 UTC ---
Author: hjl
Date: Sat Aug  6 14:36:52 2011
New Revision: 177512

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=177512
Log:
Add testcases for PRs 47449/47446.

2011-08-06  H.J. Lu  <hongjiu.lu@intel.com>

    PR middle-end/47449
    * gcc.target/i386/pr47449.c: New.

    PR target/47446
    * gcc.dg/pr47446-1.c: New.
    * gcc.dg/pr47446-2.c: Likewise.

Added:
    trunk/gcc/testsuite/gcc.dg/pr47446-1.c
    trunk/gcc/testsuite/gcc.dg/pr47446-2.c
    trunk/gcc/testsuite/gcc.target/i386/pr47449.c
Modified:
    trunk/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-08-06 14:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-24 21:16 [Bug target/47446] New: [x32] .quad instead of .long is used for address hjl.tools at gmail dot com
2011-01-24 21:22 ` [Bug target/47446] " hjl at gcc dot gnu.org
2011-01-25 22:31 ` hjl.tools at gmail dot com
2011-01-25 22:33 ` hjl at gcc dot gnu.org
2011-03-11 21:24 ` hjl.tools at gmail dot com
2011-03-11 23:13 ` hjl at gcc dot gnu.org
2011-07-26 14:33 ` hjl.tools at gmail dot com
2011-07-27  4:20 ` hjl.tools at gmail dot com
2011-07-27  4:24 ` hjl.tools at gmail dot com
2011-08-06 14:37 ` hjl at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).