Displaying 5 results from an estimated 5 matches for "subceil_s".
2013 Apr 01
2
[LLVMdev] Instruction Implementation
hi all
I have a question about implementing a new instruction which does this
function f(x) = x + ceilf (x) .x is a single float
i have already added the instruction in my backend in the .td file
def SUBCEIL_S : FFR<0x11, 0x3, 16, (outs FGR32:$fd), (ins FGR32:$fs),
"frac.s\t$fd, $fs", [(set (f32 FGR32:$fd), (fadd (f32 FGR32:$fs ),(f32
(ceilf FGR32:$fs))))] >;
it makes and install correctly but when i ll try to write code to use this
instruction there is no luck.
Should i do someth...
2013 Apr 02
0
[LLVMdev] Instruction Implementation
Hi,
> def SUBCEIL_S : FFR<0x11, 0x3, 16, (outs FGR32:$fd), (ins FGR32:$fs),
> "frac.s\t$fd, $fs", [(set (f32 FGR32:$fd), (fadd (f32 FGR32:$fs ),(f32
> (ceilf FGR32:$fs))))] >;
>
> it makes and install correctly but when i ll try to write code to use this
> instruction there is no l...
2013 Apr 02
0
[LLVMdev] Instruction Implementation
Hi,
> i ve uploaded .ll file
Is that the C file that's at the end of your message? To produce a .ll
file, you give clang the "-emit-llvm" option (and probably "-S").
Anyway, what I see in the C you posted is that Clang is using constant
folding to avoid doing any of the operations you've requested. A
better C file test would be:
float foo(float d) {
return d -
2013 Apr 02
1
[LLVMdev] Instruction Implementation
>I'm also a little worried that your pattern has fadd, but your C
>source has a subtraction.
:S i wrote it wrong the true implementation is
def SUBCEIL_S : FFR<0x11, 0x3, 16, (outs FGR32:$fd), (ins FGR32:$fs),
"frac.s\t$fd, $fs", [(set (f32 FGR32:$fd), (fsub (f32 FGR32:$fs ),(f32
(ceilf FGR32:$fs))))] >;
I use some C,C++ code to test my backend.
i use clang with those argument
-m32 -emit-llvm -S -target mipsel-linux-gnu...
2013 Apr 02
2
[LLVMdev] Instruction Implementation
Hi and thanks for answering
llc works fine just does not selecting my instruction
i ve uploaded .ll file
how can i include this attribute "readonly" so i can see if changes the
generated assembly?
my code is very simple
int main (){
float d, d1 ;
d= 12.3;
d1 = d - ceilf(d);
return 0;
}
--
View this message in context: