Displaying 4 results from an estimated 4 matches for "test7a".
Did you mean:
  test7
  
2013 May 30
1
[LLVMdev] Expected behavior of calling bitcasted functions?
...type
   %X = call  i32 bitcast (i8 ()* @test4a to i32 ()*)()
Undefined behavior: Call argument count mismatches callee argument count
   %X = call  i32 bitcast (i32 (i32)* @test6a to i32 ()*)()
Undefined behavior: Call argument count mismatches callee argument count
   call  void bitcast (void ()* @test7a to void (i32)*)(i32 5)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130530/bf6747e1/attachment.html>
2013 May 30
0
[LLVMdev] Expected behavior of calling bitcasted functions?
Hello,
This is an interesting example.  Whenever I see strange things like this, I
use opt's -lint.
In this case, opt -lint reports:
Undefined behavior: Call return type mismatches callee return type
  %call = call float @alias_f32(float %tmp2) #1
You'll get a similar report when the parameter types mismatch.
Pete
On Wed, May 29, 2013 at 5:40 PM, Arsenault, Matthew <
2013 May 30
3
[LLVMdev] Expected behavior of calling bitcasted functions?
Hi,
I'm not sure what the expected behavior of calling a bitcasted function is. Suppose you have a case like this (which you get on the source level from attribute alias):
@alias_f32 = alias bitcast (i32 (i32)* @func_i32 to float (float)*)
define internal i32 @func_i32(i32 %v) noinline nounwind {
entry:
  ret i32 %v
}
define void @bitcast_alias_scalar(float* noalias %source, float* noalias
2014 Nov 03
8
[LLVMdev] [PATCH] Protection against stack-based memory corruption errors using SafeStack
...tr
+; DARWIN-X64: .cfi_endproc
+  %retval = alloca i32, align 4
+  %a = alloca i32, align 4
+  %j = alloca i32*, align 8
+  store i32 0, i32* %retval
+  %0 = load i32* %a, align 4
+  %add = add nsw i32 %0, 1
+  store i32 %add, i32* %a, align 4
+  store i32* %a, i32** %j, align 8
+  ret void
+}
+
+; test7a:  PtrToInt Cast
+;          no safestack attribute
+; Requires no protector.
+define void @test7a() nounwind uwtable readnone {
+entry:
+; LINUX-I386: test7a:
+; LINUX-I386-NOT: movl	__llvm__unsafe_stack_ptr
+; LINUX-I386: .cfi_endproc
+
+; LINUX-X64: test7a:
+; LINUX-X64-NOT: movq	%fs:640
+; LINUX...