I'd like to access the LDIV instruction from C++ and I am currently attempting to do so by:
static uint32_t divu_fract (uint32_t dividend, uint32_t divisor)
{
return (uint32_t)((((uint64_t)dividend) << 32) / divisor);
}
Unfortunately this compiles to a library call to __udivdi3 rather than LDIV.
I've found https://www.xmos.com/node/16493 which tells me of intrinsics to get maccs/maccu but searching xs1.h I can't find a corresponding intrinsic for LDIV.
How do I target the LDIV instruction?
-
- Junior Member
- Posts: 7
- Joined: Wed Dec 11, 2013 1:53 pm
-
- XCore Expert
- Posts: 589
- Joined: Wed Feb 29, 2012 10:03 am
Assembler syntax should be in the lower case. Look into the Assembly programming manual for more details.