Where to find library code Topic is solved

Technical questions regarding the XTC tools and programming with XMOS.
Post Reply
User avatar
aclassifier
Respected Member
Posts: 483
Joined: Wed Apr 25, 2012 8:52 pm
Contact:

Where to find library code

Post by aclassifier »

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


--
Øyvind Teig
Trondheim (Norway)
https://www.teigfam.net/oyvind/home/
View Solution
robertxmos
XCore Addict
Posts: 169
Joined: Fri Oct 23, 2015 10:23 am

Post by robertxmos »

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
aclassifier
Respected Member
Posts: 483
Joined: Wed Apr 25, 2012 8:52 pm
Contact:

Post by aclassifier »

Robert, thanks! I am so pleased with how XMOS treats the XCore Exhange! It's there for the users!
--
Øyvind Teig
Trondheim (Norway)
https://www.teigfam.net/oyvind/home/
Post Reply