[PATCH] D51494: Fix unwind information for floating point registers
Oliver Stannard via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 31 01:59:27 PDT 2018
olista01 added inline comments.
================
Comment at: lib/Target/ARM/ARMAsmPrinter.cpp:1105
"Pad registers must come before restored ones");
- Pad += 4;
+ const MachineFunction &MF = *MI->getParent()->getParent();
+ const TargetRegisterInfo *TRI = MF.getSubtarget().getRegisterInfo();
----------------
We already get the MachineFunction and TargetRegisterInfo at the top of this function, and the MachineRegisterInfo should be moved up there to keep these together.
================
Comment at: test/CodeGen/ARM/unwind-fp.ll:1
+; RUN: llc < %s -mtriple=armv7a-arm-none-eabi | FileCheck %s
+; CHECK: pad #8
----------------
This test can be simplified a lot, to something like this:
target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
target triple = "armv7-arm-none-eabi"
define void @foo() minsize {
entry:
%a = alloca i32, align 4
call void asm sideeffect "", "r,~{d8}"(i32* %a)
ret void
}
Also, it would be clearer to put the CHECK line inside the IR for the function being tested, and to also check the other frame directives and the actual frame setup instructions.
Repository:
rL LLVM
https://reviews.llvm.org/D51494
More information about the llvm-commits
mailing list