<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Maybe there is some special C rule here
that I don't understand but I am declaring floor and floor_.<br>
<br>
consider floor1.c<br>
<br>
extern double floor(double);<br>
extern double floor_(double);<br>
<br>
double x = 1.5;<br>
double y, y_;<br>
<br>
void foo() {<br>
<br>
y = floor(x);<br>
y_ = floor_(x);<br>
}<br>
<br>
<br>
and floor.c<br>
<br>
#include <stdio.h><br>
<br>
extern double x, y, y_;<br>
<br>
double floor(double x) {<br>
return 2*x;<br>
}<br>
<br>
double floor_(double x) {<br>
return 3*x;<br>
}<br>
<br>
extern void foo();<br>
<br>
int main() {<br>
foo();<br>
printf("%e %e %e \n", x, y, y_);<br>
return 0;<br>
}<br>
<br>
/local/llvmpb_config/install/bin/clang floor1.c floor.c <br>
<br>
rkotler@ubuntu-rkotler:~/testmips16$ ./a.out<br>
1.500000e+00 3.000000e+00 4.500000e+00<br>
<br>
<br>
<br>
<br>
<br>
On 07/26/2013 06:14 PM, Richard Smith wrote:<br>
</div>
<blockquote
cite="mid:CAOfiQqmhT0UaUqZZzVDJNazuKAGg4dMxyJmxqpnMcyOqoOkFYw@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
On Fri, Jul 26, 2013 at 6:05 PM, reed kotler <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:rkotler@mips.com"
target="_blank">rkotler@mips.com</a>></span> wrote:<br>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm chasing down another issue with floor in llvm but noticed
this strange behavior:<br>
<br>
Consider the following code:<br>
<br>
extern double floor(double);<br>
extern double floor_(double);<br>
<br>
double x = 1.5;<br>
double y, y_;<br>
<br>
void foo() {<br>
<br>
double y = floor(x);<br>
double y_ = floor_(x);<br>
}<br>
<br>
<br>
/local/llvmpb_config/install/bin/clang floor1.c -o floor1.llc
-emit-llvm -S<br>
<br>
The attributes for floor and floor_ are different.</blockquote>
<div><br>
</div>
<div>This is expected; we recognise 'floor' as a builtin. </div>
</div>
</blockquote>
<br>
</body>
</html>