Displaying 6 results from an estimated 6 matches for "max_qb".
2018 Sep 17
2
error about adding an trinsics
...is problem has been bothering me for several days.I really hope that you can help me.
I want to add an trinsics in X86. This trinsics can compare two numbers and return the larger.
There are the changes I do as fllowing.
In /tools/clang/include/clang/Basic/BuiltinsX86.def :
BUILTIN(__builtin_x86_max_qb, "iii", "")
In include/llvm/IR/IntrinsicsX86.td :
let TargetPrefix = "x86" in {
def int_x86_max_qb: GCCBuiltin<"__builtin_x86_max_qb">,
Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>;
}
In /lib/Target/X86/X86SelLowering.h:...
2018 Nov 07
2
how to add a instruction
Hi,every one.
I' in trouble again.
I want add a new intrinsic mapping a new instruction.
I add the int_x86_max_qb as fllowing:
def int_x86_max_qb: GCCBuiltin<"__builtin_x86_max_qb">, Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], [Commutative]>;
BUILTIN(__builtin_x86_max_qb, "iii", "")
I define the intrinsic as Pseudo instruction,it succeed.
But when mappi...
2018 Sep 06
2
Adding an trinsics in x86
Hi Everyone!
I am a newbie at llvm. So the question may be fundamental but difficult to me.
I want to add an trinsics in x86 and make the following changes.I want that max_qb can find the max of two Integers and return it.
In src/include/llvm/IR/Intrinsics.td :
let TargetPrefix = "x86" in {
def int_x86_max_qb: GCCBuiltin<"__builtin_x86_max_qb">,
Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>;
}
In src//tools/clang/inclu...
2018 Nov 14
2
Fw: How to define an instruction
...truction should also be multiplication.But it doesn't work.(my instruction can be compiled but can't run) .why can't it run? I think, it's no different with "IMUL32rr ".
Here is the result :
test.c shows as following:(the main content )
int a,b;
a=1;b=1;
a=a=__builtin_x86_max_qb (a,b); (the main content )
test.ll shows as following:
%0 = load i32, i32* %a, align 4
%1 = load i32, i32* %b, align 4
%2 = call i32 @llvm.x86.max.qb(i32 %1, i32 %2)
store i32 %2, i32* %a, align 4
when lli test.ll ,it goes wrong.
Here is my all code:
1. In llvm/include/llvm/IR/Intrinsi...
2018 Nov 14
2
Fw: How to define an instruction
...truction should also be multiplication.But it doesn't work.(my instruction can be compiled but can't run) .why can't it run? I think, it's no different with "IMUL32rr ".
Here is the result :
test.c shows as following:(the main content )
int a,b;
a=1;b=1;
a=a=__builtin_x86_max_qb (a,b); (the main content )
test.ll shows as following:
%0 = load i32, i32* %a, align 4
%1 = load i32, i32* %b, align 4
%2 = call i32 @llvm.x86.max.qb(i32 %1, i32 %2)
store i32 %2, i32* %a, align 4
when lli test.ll ,it goes wrong.
Here is my all code:
1. In llvm/include/llvm/IR/Intrinsi...
2018 Sep 12
2
There is an error “use of unknown builtin”
Hello,everyone.
I am very embarrassed to ask such a simple question.
I want to add an intrinsics(named max_qb) in x86 backend.
In include/llvm/IR/IntrinsicsX86.td, I add a intrinsics (GCCBuiltin).
In clang( BuiltinsX86.def ), I add a BUILTIN.
And in x86 backend , I change :
the X86InstrInfo.td to add def X86max_qb_flag ,
X86InstrArithmetic.td to add define of instruction ,
X86ISelLowering.cpp to add SDno...