Consider the (two) case(s)

 double foo(double) __attribute__((sseregparm));
 static double bar(double) __attribute__((sseregparm));
 static double bar(double x) { return x; }

now, with -mno-sse we have the following choices for call
to function foo:
 1 Emit the call with SSE arguments regardless of -mno-sse
   (we get (maybe) SIGILL at runtime)
 2 Emit the call with FP stack arguments regardless of
   attribute sseregparm (bad - we will get wrong results
   if SSE is actually supported at runtime, else we either
   get SIGILL or correct result(?))
 3 Error out at compile-time (bad - the call may actually
   be reached at runtime)
 4 Emit a call to abort()

with a call to function bar there is a fifth possibility:
 5 Ignore the sseregparm attribute for both emitting the
   function and the call.

Currently we do 2, which is not really better than 3 which
I implemented before.  Bonzini suggested creating an
"unreachable" attribute and transforming calls to such
function to abort() in the middle-end; I'm currently
trying if I can make the backend emit SSE code for the
call regardless of -mno-sse, but it looks complicated.

So, the first (separate) question is, do we want to support 5?
Which leaves us to decide between 1 and 4.

Thoughts?
Richard.

Reply via email to