public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/18404] New: unnecessary sll when -mint64
@ 2004-11-09 15:56 fshvaige at cisco dot com
  2004-11-09 15:57 ` [Bug target/18404] unnecessary sll when -mint64 (MIPS) fshvaige at cisco dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: fshvaige at cisco dot com @ 2004-11-09 15:56 UTC (permalink / raw)
  To: gcc-bugs

Configured with:
--target=mips-elf --program-suffix=.mips --with-newlib --without-headers
--enable-languages=c,c++,objc -v

Thread model: single
gcc version 3.4.2

File /tmp/gcctest_01.c:

typedef signed char t_SI __attribute__ ((__mode__(SI)));

t_SI inc_SI (t_SI v) {
    return ++v;
}

Command line:
gcc.mips -S -O2 -march=sb1 -mabi=64 -o /tmp/gcctest_01.s /tmp/gcctest_01.c

Result file gcctest_01.s:

        .file   1 "gcctest_01.c"
        .section .mdebug.abi64
        .previous
        .text
        .align  2
        .align  3
        .globl  inc_SI
        .ent    inc_SI
inc_SI:
        .frame  $sp,0,$31               # vars= 0, regs= 0/0, args= 0, gp= 0
        .mask   0x00000000,0
        .fmask  0x00000000,0
        .set    noreorder
        .set    nomacro
        j       $31
        addiu   $2,$4,1
        .set    macro
        .set    reorder

        .end    inc_SI

Command line:
gcc.mips -S -O2 -march=sb1 -mabi=64 -mint64 -o /tmp/gcctest_01.s /tmp/gcctest_01.c

Result file gcctest_01.s:

        .file   1 "gcctest_01.c"
        .section .mdebug.abi64
        .previous
        .text
        .align  2
        .align  3
        .globl  inc_SI
        .ent    inc_SI
inc_SI:
        .frame  $sp,0,$31               # vars= 0, regs= 0/0, args= 0, gp= 0
        .mask   0x00000000,0
        .fmask  0x00000000,0
        sll     $2,$4,0
        .set    noreorder
        .set    nomacro
        j       $31
        addiu   $2,$2,1
        .set    macro
        .set    reorder

        .end    inc_SI

Question: what is this "sll $2,$4,0" good for or why it absent in first result
(without -mint64) ?

-- 
           Summary: unnecessary sll when -mint64
           Product: gcc
           Version: 3.4.2
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: fshvaige at cisco dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: mips-unknown-elf


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


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

* [Bug target/18404] unnecessary sll when -mint64 (MIPS)
  2004-11-09 15:56 [Bug target/18404] New: unnecessary sll when -mint64 fshvaige at cisco dot com
@ 2004-11-09 15:57 ` fshvaige at cisco dot com
  2004-11-12  3:34 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: fshvaige at cisco dot com @ 2004-11-09 15:57 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|unnecessary sll when -mint64|unnecessary sll when -mint64
                   |                            |(MIPS)


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


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

* [Bug target/18404] unnecessary sll when -mint64 (MIPS)
  2004-11-09 15:56 [Bug target/18404] New: unnecessary sll when -mint64 fshvaige at cisco dot com
  2004-11-09 15:57 ` [Bug target/18404] unnecessary sll when -mint64 (MIPS) fshvaige at cisco dot com
@ 2004-11-12  3:34 ` pinskia at gcc dot gnu dot org
  2004-11-12  3:55 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-12  3:34 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-11-12 03:34 -------
Note we reject the code as we consider SI mode not able to emulate  with -mint64. 

-- 


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


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

* [Bug target/18404] unnecessary sll when -mint64 (MIPS)
  2004-11-09 15:56 [Bug target/18404] New: unnecessary sll when -mint64 fshvaige at cisco dot com
  2004-11-09 15:57 ` [Bug target/18404] unnecessary sll when -mint64 (MIPS) fshvaige at cisco dot com
  2004-11-12  3:34 ` pinskia at gcc dot gnu dot org
@ 2004-11-12  3:55 ` pinskia at gcc dot gnu dot org
  2004-12-01 20:04 ` echristo at redhat dot com
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-12  3:55 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-11-12 03:55 -------
I filed PR 18442 for that regression.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |18442


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


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

* [Bug target/18404] unnecessary sll when -mint64 (MIPS)
  2004-11-09 15:56 [Bug target/18404] New: unnecessary sll when -mint64 fshvaige at cisco dot com
                   ` (2 preceding siblings ...)
  2004-11-12  3:55 ` pinskia at gcc dot gnu dot org
@ 2004-12-01 20:04 ` echristo at redhat dot com
  2004-12-07 22:21 ` echristo at redhat dot com
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: echristo at redhat dot com @ 2004-12-01 20:04 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-12-01 20:02:16
               date|                            |


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


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

* [Bug target/18404] unnecessary sll when -mint64 (MIPS)
  2004-11-09 15:56 [Bug target/18404] New: unnecessary sll when -mint64 fshvaige at cisco dot com
                   ` (3 preceding siblings ...)
  2004-12-01 20:04 ` echristo at redhat dot com
