Skip to content

Commit 037e7fd

Browse files
committed
.
Created using spr 1.3.5-bogner
1 parent 028d669 commit 037e7fd

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCExpr.cpp

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff 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-
}

0 commit comments

Comments
 (0)