Date: Fri, 3 Jul 92 16:51:14 JST From: na70103 AT mips DOT cc DOT mie-u DOT ac DOT jp (Makoto Kobayashi) To: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Re: shifting long long ints creates bad assembler I am sorry to say that long long left shift works right but long long right shift doesn't work. A C-source such that long long i,j ; i=-1; j=i>>33; outputs a illegal code. This is also a problem of i386.md. H. Ando reported the bug in gnu.gcc.bug and it is easy to correct. M. Kobayashi ------------------------------------------------------------------------ *** /gcc-2.2/config/i386.md Sat Jun 13 03:24:06 1992 --- /gcc-2.2/md Sun Jun 28 23:11:50 1992 *************** *** 2452,2456 **** xops[0] = gen_rtx (CONST_INT, VOIDmode, INTVAL (xops[0]) - 32); ! output_asm_insn (AS2 (sar%2,%0,%2), xops); /* Remaining shift */ } } --- 2453,2457 ---- xops[0] = gen_rtx (CONST_INT, VOIDmode, INTVAL (xops[0]) - 32); ! output_asm_insn (AS2 (sar%L2,%0,%2), xops); /* Remaining shift */ } } *************** *** 2588,2592 **** xops[0] = gen_rtx (CONST_INT, VOIDmode, INTVAL (xops[0]) - 32); ! output_asm_insn (AS2 (shr%2,%0,%2), xops); /* Remaining shift */ } } --- 2589,2593 ---- xops[0] = gen_rtx (CONST_INT, VOIDmode, INTVAL (xops[0]) - 32); ! output_asm_insn (AS2 (shr%L2,%0,%2), xops); /* Remaining shift */ } } ----------------------end------------------------------------------------