@ 2004-12-07 22:21 ` echristo at redhat dot com
  2005-01-13  2:38 ` echristo at redhat dot com
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: echristo at redhat dot com @ 2004-12-07 22:21 UTC (permalink / raw)
  To: gcc-bugs



-- 
Bug 18404 depends on bug 18442, which changed state.

Bug 18442 Summary: [4.0 Regression] Rejects attribute((mode(SI))) when using -mint64
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18442

           What    |Old Value                   |New Value
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

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


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

* [Bug target/18404] unnecessary sll when -mint64 (MIPS)
  2004-11-09 15:56 [Bug target/18404] New: unnecessary sll when -mint64 fshvaige at cisco dot com
                   ` (4 preceding siblings ...)
  2004-12-07 22:21 ` echristo at redhat dot com
@ 2005-01-13  2:38 ` echristo at redhat dot com
  2005-01-18  9:57 ` fshvaige at cisco dot com
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: echristo at redhat dot com @ 2005-01-13  2:38 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From echristo at redhat dot com  2005-01-13 02:38 -------
-mint64 is being deprecated in 4.0 and will be removed after branching. What are
you using it for anyhow?

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |WAITING


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


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

* [Bug target/18404] unnecessary sll when -mint64 (MIPS)
  2004-11-09 15:56 [Bug target/18404] New: unnecessary sll when -mint64 fshvaige at cisco dot com
                   ` (5 preceding siblings ...)
  2005-01-13  2:38 ` echristo at redhat dot com
@ 2005-01-18  9:57 ` fshvaige at cisco dot com
  2005-01-20  0:37 ` echristo at redhat dot com
  2005-02-01  3:06 ` echristo at redhat dot com
  8 siblings, 0 replies; 10+ messages in thread
From: fshvaige at cisco dot com @ 2005-01-18  9:57 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From fshvaige at cisco dot com  2005-01-18 09:57 -------
Where can I read the discussion preceding this decision ?

Int is default type in C. I want (as option) default to be 64 bit; it seems to
me so natural for 64 bit architecture. I know that 64 bit MIPS CPUs complete
some 32 bit operations faster then corresponding 64 bit ops, but still.

-- 


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


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

* [Bug target/18404] unnecessary sll when -mint64 (MIPS)
  2004-11-09 15:56 [Bug target/18404] New: unnecessary sll when -mint64 fshvaige at cisco dot com
                   ` (6 preceding siblings ...)
  2005-01-18  9:57 ` fshvaige at cisco dot com
@ 2005-01-20  0:37 ` echristo at redhat dot com
  2005-02-01  3:06 ` echristo at redhat dot com
  8 siblings, 0 replies; 10+ messages in thread
From: echristo at redhat dot com @ 2005-01-20  0:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From echristo at redhat dot com  2005-01-20 00:37 -------
The discussion was held offline between Richard Sandiford and I. 

Having a -mint64 option changes the abi for anything that is built with that
option and in no abi defined for mips is int defined to 64. You may want longs
equal to 64-bit which I can easily understand, especially for 64-bit
architectures. Pointers can also be 64-bit under the n64 abi (-mabi=64).

As far as 64-bit ints being "natural", in fact, only the unicosmk abi for alpha
(not the rest of the port) defines the size of an integer to 64-bit or allows it.

-eric

-- 


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


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

* [Bug target/18404] unnecessary sll when -mint64 (MIPS)
  2004-11-09 15:56 [Bug target/18404] New: unnecessary sll when -mint64 fshvaige at cisco dot com
                   ` (7 preceding siblings ...)
  2005-01-20  0:37 ` echristo at redhat dot com
@ 2005-02-01  3:06 ` echristo at redhat dot com
  8 siblings, 0 replies; 10+ messages in thread
From: echristo at redhat dot com @ 2005-02-01  3:06 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From echristo at redhat dot com  2005-02-01 03:06 -------
Deprecating -mint64.

http://gcc.gnu.org/ml/gcc-patches/2005-02/msg00019.html

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |WONTFIX


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


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

end of thread, other threads:[~2005-02-01  3:06 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-09 15:56 [Bug target/18404] New: unnecessary sll when -mint64 fshvaige at cisco dot com
2004-11-09 15:57 ` [Bug target/18404] unnecessary sll when -mint64 (MIPS) fshvaige at cisco dot com
2004-11-12  3:34 ` pinskia at gcc dot gnu dot org
2004-11-12  3:55 ` pinskia at gcc dot gnu dot org
2004-12-01 20:04 ` echristo at redhat dot com
2004-12-07 22:21 ` echristo at redhat dot com
2005-01-13  2:38 ` echristo at redhat dot com
2005-01-18  9:57 ` fshvaige at cisco dot com
2005-01-20  0:37 ` echristo at redhat dot com
2005-02-01  3:06 ` echristo at redhat dot com

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).