Quantcast
Channel: Tools
Viewing all articles
Browse latest Browse all 91752

Forum Post: RE: Why a opcode can't using in CCS 3.3

$
0
0

I think you taught me a method of learning rather than merely a knowledge. I will study hard and make use of C6x compiler. Thank you for your guidance!

Another question: imath64.obj (.text:__c6xabi_divlli) .Is this funtion  defined in imath64.c file?And in which lib? 

This function may be in the rts64plus.lib.i think.

 

 Here is the thing.

Earlier, I used the function _divlli() in the mian. C file ,and call it sucessfully.I can get the right result.

Then I tried to call the _divlli() in the assembly file. but failed!(The figure below)
In addition, in that assemble file,the function sdiv()which is my-coding function can using successfuly!

i don't know what happened? "undefined   symbol" Means that the lack of libraries, but when I called _divllli() in C file,we didn't meet with that problem .i think this function is in rts64plus.lib. so,

 i copy the function code from imath64.c to main.c.and call it in assmble file.the compiler print: __divlli is defined multiple times. i know all the thing happen in the linking section .

So,in the assembly code,How can i call a  function which is in a .lib file . For example, _devlli() in rts64plus.lib.

PS:

this is my function for 64-signed bit DIV.

long long divlli64(long long a, long long b)
 {
  /*-----------------------------------------------------------------------*/
   /* CHECK SIGNS, TAKE ABSOLUTE VALUE, AND USED UNSIGNED DIVIDE.           */
   /*-----------------------------------------------------------------------*/
   long long sign  = (a^b)>>63;    
  unsigned long long ua=(a==LLONG_MIN?a:llabs(a)); 
  unsigned long long ub=(b==LLONG_MIN?b:llabs(b));
    unsigned long long q =_divull(ua,ub);

   if (b == 0)
       return a?(((unsigned long long)-1) >> 1)^sign : 0;
                         /* saturation value or 0 */
   return sign?-q:q;
 }

but i can't using it ,when i pass a 64-bit para to  it. the following is the code:

 .call in6=_divlli64(in3:in4,in1:in2)

the compiler print: >> internal error: Missing symbol table entry for in3:in4

(The figure of the project is at the bottom)

 


Viewing all articles
Browse latest Browse all 91752

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>