Where to find library code Topic is solved

Technical questions regarding the xTIMEcomposer, xSOFTip Explorer and Programming with XMOS.
User avatar
Respected Member
Posts: 332
Joined: Wed Apr 25, 2012 8:52 pm

Where to find library code

Postby aclassifier » Sun May 20, 2018 6:12 pm

I have investigated how much code use of float takes. So I stumbled upon this problem: When I inspected the map files with and without use of float I found the following code added for the version with of float vs that with int [1] (in my context this was rather meaningful since I used the one with float to calculate some hard compiled constants to use with the int version):

Code: Select all

00043134 0000006c .text                __floatunsisf
00043134 00000000 .text                $s.12
000431a0 0000007e .text                __extendsfdf2
000431a0 00000000 .text                $s.21
00043220 0000028c .text                __muldf3
00043220 00000000 .text                $s.24
000434ac 0000003a .text                __fixunsdfsi
000434ac 00000000 .text                $s.8
000434e8 000002be .text                __divdf3
000434e8 00000000 .text                $s.27
000437a8 000002c6 .text                __adddf3
000437a8 00000000 .text                $s.24

000449ec 0000002a .text                __ashldi3
000449ec 00000000 .text                $s.4
00044a18 0000002a .text                __lshrdi3
00044a18 00000000 .text                $s.4
Bu I can't find the source for this? The only hit I found (like __extendsfdf2) was in gccint.pdf in 4.2.2 Conversion functions. But this was even in the arm_toolchain path.

Or will these tool supplied built-ins (intrinsics, I guess) only come as object code?

[1] Floating point library - in a blog note
View Solution
XCore Addict
Posts: 169
Joined: Fri Oct 23, 2015 10:23 am

Postby robertxmos » Wed May 23, 2018 11:53 am

These are found in library files e.g. lib/xs2a/libclang_rt.builtins-xcore.a
As the name suggests, they are the low level libraries that the compiler requires as a minimum runtime environment.
The source code can be viewed at https://compiler-rt.llvm.org/ (we ship with a port of 3.6.0)
User avatar
Respected Member
Posts: 332
Joined: Wed Apr 25, 2012 8:52 pm

Postby aclassifier » Wed May 23, 2018 1:55 pm

Robert, thanks! I am so pleased with how XMOS treats the XCore Exhange! It's there for the users!

Who is online

Users browsing this forum: No registered users and 5 guests