[Bug target/19293] avr-gcc crashes when using shifts with negative shift count

bernie at develer dot com gcc-bugzilla@gcc.gnu.org
Wed Jan 19 00:19:00 GMT 2005


------- Additional Comments From bernie at develer dot com  2005-01-19 00:18 -------
(In reply to comment #3)


A quick informal review.


>     if (GET_CODE (operands[2]) == CONST_INT) 
>       { 
>         int k; 
>    
>         if (!len) 
>   	len = &k; 
> !        

This line contains spurious whitespace.

> !       if ( (INTVAL(operands[2]) < 0) || (INTVAL(operands[2]) > 7) ) 

The coding standard requires a space between INTVAL and the
opening parenthesis.

Also remember to replace "<" with "<="!


> !        { /* illegal shift count */ 
> !          *len = 0; 
> !          return ""; 
> !        } 

The comment should stay on its own line, with
capitalized initial, a full stop (".") at the
end, followed by *two* whitespaces.

This also applies to the other hunks.


>   const char * 
>   lshrhi3_out (rtx insn, rtx operands[], int *len) 
>   { 
>     if (GET_CODE (operands[2]) == CONST_INT) 
> !     {  
>         int scratch = (GET_CODE (PATTERN (insn)) == PARALLEL); 
>         int ldi_ok = test_hard_reg_class (LD_REGS, operands[0]); 
>         int k; 

This hunk adds spurious whitespace after the opening brace.


-- 


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



More information about the Gcc-bugs mailing list