search for: sideeffect

Displaying 20 results from an estimated 155 matches for "sideeffect".

2013 Oct 22
1
[LLVMdev] System call miscompilation using the fast register allocator
...ckopt is provided by uclibc, and is available as LLVM, leading to optimised LLVM code like: define i32 @main(i32 %argc, i8** nocapture %argv) unnamed_addr nounwind uwtable { entry: %val = alloca i32, align 4 store i32 1, i32* %val, align 4 %0 = ptrtoint i32* %val to i64 call void asm sideeffect "", "{r8}"(i64 4) nounwind call void asm sideeffect "", "{r10}"(i64 %0) nounwind call void asm sideeffect "", "{rdx}"(i64 3) nounwind call void asm sideeffect "", "{rsi}"(i64 1) nounwind call void asm sideef...
2009 Aug 03
2
[LLVMdev] inline asm question
...pennware.com>: >> The following fails on x86_64 because of the output constraint '0'. >> My question is, is this legal. LLVM complains about the size difference >> (32 vs 64), but it is the same register (ax). >> Works on x86. >> >> %42 = call i64 asm sideeffect "syscall\0A\09", >> "={ax},0,{di},~{dirflag},~{fpsr},~{flags}"(i64 231, i64 %41) nounwind >> ; <i64> [#uses=2] >> >> -Rich > > Can you give a complete testcase? Running the following through > "llvm-as | llc -march=x86-64&qu...
2008 Jun 06
2
[LLVMdev] Trouble with inline asm
...%tmp = load i32* %i ; <i32> [#uses=1] %tmp1 = call i32 (i8*, ...)* @printf( i8* getelementptr ([4 x i8]* @.stringliteral, i32 0, i32 0), i32 %tmp ) ; <i32> [#uses=0] %tmp2 = load i32* %i ; <i32> [#uses=1] call void asm sideeffect "movl $0, %eax", "m,~{eax}"( i32 %tmp2 ) call void asm sideeffect "addl %eax, %eax", "~{eax},~{eax}"( ) call void asm sideeffect "mull $0", "i,~{eax},~{edx},~{eax}"( i32 2 ) %tmp3 = load i32* %i ; <i32...
2009 Aug 03
2
[LLVMdev] inline asm question
The following fails on x86_64 because of the output constraint '0'. My question is, is this legal. LLVM complains about the size difference (32 vs 64), but it is the same register (ax). Works on x86. %42 = call i64 asm sideeffect "syscall\0A\09", "={ax},0,{di},~{dirflag},~{fpsr},~{flags}"(i64 231, i64 %41) nounwind ; <i64> [#uses=2] -Rich
2009 Aug 03
0
[LLVMdev] inline asm question
...gt;> The following fails on x86_64 because of the output constraint '0'. >>> My question is, is this legal. LLVM complains about the size difference >>> (32 vs 64), but it is the same register (ax). >>> Works on x86. >>> >>> %42 = call i64 asm sideeffect "syscall\0A\09", >>> "={ax},0,{di},~{dirflag},~{fpsr},~{flags}"(i64 231, i64 %41) nounwind >>>          ; <i64> [#uses=2] >>> >>> -Rich >> >> Can you give a complete testcase?  Running the following through >> "llv...
2015 Jul 16
2
[LLVMdev] [RFC] Defining Infinite Loops
...rement that all loops terminate. > > However, I'd like to float an alternative approach. I've not spent a lot of > time thinking about it, so I'm not sure its actually better. I'm wondering > if you've already thought about it. > > What if we have an @llvm.noop.sideeffect() or some such which doesn't read > or write memory in any way, but which a frontend can place inside a loop > body to mark that its execution (perhaps infinitely) is in-and-of-itself a > side effect of the program. We could then teach loop unrolling or the few > other things that w...
2019 Jul 01
2
[cfe-dev] [RFC] ASM Goto With Output Constraints
...>>>> statements one on each branch of an if-then-else (please ignore any syntax >>>> errors): >>>> >>>> if: >>>> br i1 %cmp, label %true, label %false >>>> >>>> true: >>>> %0 = call { i32, i32 } asm sideeffect "poetry $0, $1", "={r8},={r9}" >>>> () >>>> br label %end >>>> >>>> false: >>>> %1 = call { i32, i32 } asm sideeffect "poetry2 $0, $1", >>>> "={r10},={r11}" () >>>> br l...
2009 Aug 03
0
[LLVMdev] inline asm question
...d Pennington <rich at pennware.com>: > The following fails on x86_64 because of the output constraint '0'. > My question is, is this legal. LLVM complains about the size difference > (32 vs 64), but it is the same register (ax). > Works on x86. > > %42 = call i64 asm sideeffect "syscall\0A\09", > "={ax},0,{di},~{dirflag},~{fpsr},~{flags}"(i64 231, i64 %41) nounwind >          ; <i64> [#uses=2] > > -Rich Can you give a complete testcase? Running the following through "llvm-as | llc -march=x86-64" works just fine: define voi...
2009 Jul 08
2
\dQuote in packages
...= "unknown") : ./man/predict.Rd:28: unknown macro '\dquote' *** error on file ./man/predict.Rd Error : ./man/predict.Rd:28: Unrecognized macro \dquote Warning in parse_Rd("./man/print.Rd", encoding = "unknown") : ./man/print.Rd:17: unexpected UNKNOWN '\sideeffects' Warning in parse_Rd("./man/simpleREEMdata.Rd", encoding = "unknown") : ./man/simpleREEMdata.Rd:10: unknown macro '\item' Are \dquote, \sideeffects, and \item not supported in newer versions of R? Is there some underlying problem that I should fix that makes the...
2008 Jun 06
0
[LLVMdev] Trouble with inline asm
...* %i, i32 %tmp3 ) nounwind %tmp4 = load i32* %i, align 4 ; <i32> [#uses=1] %tmp5 = call i32 (i8*, ...)* @printf( i8* getelementptr ([4 x i8]* @.str, i32 0, i32 0), i32 %tmp4 ) nounwind ; <i32> [#uses=0] ret i32 0 } declare i32 @printf(i8*, ...) nounwind > call void asm sideeffect "movl $0, %eax", "m,~{eax}"( i32 %tmp2 ) > call void asm sideeffect "addl %eax, %eax", "~{eax},~{eax}"( ) > call void asm sideeffect "mull $0", "i,~{eax},~{edx},~{eax}"( i32 2 ) You can't safely split the lines of...
2020 Jan 07
2
Inline assembly in intel syntax mishandling i constraint
...9;t verify this). Here's the example static int foo; static int bar; void _start(void) { asm volatile("movl %0, %%eax" : : "i"(&foo)); asm volatile("movl %0, %%ebx" : : "i"(&bar)); } This produces define void @_start() #0 { call void asm sideeffect "movl $0, %eax", "i,~{dirflag},~{fpsr},~{flags}"(i32* @foo) #1, !srcloc !3 call void asm sideeffect "movl $0, %ebx", "i,~{dirflag},~{fpsr},~{flags}"(i32* @bar) #1, !srcloc !4 ret void } When assembled, I get the expected output 80480a3: b8 b0 90 04 08...
2016 Jun 30
4
Help required regarding IPRA and Local Function optimization
...cases are containing very large function with recursion and object oriented code so I am not able to find a pattern which is causing failure. So I tried following simple case to understand expected behavior from this optimization. Consider following code : define void @bar() #0 { call void asm sideeffect "movl %ecx, %r15d", "~{r15}"() #0 call void @foo() call void asm sideeffect "movl %r15d, %ebx", "~{rbx}"() #0 ret void } define internal void @foo() #0 { call void asm sideeffect "movl %r14d, %r15d", "~{r15}"() #0 ret void } an...
2019 Jul 02
2
[cfe-dev] [RFC] ASM Goto With Output Constraints
...one on each branch of an if-then-else (please ignore any syntax >>>>> errors): >>>>> >>>>> if: >>>>> br i1 %cmp, label %true, label %false >>>>> >>>>> true: >>>>> %0 = call { i32, i32 } asm sideeffect "poetry $0, $1", "={r8},={r9}" >>>>> () >>>>> br label %end >>>>> >>>>> false: >>>>> %1 = call { i32, i32 } asm sideeffect "poetry2 $0, $1", >>>>> "={r10},={r11}" ()...
2017 Oct 27
4
Infinite loops with no side effects
...uiltin vs > nonbuiltin discussion happening in parallel, the attribute enables the > optimization, rather than inhibiting it. > > > As I said below, a function attribute is insufficient. It needs to be > something we can mark per loop. This is needed to correctly model C. The > sideeffect intrinsic is the best proposal I've seen so far. > Maybe we should do both? If the intrinsic is a special case, that seems fine. It's cheap. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171027/...
2006 Mar 08
4
Latest on Debian Sid Always Gives Error (resend)
...thread 0009), starting debugger... err:seh:start_debugger Couldn't start debugger ("winedbg --auto 8 32") (2) Read the Wine Developers Guide on how to set up winedbg or another debugger This happens on everything I try run. Note: Still a problem with latest upgrade. It may have more sideeffects than simply its own failure!
2019 Dec 09
4
IR inline assembly: the x86 Intel "offset" operator
...ly like mov eax, offset Foo::ptr + 1 (Currently, omitting the +1 works... but offset doesn't work in compound expressions.) I'm having trouble figuring out what inline assembly I can emit into the LLVM IR that will work properly. So far, the closest I've gotten is call void asm sideeffect inteldialect "mov eax, offset $0 + $$1, "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32** @"?ptr at Foo@@2PAHA") But that expands to mov eax, offset [?ptr at Foo@@2PAHA] + 1 which ends up incorrectly dereferencing the address first. I haven't found a working combinatio...
2019 Jun 28
3
[cfe-dev] [RFC] ASM Goto With Output Constraints
...m extending this sentiment to callbr with output constraints. Let's take your example below and write it as "normal" asm statements one on each branch of an if-then-else (please ignore any syntax errors): if: br i1 %cmp, label %true, label %false true: %0 = call { i32, i32 } asm sideeffect "poetry $0, $1", "={r8},={r9}" () br label %end false: %1 = call { i32, i32 } asm sideeffect "poetry2 $0, $1", "={r10},={r11}" () br label %end end: %vals = phi { i32, i32 } [ %0, %true ], [ %1, %false ] How is this handled in codegen? Is it an err...
2020 Jan 08
2
Inline assembly in intel syntax mishandling i constraint
...int foo; > static int bar; > > void _start(void) { > asm volatile("movl %0, %%eax" : : "i"(&foo)); > asm volatile("movl %0, %%ebx" : : "i"(&bar)); > } > > This produces > define void @_start() #0 { > call void asm sideeffect "movl $0, %eax", "i,~{dirflag},~{fpsr},~{flags}"(i32* @foo) #1, !srcloc !3 > call void asm sideeffect "movl $0, %ebx", "i,~{dirflag},~{fpsr},~{flags}"(i32* @bar) #1, !srcloc !4 > ret void > } > > When assembled, I get the expected output &...
2019 Jun 27
2
[cfe-dev] [RFC] ASM Goto With Output Constraints
...locks. Can you present examples where preserving the values on the branches is be a requirement? (I feel like I've seen some before, but it'd be good to be reminded). E.g., imagine code like this: << entry: br i1 %cmp, label %true, label %false true: %0 = callbr { i32, i32 } asm sideeffect "poetry $0, $1", "={r8},={r9},X" (i8* blockaddress(@vogon, %error)) to label %asm.fallthrough [label %error] false: %1 = callbr { i32, i32 } asm sideeffect "poetry2 $0, $1", "={r10},={r11},X" (i8* blockaddress(@vogon, %error)) to label %asm.fallthrough [lab...
2011 May 17
1
[LLVMdev] inline asm
...and understand what is going on in the inline assembly, or is it a black box to llvm analysis? * What is the syntax of the inline assembly? i.e. intel, att, ...? The test code is complete mystery to me: ; From test/Assembler/alignstack.II define void @test1() nounwind { ; CHECK: test1 ; CHECK: sideeffect ; CHECK-NOT: alignstack tail call void asm sideeffect "mov", "~{dirflag},~{fpsr},~{flags}"() nounwind ret void ; CHECK: ret } * Presumably "mov" is the inline assembly string, but that isn't going to assemble without arguments -- are arguments append to the stri...