similar to: [LLVMdev] clang modifying clobbered register in case of inline assembly resulting in data corruption

Displaying 20 results from an estimated 9000 matches similar to: "[LLVMdev] clang modifying clobbered register in case of inline assembly resulting in data corruption"

2012 Dec 04
4
[LLVMdev] Value of structure passed byval to a recurse function not initialized when accessed through GDB
Hi All, I was debugging a clang binary when i found this problem. The following code is complied with clang. typedef struct s { short s; } SVAL; void recurse (SVAL a, int depth) { a.s = --depth; if (depth == 0) return; else recurse(a,depth); } int main () { SVAL s; s.s = 5; recurse (s, 5); return 0; } When i try to access value of a.s in function recurse through gdb(i.e
2012 Dec 06
2
[LLVMdev] Value of structure passed byval to a recurse function not initialized when accessed through GDB
Hi David, I think it might not be exactly PR13303 which might be causing the corruption of struct when accessed through GDB. This seems to be an ABI problem in clang. The problem seems to be that when we have pass by value of struct (having indirect arguments) stack is not aligned properly. I tried realigning the stack for indirect arguments in(TargetInfo.cpp) - ABIArgInfo
2012 Dec 05
1
[LLVMdev] Value of structure passed byval to a recurse function not initialized when accessed through GDB
Hi Relph, I'm trying to print the value of 'a' while executing a.s = --depth; I have used break line number instead of break function so that the initial prologue part gets executed. The problem seems to be happening when parameters are pushed into stack and we call a function recursively. For example in the code when we have a int s; inside the struct instead of short s; gdb is able
2012 Dec 06
0
[LLVMdev] Value of structure passed byval to a recurse function not initialized when accessed through GDB
On Thu, Dec 6, 2012 at 12:33 AM, Karthik Bhat <karthikthecool at gmail.com> wrote: > Hi David, > > I think it might not be exactly PR13303 which might be causing the > corruption of struct when accessed through GDB. > This seems to be an ABI problem in clang. > The problem seems to be that when we have pass by value of struct > (having indirect arguments) stack is not
2012 Dec 04
0
[LLVMdev] Value of structure passed byval to a recurse function not initialized when accessed through GDB
Karthik, At what point within recurse() are you asking gdb to display the value of argument a? What I'm wondering about is if the debug information gdb is using to get at a might not be correct at the particular point you are checking a, particularly if that is before the prolog has completed execution. The way debug information for arguments pushed on the stack is represented in
2012 Dec 04
0
[LLVMdev] Value of structure passed byval to a recurse function not initialized when accessed through GDB
This seems to be another case of PR13303 - since GDB can't figure out where to break for this function based on the debug info (you'll notice when you "break recurse" that it's not breaking on a line or source file, just an address) it's breaking at the very start, before the prologue I'm about to commit a fix to this. On Tue, Dec 4, 2012 at 5:34 AM, Karthik Bhat
2012 Nov 16
1
[LLVMdev] Failure while calling a function in GDB session
Hi All, I compiled the following code on my linux PC using clang with PIE option- struct struct4 {char a; char b; char c; char d; }; struct struct4 foo4 = {'a','2','c','4'}; struct struct4 fun4() { return foo4; } int main() { fun4(); return 0; } > clang -g -fPIE structs.c In GDB session when i call p/c fun4() i get something like below- (gdb) p/c
2012 Aug 06
3
[LLVMdev] [RFC] MS-style inline assembly
All, The purpose of this email is to open a discussion on the design and implementation of support for Microsoft-style inline assembly in clang. The majority of the work will be done in clang, but I'm CC'ing both dev lists to get the most exposure possible. There are _many_ open questions and the forthcoming description is likely to be obscure in many place (at times this is on purpose,
2012 Aug 06
0
[LLVMdev] [cfe-dev] [RFC] MS-style inline assembly
> > 1. How is clang going to discover the input operands, output operands, > constraints, and clobbered registers? > The approach you described sounds good to me. Reusing all the work done in the LLVM MC layer seems the right approach. > In the above example, the two asm statments are not valid assembly. > Thus, the AsmParser cannot parse these statements without some >
2012 Aug 06
2
[LLVMdev] [cfe-dev] [RFC] MS-style inline assembly
On Aug 6, 2012, at 1:03 PM, João Matos wrote: > 1. How is clang going to discover the input operands, output operands, > constraints, and clobbered registers? > > The approach you described sounds good to me. Reusing all the work done in the LLVM MC layer seems the right approach. Glad you agree. We really shouldn't be replicating information in the frontend; this very error
2014 Apr 24
2
[LLVMdev] How to get debug dump of candidate pairs selected in BBVectorizer?
Hi All, I'm trying to understand BB Vectorizer and gone through http://llvm.org/devmtg/2012-04-12/Slides/Hal_Finkel.pdf Wanted to know how to use bb-vectorize-debug-candidate-selection and bb-vectorize-debug-pair-selection command arguments. I tried the command with debug build clang - clang -O2 test.c -mllvm -vectorize \ -mllvm -debug-only=bb-vectorize \ -mllvm
2015 Jan 30
1
[LLVMdev] Question on Loop Normalization in LLVM
Hi All, I was going through http://en.wikipedia.org/wiki/Normalized_loop and some other documents on Normalized Loops. LLVM currently doesn't seem to normalize the loop as mentioned in the link (i.e. to start with 0 and have a unit step). I wrote a pass to convert a loop into normalized form as in the link (i.e. to have start value of 0 and step of 1 whenever possible) but I'm not sure
2009 Nov 09
3
[Bug 619] New: If /proc/sys/kernel/modprobe is absent, errno is clobbered in get_modprobe
http://bugzilla.netfilter.org/show_bug.cgi?id=619 Summary: If /proc/sys/kernel/modprobe is absent, errno is clobbered in get_modprobe Product: iptables Version: 1.3.5 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P1 Component: iptables AssignedTo: laforge
2008 Nov 01
0
[LLVMdev] nested function's static link gets clobbered
Hi, > I'm parallelizing loops to be called by pthread. The thread body that I pass > to pthread_create looks like > > define i8* @loop1({ i32*, i32* }* nest %parent_frame, i8* %arg) > parent_frame is pointer to shared variables in original function > > 0x00007f0de11c41f0: mov (%r10),%rax > 0x00007f0de11c41f3: cmpl $0x63,(%rax) > 0x00007f0de11c41f6:
2004 Mar 29
10
[Bug 820] utmp seems to be getting clobbered on logins
http://bugzilla.mindrot.org/show_bug.cgi?id=820 Summary: utmp seems to be getting clobbered on logins Product: Portable OpenSSH Version: 3.8p1 Platform: All OS/Version: IRIX Status: NEW Severity: normal Priority: P2 Component: sshd AssignedTo: openssh-bugs at mindrot.org ReportedBy: ktaylor
2012 Feb 24
1
[LLVMdev] DW_AT_inline not present in assembly for an inlined inline function
Hello I am trying to run following test case on Clang compiled output to compare the dwarf inline attributes in the resulting assembly output . /* Inlined inline function must have abstract DIE */ /* { dg-do compile } */ /* { dg-options "-O2 -gdwarf-2 -dA -fpreprocessed" } */ /* { dg-final { scan-assembler "3.*DW_AT_inline" } } */ #1 "test.h" inline int t() { } int
2018 Feb 12
0
[inline-asm][asm-goto] Supporting "asm goto" in inline assembly
FYI there is now serious talk of the Linux kernel dropping support for compilers that *don't* support asm goto. On Tue, 2017-04-04 at 13:13 -0700, Matthias Braun via llvm-dev wrote: > > > On Apr 4, 2017, at 11:44 AM, John McCall via llvm-dev > > ts.llvm.org> wrote: > > > > > On Apr 4, 2017, at 2:12 PM, Matthias Braun <matze at braunis.de> > >
2016 Jul 15
4
RFC: To add __attribute__((regmask("preserve/clobbered list here"))) in clang
Hello Clang and LLVM Devs, I have been working to add support for an attribute in clang and LLVM that helps user to guide interprocedural register allocation. But the use case I am having is very limited and thus I belieave it is good to have discussion on this before sending a patch. So for IPRA we have a situation where a function is calling a function which is written in assembly and it is
2015 Aug 05
0
[PATCH 3/8] Autoconf changes for arm64 inline assembly support.
--- configure.ac | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/configure.ac b/configure.ac index 019d36d..13ed33f 100644 --- a/configure.ac +++ b/configure.ac @@ -199,6 +199,25 @@ cpu_arm=no AS_IF([test x"${enable_asm}" = x"yes"],[ inline_optimization="No inline ASM for your platform, please send patches" case $host_cpu in +
2015 Nov 07
0
[Aarch64 05/11] Autoconf changes for aarch64 inline assembly support.
--- configure.ac | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/configure.ac b/configure.ac index 6f61d2e..4f7ec75 100644 --- a/configure.ac +++ b/configure.ac @@ -199,6 +199,25 @@ cpu_arm=no AS_IF([test x"${enable_asm}" = x"yes"],[ inline_optimization="No inline ASM for your platform, please send patches" case $host_cpu in +