Displaying 2 results from an estimated 2 matches for "rawel".
Did you mean:
pawel
2014 Oct 29
2
[LLVMdev] [PATCH] LangRef: va_arg doesn't work on X86_64; update example
..._copy(i8* %aq2, i8* %ap2)
- call void @llvm.va_end(i8* %aq2)
-
+ %idxptr = getelementptr inbounds %struct.__va_list_tag* %ap, i32 0, i32 0
+ %idx = load i32* %idxptr
+ %tmp = getelementptr inbounds %struct.__va_list_tag* %ap, i32 0, i32 3
+ %extract = load i8** %tmp
+ %rawel = getelementptr i8* %extract, i32 %idx
+ %elptr = bitcast i8* %rawel to i32*
+ %newidx = add i32 %idx, 8
+ store i32 %idx, i32* %idxptr
+
+ ; Store that argument in el
+ %el = load i32* %elptr
+ store i32 %el, i32* %retptr
+ %ret = load i32* %retptr
+...
2014 Aug 26
2
[LLVMdev] [BUG] Varargs example in LangRef segfaults
Hi,
So the Variable Argument Handling Intrinsics section of the LangRef
(http://llvm.org/docs/LangRef.html#variable-argument-handling-intrinsics)
lists an example that segfaults. Try the following on x86_64:
-- 8< --
define i32 @test(i32 %X, ...) {
; Initialize variable argument processing
%ap = alloca i8*
%ap2 = bitcast i8** %ap to i8*
call void @llvm.va_start(i8* %ap2)
; Read a