forked from OSchip/llvm-project
				
			Sign extend remaining implicit addends for consistency.
llvm-svn: 295062
This commit is contained in:
		
							parent
							
								
									6f732e026d
								
							
						
					
					
						commit
						17ba44519b
					
				| 
						 | 
					@ -504,7 +504,7 @@ int64_t X86TargetInfo::getImplicitAddend(const uint8_t *Buf,
 | 
				
			||||||
  case R_386_PC32:
 | 
					  case R_386_PC32:
 | 
				
			||||||
  case R_386_PLT32:
 | 
					  case R_386_PLT32:
 | 
				
			||||||
  case R_386_TLS_LE:
 | 
					  case R_386_TLS_LE:
 | 
				
			||||||
    return read32le(Buf);
 | 
					    return SignExtend64<32>(read32le(Buf));
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2262,7 +2262,7 @@ int64_t MipsTargetInfo<ELFT>::getImplicitAddend(const uint8_t *Buf,
 | 
				
			||||||
  case R_MIPS_GPREL32:
 | 
					  case R_MIPS_GPREL32:
 | 
				
			||||||
  case R_MIPS_TLS_DTPREL32:
 | 
					  case R_MIPS_TLS_DTPREL32:
 | 
				
			||||||
  case R_MIPS_TLS_TPREL32:
 | 
					  case R_MIPS_TLS_TPREL32:
 | 
				
			||||||
    return read32<E>(Buf);
 | 
					    return SignExtend64<32>(read32<E>(Buf));
 | 
				
			||||||
  case R_MIPS_26:
 | 
					  case R_MIPS_26:
 | 
				
			||||||
    // FIXME (simon): If the relocation target symbol is not a PLT entry
 | 
					    // FIXME (simon): If the relocation target symbol is not a PLT entry
 | 
				
			||||||
    // we should use another expression for calculation:
 | 
					    // we should use another expression for calculation:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue