mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Cleanup and document MachineLocation.
Clarify documentation and API to make the difference between register and register-indirect addressed locations more explicit. Put in a comment to point out that with the current implementation we cannot specify a register-indirect location with offset 0 (a breg 0 in DWARF). No functionality change intended. rdar://problem/13658587 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180641 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -813,7 +813,7 @@ void AsmPrinter::EmitDwarfRegOp(const MachineLocation &MLoc) const {
|
||||
// caller might be in the middle of an dwarf expression. We should
|
||||
// probably assert that Reg >= 0 once debug info generation is more mature.
|
||||
|
||||
if (int Offset = MLoc.getOffset()) {
|
||||
if (MLoc.isIndirect()) {
|
||||
if (Reg < 32) {
|
||||
OutStreamer.AddComment(
|
||||
dwarf::OperationEncodingString(dwarf::DW_OP_breg0 + Reg));
|
||||
@@ -824,7 +824,7 @@ void AsmPrinter::EmitDwarfRegOp(const MachineLocation &MLoc) const {
|
||||
OutStreamer.AddComment(Twine(Reg));
|
||||
EmitULEB128(Reg);
|
||||
}
|
||||
EmitSLEB128(Offset);
|
||||
EmitSLEB128(MLoc.getOffset());
|
||||
} else {
|
||||
if (Reg < 32) {
|
||||
OutStreamer.AddComment(
|
||||
|
||||
Reference in New Issue
Block a user