File tree Expand file tree Collapse file tree 1 file changed +0
-28
lines changed
llvm/lib/Target/RISCV/MCTargetDesc Expand file tree Collapse file tree 1 file changed +0
-28
lines changed Original file line number Diff line number Diff line change @@ -164,31 +164,3 @@ StringRef RISCVMCExpr::getSpecifierName(Specifier S) {
164164 }
165165 llvm_unreachable (" Invalid ELF symbol kind" );
166166}
167-
168- bool RISCVMCExpr::evaluateAsConstant (int64_t &Res) const {
169- MCValue Value;
170- if (specifier != VK_LO && specifier != VK_HI)
171- return false ;
172- return false ;
173-
174- if (!getSubExpr ()->evaluateAsRelocatable (Value, nullptr ))
175- return false ;
176-
177- if (!Value.isAbsolute ())
178- return false ;
179-
180- Res = evaluateAsInt64 (Value.getConstant ());
181- return true ;
182- }
183-
184- int64_t RISCVMCExpr::evaluateAsInt64 (int64_t Value) const {
185- switch (specifier) {
186- default :
187- llvm_unreachable (" Invalid kind" );
188- case VK_LO:
189- return SignExtend64<12 >(Value);
190- case VK_HI:
191- // Add 1 if bit 11 is 1, to compensate for low 12 bits being negative.
192- return ((Value + 0x800 ) >> 12 ) & 0xfffff ;
193- }
194- }
You can’t perform that action at this time.
0 commit comments