<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Yes, you could have mips16 and fastcc.<br>
<br>
Mips16 just means that processor mode to execute that function is
"mips16".<br>
So in a mips16 designated function, I will just emit mips16
instructions and in a "nomips16"<br>
function, just emit normal mips32 instructions.<br>
<br>
I tend to call this "mips32" normal mode, "standard encoding"
because in reality the processor is<br>
mips32 for both "mips16" and "nomips16".<br>
<br>
Nomips16 means normal "mips32" mode at this time. (We are
mimicking the way gcc handles <br>
this and there is yet another mode call "micromips" which will
complicate this naming convention<br>
when it gets pushed upstream in gcc soon).<br>
<br>
In some senses, attribute(mips16) could be interpretted as a
suggestion, ala "register" variables in C but at this time the
attribute is taken literally in gcc. Ultimately the compiler could
chose on it's<br>
own to use mips16 in response to optimization -Os.<br>
<br>
Mips16 is really just a compressed instruction encoding (ala
thumb1 for arm) that encodes<br>
instructions in 16 or 32 bits (as opposed to mips32 which encodes
them all in 32 bits).<br>
<br>
I think that in reality you will get around a 30% compression by
using mips16, depending on the<br>
profile of the code you are compiling.<br>
<br>
mips16 does have some special abi (and hence calling convention
requirements) when the return type is float, double, complex
and/or the first and/possibly second argument is float or double.<br>
the interoperability of mips16 and mips32 creates some issues
because mips16 has no floating point instructions or registers.<br>
<br>
On 01/11/2013 04:51 AM, Justin Holewinski wrote:<br>
</div>
<blockquote
cite="mid:CAJgxuaeKNtK7GCwFCG+KfnbOGT=8weMzc+LCEBEnageCP72yHQ@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<div dir="ltr">Depends on whether its actually the calling
convention, or just an annotation (I don't know MIPS that well).
Could you ever have a case where you want to declare a function
as both mips16 and fastcc, or some other explicit calling
convention?
<div>
<br>
</div>
<div style="">For PTX, we added two calling conventions to mark
kernel functions (callable by host) from device functions (not
callable by host). But this designation is actually part of
the function calling convention.</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Fri, Jan 11, 2013 at 12:20 AM, 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>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">For target
dependent function level attributes, do I need to actually
add them to the enumeration in attributes.h?<br>
<br>
I have for example, mips16 and nomips16 as attributes.<br>
<br>
Or is this supposed to be done with cc <n><br>
<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a moz-do-not-send="true" href="mailto:LLVMdev@cs.uiuc.edu"
target="_blank">LLVMdev@cs.uiuc.edu</a> <a
moz-do-not-send="true" href="http://llvm.cs.uiuc.edu"
target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a moz-do-not-send="true"
href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev"
target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<br>
<div>Thanks,</div>
<div><br>
</div>
<div>Justin Holewinski</div>
</div>
</blockquote>
<br>
</body>
</html>