mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-03 21:09:12 +00:00 
			
		
		
		
	Fixed sign propagation in bit-wise operators
This commit is contained in:
		
							parent
							
								
									5dab327b30
								
							
						
					
					
						commit
						ed62fcdbe2
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		| 
						 | 
					@ -896,6 +896,7 @@ RTLIL::SigSpec AstNode::genRTLIL(int width_hint, bool sign_hint)
 | 
				
			||||||
			int width = std::max(left.width, right.width);
 | 
								int width = std::max(left.width, right.width);
 | 
				
			||||||
			if (width_hint > 0)
 | 
								if (width_hint > 0)
 | 
				
			||||||
				width = width_hint;
 | 
									width = width_hint;
 | 
				
			||||||
 | 
								is_signed = children[0]->is_signed && children[1]->is_signed;
 | 
				
			||||||
			return binop2rtlil(this, type_name, width, left, right);
 | 
								return binop2rtlil(this, type_name, width, left, right);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue