This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/18404] New: unnecessary sll when -mint64
- From: "fshvaige at cisco dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Nov 2004 15:55:53 -0000
- Subject: [Bug target/18404] New: unnecessary sll when -mint64
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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